Object Detection
Finding every object in an image and drawing a labeled box around each one, often in real time.
Alsobounding boxes · IoU · intersection over union · non-max suppression · NMS · anchor boxes · R-CNN
Not just 'there is a dog in this photo' but 'there is a dog here, a ball there, and a person over there', with a box drawn around each.
Where it fits
+All relationships as a list
Is a kind of / part of
Kinds and parts
Siblings
Uses / built on
Try it
How it works
A detector looks at an image and proposes many candidate boxes, each with a class and a confidence score. Raw output is messy: the same dog might get ten slightly shifted boxes. Two simple ideas clean it up.
Intersection over union (IoU) measures how much two boxes overlap: the area they share divided by the area they cover together. 1 means identical, 0 means no overlap.
Non-max suppression (NMS) removes duplicates:
- Drop boxes below a confidence threshold.
- Take the most confident remaining box and keep it.
- Delete every other box of the same class whose IoU with it is above a threshold (often 0.5).
- Repeat with the next most confident box.
Detectors come in two styles. Two-stage detectors (the R-CNN family) first propose regions, then classify each one: accurate but slower. One-stage detectors like YOLO predict all boxes in a single pass of a CNN, fast enough for video.
The same IoU measure is also used to score detectors: a prediction counts as correct only if its IoU with a true box is high enough.
The math
For boxes and :
Everyday use cases
- Case 01
Self-driving and driver assistance
Detect cars, pedestrians and cyclists dozens of times per second.
- Case 02
Retail and warehouses
Count products on shelves or packages on a belt.
- Case 03
Wildlife monitoring
Spot and count animals in camera-trap photos.
Famous examples
- 2015YOLO
A family of fast object detectors that find all objects in an image with a single pass of a neural network, fast enough for live video.
- SystemDriver Assistance and Self-Driving
Cars that see the road with cameras, radar and lidar: from automatic emergency braking and lane keeping in ordinary cars to driverless robotaxis in some cities.
Strengths, weaknesses and when to use it
Strengths
- Answers both "what" and "where".
- Modern one-stage detectors run in real time on modest hardware.
Weaknesses
- Boxes are coarse; they do not give exact object outlines.
- Small, crowded or overlapping objects remain hard.
When to use itWhen you need to locate and count objects, not just recognize the image as a whole.
Compare with
Check yourself
- Q01
What does IoU measure?
Show answer
B: How much two boxes overlap, as intersection area divided by union area
- Q02
What problem does non-max suppression solve?
Show answer
A: Detectors output many overlapping boxes for the same object