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.

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 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.

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.

Open PandaSet in Voxel51

Free with a work or .edu email.

Go deeper

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.

IoU vs related metrics

MetricWhat it measuresWhere it's used
IoU (Jaccard)Overlap over union, 0 to 1Detection and segmentation, the default overlap score
Boundary IoUOverlap measured only near the object's edgesSegmentation where edge accuracy matters, thin or wispy objects
Rotated / 3D IoUOverlap that accounts for orientation, not just positionRotated boxes, cuboids, LiDAR and AV perception
Dice / F1Overlap weighted toward the intersection, more forgiving on small regionsSegmentation, especially medical imaging
mAPDetection accuracy aggregated across IoU thresholdsObject detection benchmarks
Panoptic quality (PQ)Class accuracy and instance accuracy combined in one scorePanoptic segmentation
How IoU compares to the other overlap and accuracy metrics used to score visual AI.

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.
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.
black and white photo of Jesse Mostipak
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 5, 2026

Building visual or physical AI?

Let's talk.