Skip to content
StackDecode
AI & ML Atlas
Artificial IntelligencealgorithmAnimated walkthrough

Object Detection

Finds objects in an image and draws a labelled box around each.

The idea

Detectors such as YOLO, SSD and Faster R-CNN predict many candidate boxes with class scores. Because several boxes land on the same object, non-maximum suppression (NMS) keeps the highest-scoring box and removes the ones that overlap it too much, measured by intersection over union (IoU).

IoU = area of overlap / area of union

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1Run a CNN to propose boxes with class scores.
  2. 2Discard boxes below a confidence threshold.
  3. 3Take the highest-scoring box and keep it.
  4. 4Remove boxes overlapping it by more than the IoU threshold.
  5. 5Repeat with the remaining boxes.

IoU = area of overlap / area of union

1/5

Step by step

  1. 1Run a CNN to propose boxes with class scores.
  2. 2Discard boxes below a confidence threshold.
  3. 3Take the highest-scoring box and keep it.
  4. 4Remove boxes overlapping it by more than the IoU threshold.
  5. 5Repeat with the remaining boxes.

Where it is used

Self-driving, retail, medical imaging.

Watch out for

Small and crowded objects; the IoU threshold trades duplicates against missed neighbours.

Related