Graph
Intersection over Union

🟪Intersection over Union

NEW

Also known as: IoU

A metric measuring overlap between predicted and ground-truth regions.

DESCRIPTION

Intersection over Union quantifies the overlap between two regions as the area of their intersection divided by the area of their union. It is a standard metric in object detection and segmentation benchmarks. IoU thresholds define true positives in evaluation protocols like COCO and Pascal VOC. It is closely related to the Jaccard Index and inversely related to errors in localization.

ALTERNATIVE DEFINITIONS

Wikipedia

The Jaccard index, also known as the Jaccard similarity coefficient, is a statistic used for comparing the similarity and diversity of sample sets.

Describes the general set similarity measure that IoU implements.

Source

COCO Dataset

Intersection over Union (IoU) is defined as the area of overlap between the predicted bounding box and the ground-truth bounding box divided by the area of their union.

Provides explicit formula and its role in object detection evaluation.

Source

Object Detection Semantic Segmentation Bounding Box mAP Precision and Recall Evaluation Metrics Confusion Matrix Overlap Metric

COMPETING TERMS

Dice Coefficient F1 Score

RELATIONS

KNOWLEDGE AREAS

AI Data Science Mathematics Data Visualization

TARGET AUDIENCE

AI Engineer Data Scientist MLOps Engineer BI Specialist

EXTERNAL SOURCES

TOP QUESTIONS

How do you compute Intersection over Union?

IoU equals the area of intersection divided by the area of union between predicted and ground-truth regions.

Category: How-to

Why is IoU important in object detection?

It determines if a predicted box matches ground truth and affects precision-recall and mAP metrics.

Category: Relevancy

What IoU threshold should I use?

Common thresholds are 0.5 (VOC) and a range 0.5:0.95 (COCO). Choose based on task tolerance for localization errors.

Category: Best practices

How does IoU compare to Dice Coefficient?

Both measure overlap; Dice weighs intersection more, often favoring small objects. They are monotonically related.

Category: Comparison

What is a common mistake with IoU?

Ignoring aspect ratio and center offset sensitivity; slight misalignments can drastically reduce IoU for small objects.

Category: Mistakes

Can IoU be used for segmentation masks?

Yes, compute pixel-wise IoU for masks; averaging across classes yields mean IoU.

Category: Application

How does IoU affect mAP?

A higher IoU threshold increases matching strictness, typically lowering mAP but improving localization quality.

Category: Interpretation

Is IoU differentiable for training?

Differentiable surrogates (e.g., GIoU, DIoU, CIoU losses) enable direct optimization of overlap.

Category: Application

What is mean IoU (mIoU)?

It’s the average of IoU across classes or instances, widely used in segmentation benchmarks.

Category: Definition