Object detection is the computer-vision task of locating and identifying multiple objects within an image. Where plain classification answers "what is it?", detection also answers "where?": it draws a bounding box around each object and assigns a label with a confidence score. It is the eye that lets a self-driving car tell a pedestrian from a lamppost.
How it works
For each object, a detector outputs four coordinates (the box corners) plus a class and a confidence. Two main families exist:
- Two-stage detectors (R-CNN, Faster R-CNN): first propose candidate regions, then classify them. More accurate, but slower.
- One-stage detectors (YOLO, SSD, RetinaNet): predict boxes and classes in a single network pass. Faster, suited to real-time use.
Measuring quality
The key metric is IoU (Intersection over Union), comparing the predicted box to the ground-truth box:
$$\text{IoU} = \frac{\text{Area}(\text{predicted} \cap \text{truth})}{\text{Area}(\text{predicted} \cup \text{truth})}$$
A prediction counts as correct if IoU exceeds a threshold (often 0.5). Overall performance is then summarized by the mAP (mean Average Precision).
| Task | Question | Output |
|---|---|---|
| Classification | What? | 1 label |
| Detection | What + where? | Boxes + labels |
| Segmentation | What + exact outline? | Per-pixel mask |
Applications
Self-driving cars, video surveillance, reading X-rays, agricultural counting, cashier-less checkout, industrial robotics.
To detect is to teach a machine to point — to name each thing and say where it is.