Mean average precision (mAP) is the standard accuracy metric for object detection and instance segmentation in computer vision: it computes the average precision (AP) of each object class as the area under its precision-recall curve and then takes the mean across all classes. A single mAP score therefore summarizes how well a model both finds objects and localizes them correctly, across every confidence threshold.
The metric appears in almost every detection benchmark and model release, but its value depends heavily on the evaluation protocol. A figure reported under the PASCAL VOC convention is not comparable with one reported under the COCO convention, so understanding how mAP is computed is essential before comparing models.
How mean average precision is calculated
The calculation starts by matching predictions to ground truth. For each class, all predicted boxes from the test set are sorted by confidence score, and each one is labeled a true positive if its intersection over union (IoU) with a not-yet-matched ground-truth box meets the threshold, or a false positive otherwise. Duplicate detections of an already matched object count as false positives, which is why non-maximum suppression matters.
Walking down the sorted list produces a sequence of precision and recall values. Precision is the share of predictions that are correct, and recall is the share of ground-truth objects found. AP is the area under the resulting curve after interpolation, which replaces each precision value with the highest precision at any higher recall.
| Step | Operation | Output |
|---|---|---|
| 1. Rank | Sort detections per class by confidence | Ordered prediction list |
| 2. Match | Compare each box with ground truth using IoU | True and false positive labels |
| 3. Accumulate | Compute cumulative precision and recall | Precision-recall curve |
| 4. Interpolate | Make precision monotonically decreasing | Smoothed curve |
| 5. Integrate | Area under the curve | AP for one class |
| 6. Average | Mean of AP over classes | mAP |
PASCAL VOC and COCO variants of mAP
The two dominant conventions differ in IoU thresholds and interpolation points. PASCAL VOC uses a single IoU threshold of 0.5, while the COCO benchmark averages AP over ten IoU thresholds from 0.50 to 0.95 in steps of 0.05, which rewards precise localization much more strongly.
Naming also differs. COCO reports the averaged figure simply as AP, even though it is a mean over classes, and writes the single-threshold variants as AP50 and AP75. Papers often write mAP@0.5 and mAP@0.5:0.95 to remove the ambiguity.
| Convention | IoU threshold | Interpolation | Typical use |
|---|---|---|---|
| VOC 2007 | 0.5 | 11 recall points | Older detection papers |
| VOC 2010 and later | 0.5 | All recall points | PASCAL VOC benchmark |
| COCO AP | 0.50 to 0.95, step 0.05 | 101 recall points | Main modern benchmark figure |
| COCO AP50 | 0.5 | 101 recall points | Lenient comparison with VOC |
| COCO AP75 | 0.75 | 101 recall points | Strict localization check |
COCO also reports AP by object size: small objects below 32 by 32 pixels, medium objects up to 96 by 96 pixels and large objects above that. These breakdowns show whether a model fails on small objects, which is a frequent weakness of single-stage detectors.
Mean average precision compared with other detection metrics
mAP is a threshold-free ranking metric, which distinguishes it from metrics computed at one operating point. That property makes it ideal for comparing models, but it does not tell an engineer which confidence threshold to deploy.
| Metric | What it measures | Key difference from mAP |
|---|---|---|
| Intersection over union | Overlap of one predicted and one true box | Input to mAP, not a summary score |
| Precision and recall | Correctness and coverage at one threshold | Single operating point only |
| F1 score | Harmonic mean of precision and recall | Depends on chosen confidence threshold |
| Average recall (AR) | Recall averaged over IoU thresholds | Ignores false positives |
| Panoptic quality (PQ) | Segmentation and recognition together | Used for panoptic segmentation |
| MOTA and HOTA | Detection plus identity over time | Used for object tracking |
The same name is used in information retrieval, where mAP averages the precision of ranked search results over queries. The idea is identical, but in computer vision the matching rule depends on IoU with bounding boxes or masks.
Interpreting and reporting mAP in practice
A useful mAP report always states the dataset split, IoU range, interpolation method and input resolution. Without these details, differences of several points can come from protocol rather than from model quality.
| Situation | Recommended variant | Reason |
|---|---|---|
| Comparing with published models | COCO AP at 0.50 to 0.95 | Matches the dominant benchmark |
| Coarse localization is enough | mAP@0.5 | Counting or presence detection tolerates loose boxes |
| Precise boxes are required | AP75 or higher thresholds | Robotics and measurement need tight fits |
| Many small objects | AP for small objects | Overall mAP hides size-specific failures |
| Imbalanced classes | Per-class AP table | The mean can mask weak rare classes |
Because mAP gives every class equal weight, a rare class with poor AP lowers the score as much as a common class. Teams should therefore inspect per-class AP alongside the mean.
Limitations and common mistakes with mAP
- Mixing conventions: comparing a VOC mAP@0.5 of 80 with a COCO AP of 50 suggests a gap that does not exist.
- Ignoring the operating point: a high mAP model may still produce too many false positives at the threshold used in production.
- Evaluating on training data: leakage between splits inflates mAP and hides overfitting.
- Skipping duplicate handling: missing non-maximum suppression turns duplicates into false positives and lowers AP.
- Treating small gains as meaningful: differences below about one point can fall within run-to-run variance.
mAP also says nothing about inference speed, calibration or robustness to domain shift, so it should be one part of a broader evaluation.
In plain words
Imagine a program that looks at photos and draws boxes around cars, people and bicycles. Mean average precision is a single grade for how good those boxes are. For each kind of object, it checks whether the program found the objects, whether it drew the boxes in the right place and whether it added false alarms.
Each kind of object gets its own score, and mAP is simply the average of those scores. A higher number means the program finds more of the real objects while making fewer mistakes, but the number only makes sense when everyone grades with the same rules.
A real-world example
A warehouse automation team trains a detector to find pallets, forklifts and people in ceiling-camera images. On a held-out set of 3,000 images, the first model reaches mAP@0.5 of 0.88 but only 0.52 on the COCO-style 0.50 to 0.95 range, which shows that it finds objects but draws loose boxes.
Per-class AP reveals that people score far lower than pallets because workers often appear small and partly hidden. The team adds higher-resolution training crops and more annotated images of distant workers. The retrained model raises AP for people by 9 points and the overall 0.50 to 0.95 figure to 0.58, enough to meet the safety requirement for reliable person detection near moving forklifts.