Artificial intelligence • Original RRTutors lesson
Computer Vision: Classification, Detection, and Segmentation
Distinguish image-level labels, object locations, pixel-level labels, and visual tracking.
Concept and explanation
Computer vision systems transform images or video into predictions. Classification assigns labels to an image; detection locates objects with boxes; segmentation assigns labels to pixels; tracking connects objects across frames. Evaluation should consider localization quality, class imbalance, lighting, camera variation, and the consequences of missed detections.
How to apply it
Define the visual task and annotation policy, test across acquisition conditions, and inspect both aggregate and per-class errors.
Worked example
A traffic camera might detect vehicles for a count; a separate validated system is needed before using detections to control safety-critical actions.
Illustrative Python example
prediction = {
"label": "bicycle",
"box_xyxy": [24, 18, 110, 142],
"score": 0.93,
}
print(prediction["label"], prediction["box_xyxy"])
Expected result
An object detector returns a class, bounding box, and model score.
Limitations and cautions
Occlusion, domain shift, demographic imbalance, and camera placement can change error rates.
Practice exercise
Plan a test set for a wildlife camera model that includes different weather and lighting.
Key takeaway: Visual AI must be evaluated in the conditions where people will use it.