Intersection over union (IoU)
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.
In this article
Building visual or physical AI?
Let's talk.
What is intersection over union?
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, scale-invariant, and works for any two regions, which is why it is the standard way to score overlap in 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.
Two errors that look the same at IoU 0.5
Detection evaluation turns IoU into a verdict. Every prediction is matched to a ground truth box, and anything under the threshold is scored as a miss. That one cutoff blends together failures that need very different fixes:
- A loose box around the right object. The model found it, but the box is too wide or too tight to clear 0.5. It counts as a false positive and a false negative at the same time.
- A box around the wrong thing. A real false positive, often background clutter or a reflection.
- An object the model never boxed. A real false negative, often small, occluded, or rare.
The first kind is often a labeling problem, not a model problem. If annotators draw boxes at different tightness, the model learns an average box, and IoU punishes it for matching none of them. More training data won't fix that. Consistent annotation guidelines will.
In Voxel51, a detection evaluation marks every prediction and ground truth object as a true positive, false positive, or false negative, so you can see the errors on the image and tell which kind you have. When a false positive and a false negative sit on the same object, you're looking at a localization miss.
PandaSet Detection
9,888 images
PandaSet driving camera frames with ground truth boxes and an evaluated RT-DETR detector.
Try this: Open the RT-DETR evaluation and find frames where a false positive and a false negative overlap the same car or pedestrian.
Explore PandaSet in Voxel51
Free with a work or .edu email.
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. PASCAL VOC reports mean average precision (mAP) at 0.5, and COCO averages mAP over thresholds from 0.5 to 0.95.
- 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.
IoU vs related metrics
| 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, reads higher than IoU for the same masks | 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 of error on a tiny object can drop IoU below the threshold even when the model found the right object, so small-object scores often look worse than the model really is. IoU also ignores heading. Axis-aligned boxes fit rotated objects loosely, which is why rotated and 3D tasks use rotated or 3D IoU. Even those score a box flipped 180 degrees as a perfect match, so benchmarks such as nuScenes measure orientation error separately.
For how IoU thresholds decide matches in detection metrics, see IoU thresholds and object detection metrics.
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.
Related terms
Learn more
See how evaluation comes together end to end on the model evaluation page.

Director of Growth
Jesse Mostipak is the Director of Growth at Voxel51, where the work is helping humans find and trust what the brand knows, and teaching the Google knowledge graph and the LLMs answering on their behalf to do the same. That question, how knowledge gets built inside a system, is one Jesse has been chasing for years. Earlier versions of it ran through a New York City high school science classroom, data science and machine learning, and developer relations at Kaggle, Posit (formerly RStudio), and Baseten. The answer doesn't change much depending on whether the learner is a teenager, a software engineer, or a knowledge graph. Jesse holds a Master's in Education from CUNY Hunter College. LinkedIn
See all articles by Jesse Mostipak
Last updated November 13, 2026