Object detection goes beyond classification: it finds where objects are, drawing a bounding box around each one and labelling it.
What Detectors Output
For each detected object: a class label, a bounding box (coordinates) and a confidence score. A single image can contain many objects of different classes.
Main Approaches
- Two-stage detectors (such as Faster R-CNN) propose candidate regions, then classify and refine them. Accurate, historically slower.
- One-stage detectors (such as the YOLO family and SSD) predict boxes and classes in a single pass. Fast enough for real-time video.
- Transformer-based detectors (such as DETR) treat detection as a set-prediction problem.
Measuring Accuracy
- IoU (intersection over union): how much a predicted box overlaps the true box.
- mAP (mean average precision): the standard metric, averaging precision across classes and IoU thresholds.
Practical Steps
- Start from a detector pretrained on a large dataset such as COCO.
- Label your own images with boxes (annotation tools help).
- Fine-tune and evaluate on held-out images from different conditions.
- Tune the confidence threshold for your use case.
Common Challenges
Small objects, heavy overlap, unusual angles, lighting changes and rare classes. Data covering these conditions matters more than the choice of architecture.
Related Tasks
Segmentation labels individual pixels; tracking follows detected objects across video frames.