Learn Before
Formula

Intersection over Union (IoU)

In object detection, the similarity between two bounding boxes is measured using their Jaccard index, commonly referred to as the intersection over union (IoU). By treating the pixel area of each bounding box as a set of pixels, the IoU is calculated as the ratio of their intersection area to their union area: J(A,B)=ABABJ(\mathcal{A},\mathcal{B}) = \frac{|\mathcal{A} \cap \mathcal{B}|}{|\mathcal{A} \cup \mathcal{B}|}. The IoU value ranges from 0 to 1, where 0 indicates that the bounding boxes have no overlap, and 1 indicates that they are exactly equal.

Image 0

0

1

Updated 2026-06-13

Tags

D2L

Dive into Deep Learning @ D2L