difficulty 2/5
Intersection over union
The area two regions share divided by the area they cover between them. It is read as "how correct is this box", and it is stricter and scale-blind in ways that number hides.
Intuition
Two regions are drawn on an image — one is what a model predicted, one is what was actually there. IoU is the single number that decides whether those count as the same thing.
It is the shared area divided by the area they cover between them [1, §14.4.2]. The division is what makes it strict: anything one region covers and the other does not is absent from the top of the fraction and present at the bottom, so every disagreement is charged twice. That is why the number runs lower than intuition expects, and why 0.5 is a much weaker claim than "half right".
Formal definition
How it works
Where it's used
Why & when
Worked example
Pitfalls
Check yourself
3 questions
The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.
Sources
- Dive into Deep Learning — Anchor Boxesbook · retrieved 2026-09-20https://d2l.ai/chapter_computer-vision/anchor.html
- Generalized Intersection over Union: A Metric and A Loss for Bounding Box Regression (2019)paper · retrieved 2026-09-20https://ar5iv.labs.arxiv.org/html/1902.09630