Glossary term
Glossary term
Evaluation and Benchmarks
The intersection of two sets divided by their union. In machine-learning image-detection tasks, IoU is used to measure the accuracy of the model's predicted bounding box with respect to the ground-truth bounding box. In this case, the IoU for the two boxes is the ratio between the overlapping area and the total area, and its value ranges from 0 (no overlap of predicted bounding box and ground-truth bounding box) to 1 (predicted bounding box and ground-truth bounding box have the exact same coordinates).
For example, in the image below:
The predicted bounding box (the coordinates delimiting where the model predicts the night table in the painting is located) is outlined in purple.
The ground-truth bounding box (the coordinates delimiting where the night table in the painting is actually located) is outlined in green.

Here, the intersection of the bounding boxes for prediction and ground truth (below left) is 1, and the union of the bounding boxes for prediction and ground truth (below right) is 7, so the IoU is .


For example, in the image below:
The predicted bounding box (the coordinates delimiting where the model predicts the night table in the painting is located) is outlined in purple.
The ground-truth bounding box (the coordinates delimiting where the night table in the painting is actually located) is outlined in green.
Created for this library
An autonomous-driving team uses intersection over union as the primary metric for evaluating bounding-box detections of vehicles and pedestrians.
A medical imaging team uses intersection over union to evaluate organ segmentation models against radiologist-drawn masks.
A retail analytics team uses intersection over union on shelf-image detections to evaluate how well its model localizes product packs.
Definition source: Google for Developers Machine Learning Glossary | Creative Commons Attribution 4.0 License