definition: Intersection over union (IoU) is an evaluation metric that measures how much two regions overlap, computed as the area of their intersection divided by the area of their union. It is the standard way to score predicted bounding boxes and segmentation masks against ground truth.
IoU quantifies the overlap between a predicted region and a ground-truth region. You take the area where they overlap, the intersection, and divide it by the total area they cover together, the union. The result runs from 0 (no overlap) to 1 (a perfect match). It is symmetric and scale-relative and works for any two regions, which is why it is the default metric for object detection and segmentation.
IoU = area of (A ∩ B) / area of (A ∪ B)
Key takeaways
IoU is overlap divided by combined area, scored from 0 to 1.
It is the standard accuracy metric for bounding boxes and segmentation masks.
A detection usually counts as correct only above a chosen IoU threshold, commonly 0.5.
How it's used
Detection: a predicted box is a true positive when its IoU with a ground-truth box clears a threshold, often 0.5. Mean average precision (mAP) is computed across thresholds.
Segmentation: IoU between predicted and ground-truth masks, also called the Jaccard index, measures pixel overlap.
Thresholds: stricter values like 0.75 or 0.9 demand tighter localization.
How it works, and how FiftyOne fits
In FiftyOne, evaluation matches predictions to ground truth by IoU and tags each as a true positive, false positive, or false negative, so you can sort by IoU to find the loosest matches or the confident-but-wrong predictions. Explore all available IoU utilities available in FiftyOne.
IoU vs related metrics
How IoU compares to the other overlap and accuracy metrics used to score visual AI.
How IoU compares to the other overlap and accuracy metrics used to score visual AI.
Metric
What it measures
Where it's used
IoU (Jaccard)
Overlap over union, 0 to 1
Detection and segmentation, the default overlap score
Boundary IoU
Overlap measured only near the object's edges
Segmentation where edge accuracy matters, thin or wispy objects
Rotated / 3D IoU
Overlap that accounts for orientation, not just position
Rotated boxes, cuboids, LiDAR and AV perception
Dice / F1
Overlap weighted toward the intersection, more forgiving on small regions
Segmentation, especially medical imaging
mAP
Detection accuracy aggregated across IoU thresholds
Object detection benchmarks
Panoptic quality (PQ)
Class accuracy and instance accuracy combined in one score
Panoptic segmentation
Why it matters
IoU is how "did the model find the object" becomes a number. It is harsh on small and thin objects, a few pixels off on a tiny object can drop IoU below threshold even when the detection is essentially right, so small-object benchmarks often look worse than the model really is. And because standard IoU is axis-aligned and orientation-blind, a cuboid or rotated box can score a high IoU while pointing the wrong way, which is why 3D and rotated tasks use rotated or 3D IoU.
Frequently asked questions
What is a good IoU score?
It depends on the task, but 0.5 is the common pass threshold for detection, and 0.7 or higher is considered tight.
Is IoU the same as the Jaccard index?
Yes, IoU is the Jaccard index applied to regions.
Why do detections use an IoU threshold?
To decide whether a predicted box overlaps a ground-truth box enough to count as a correct detection.