difficulty 3/5
Mean average precision
The area under a precision-recall curve, averaged over classes — and in detection, also over IoU thresholds. The threshold you report it at decides whether it can see localisation quality at all.
Intuition
A detector does not return an answer, it returns a ranked list of guesses with confidences attached. Any single threshold on that confidence picks one point on the precision–recall trade-off, and reporting that one point tells you almost nothing — a different threshold would have given a different answer.
Average precision summarises the whole curve instead: it is "the weighted mean of precisions achieved at each threshold, with the increase in recall from the previous threshold used as the weight" [4, Definition]. Then mAP averages that over classes, so a detector cannot hide a useless rare class behind a good common one.
Detection adds a third thing to average over, and it is the one that causes the trouble. Before you can call a detection correct at all, you have to decide how well its box must overlap the real one — and that decision turns out to change the score far more than most model improvements do.
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.
On the cheat sheet: Vision tasks →
Sources
- Dive into Deep Learning — Anchor Boxesbook · retrieved 2026-09-14https://d2l.ai/chapter_computer-vision/anchor.html
- Focal Loss for Dense Object Detection (2018)paperhttps://ar5iv.labs.arxiv.org/html/1708.02002
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks (2016)paperhttps://ar5iv.labs.arxiv.org/html/1506.01497
- average_precision_scoredocs · retrieved 2026-09-14https://scikit-learn.org/stable/modules/generated/sklearn.metrics.average_precision_score.html