Labels and locations
An object detector predicts categories and locations, commonly as bounding boxes. One image can contain multiple objects, so a detector may return several predictions.
Compare boxes
Move the orange predicted box. The green box is the reference. Intersection over Union (IoU) is the overlap area divided by the combined area of both boxes. Exactly matching boxes have IoU 1; boxes with no overlap have IoU 0. The example uses equal heights, so comparing widths is enough. Move the predicted box away from the reference box. The overlap shrinks while the union grows; IoU summarizes their ratio.
INTERACTIVE EXPLORATION
Slide a predicted box
The reference interval is [0, 2]. Move a predicted interval of equal width along the horizontal axis; assume equal box heights.
Evaluation is more than one box
Detection metrics consider class, confidence, matching predictions to ground truth and IoU thresholds. Our experiment varies one predicted box in one dimension with identical height; it is a toy overlap calculation.
Check your understanding
What is IoU when two equal boxes coincide exactly?
1: their intersection and union are the same.