COCO mAP is one number built from per-class average precision. For each of the 80 COCO categories, the evaluator measures the area under the precision-recall curve at ten IoU thresholds (0.50 to 0.95 in steps of 0.05). It then averages across those thresholds and categories. The COCO organisers name it the single most important metric on the dataset, and averaging over thresholds rewards detectors with better localisation, not just boxes that land somewhere near the object. When Ultralytics reports mAP50-95, it means the same thresholds, 0.5 to 0.95 in steps of 0.05. Ultralytics computes it with its own code rather than the official evaluator, though, so the two numbers do not always agree.
Why COCO mAP Became the Standard Score for Comparing Detectors
Before COCO, detectors were scored at a single IoU threshold of 0.5. A predicted box counted as detected if its IoU with the ground truth passed 0.5, and the resulting 0.5-IoU mAP became the de facto metric. The 2020s survey “Object Detection in 20 Years” (Zou et al.) dates the shift to after 2014: once MS-COCO arrived, researchers began to care more about localisation accuracy, and COCO AP averaged over thresholds from 0.5 to 0.95 instead of one fixed cut-off. The survey’s own example is a robot trying to grasp a spanner. The COCO evaluation page itself calls the multi-threshold average “a break from tradition”.
LearnOpenCV’s guide to the metric describes COCO mAP as the most popular metric for evaluating object detection models. There is one naming trap to get past early. COCO makes no distinction between AP and mAP, so a column headed “AP” in a COCO results table is the class-averaged, threshold-averaged score.
A shared protocol is what makes the number comparable across papers, and that is also its limit. The protocol runs on the dataset’s object mix (about 41% small, 34% medium and 24% large objects by mask area) and caps scoring at 100 top-scoring detections per image. A COCO mAP figure is therefore a statement about performance on COCO’s distribution under COCO’s rules, and it only lines up with another figure when both of those match.
What Does [email protected]:0.95 Mean in a COCO Evaluation?
[email protected]:0.95 is the mean average precision computed separately at IoU thresholds of 0.50, 0.55, 0.60 and so on up to 0.95, and then averaged over those ten values. IoU (intersection over union) is the area where the predicted box and the ground-truth box overlap, divided by the area of their union. At each threshold, a detection counts as a true positive only if its IoU with the ground truth clears that threshold.
Averaging over the range changes what the score rewards. A model with sloppy boxes can do well at IoU 0.5 and still lose heavily at 0.9, so the averaged score drops for loose localisation even when every object was found. Alongside the headline number, COCO reports AP at IoU 0.50 (which it labels the PASCAL VOC metric), AP at 0.75 (the strict metric) and AP for small objects (area under 32²), medium objects and large objects (area over 96²).
The Average Precision Formula, Step by Step
Average precision for one class is the area under that class’s precision-recall curve, approximated by numerical integration over a finite set of sample points. COCO mAP stacks that calculation over classes and thresholds. The steps run in this order:
- Cap detections. Keep at most 100 top-scoring detections per image, across all categories.
- Match at one IoU threshold. Going down the detections from highest confidence, the highest-confidence box that overlaps a ground-truth object enough counts as correct, and every other box on that object counts as incorrect. This is the matching rule VOC used at 50% overlap, and COCO applies it at each of its thresholds.
- Trace the curve. Accumulate true and false positives down the list to get precision and recall at every rank.
- Make precision monotone. Set the precision at recall r to the highest precision reached at any recall ≥ r.
- Sample at 101 recall points. Read the interpolated precision at recall 0, 0.01, 0.02 … 1.00 and average the 101 values. That average is AP for this class at this threshold.
- Repeat for all ten thresholds. Each class ends up with ten AP values. The Ultralytics code stores this as an array of shape (number of classes, 10).
- Average. Take the mean over thresholds and over all categories.
Written as formulas, the per-class score is AP = (1/101) × Σ p_interp(r) over r ∈ {0, 0.01, …, 1}, where p_interp(r) is the monotone precision from step 4. mAP = (1/n) × Σ AP over the n classes. On COCO, that means averaging over all ten IoU thresholds and all 80 categories. In practice the reference implementation, pycocotools.COCOeval, also handles crowd annotations, area-based filtering and the detection limit, and other tools try to match it.
COCO mAP Versus PASCAL VOC mAP at a Single 0.5 IoU Threshold
The PASCAL VOC protocol counts a prediction as true when its box overlaps the ground truth by at least 50%. It also changed its integration method in 2010. The 2007 challenge used 11-point interpolation at IoU 0.5, and in 2010 the VOC devkit switched to the exact area under the monotone precision-recall curve, which it describes as involving no approximation because the curve is piecewise constant. COCO introduced 101-point interpolation and added the ten thresholds on top.
| PASCAL VOC mAP | COCO mAP | |
|---|---|---|
| IoU thresholds | One, at 0.5 | Ten, 0.50:0.05:0.95 |
| Integration | 11-point (2007), all-point area under the curve (from 2010) | 101 recall points |
| What it mainly rewards | Finding the object | Finding it and localising it tightly |
| Where it appears in COCO output | As “AP at IoU=.50” | As “AP”, the primary metric |
Because COCO’s headline averages in thresholds up to 0.95, the same model scores lower on it than on a 0.5-only metric. The practitioner guide from 123ofai describes a 20 to 30 point gap between the two protocols as typical for the same model, and gives an example of 78 mAP on VOC against 52 on COCO. That figure comes from one guide, but the direction follows from the definitions. A figure quoted without its protocol cannot be compared with anything.
Why Does a YOLO Training Run Report a Different mAP than the Official COCO Evaluator?
A YOLO validation run reports mAP50-95 as metrics.box.map, with map50, map75 and a per-category list in maps next to it. Like COCO, it uses ten thresholds from 0.5 to 0.95 and samples 101 recall points.
Integration method. Ultralytics integrates the interpolated curve with a trapezoidal rule over the 101 sampled points. The authors of the Roboflow100-VL benchmark paper report that on their benchmark this trapezoidal sum inflates scores by as much as 2.7% compared with pycocotools. On COCO they saw only slightly different YOLOv8 and YOLOv11 results between the two tools. On their own multi-domain benchmark the gap from tooling was larger.
Confidence threshold. Validation should use a very low confidence threshold, such as 0.001 or 0.01, so the full precision-recall curve is captured. The Ultralytics validation docs note that a higher setting such as 0.25 gives output closer to deployment predictions but can lower mAP. Evaluating at 0.5 cuts the curve short and produces an artificially low score.
NMS IoU versus evaluation IoU. The iou=0.7 validation argument controls non-maximum suppression, not the thresholds at which mAP is scored. Changing it changes which boxes survive before scoring. That can move the number without the model changing at all.
Detection cap. COCO scores at most 100 detections per image. The Roboflow100-VL authors raised pycocotools’ maxDets to 500 because many of their images contain more than 100 objects. Two evaluations with different caps are scoring different prediction sets.
Which evaluator produced the breakdowns. On detection datasets, setting save_json=True also reports small, medium and large-object mAP through faster-coco-eval. For COCO validation, its docs say the additional metrics come from the COCO evaluation script.
It also helps to know what training optimises. The Ultralytics metrics code weights fitness as 0, 0, 0 and 1 across precision, recall, [email protected] and [email protected]:0.95. The fitness score therefore follows the 50-95 score alone. Our view is that any number leaving the training team (in a model comparison, a supplier claim or a validation report) should come from pycocotools with the cap and confidence settings written next to it. The Ultralytics figure is fine for tracking a run but should not be compared against a paper.
Why a High COCO mAP Can Still Miss the Edge Cases That Matter in Production
This part is a judgement rather than a finding. Our view is that COCO mAP is a good ranking signal on COCO-like data and a weak acceptance criterion anywhere else, for the reasons below. Hoiem and colleagues warned at ECCV 2012 about relying on overall benchmarks to measure progress, noting that large improvements in one aspect of recognition may yield small overall gains and go unnoticed without further analysis. The reverse also holds: a large failure in one aspect can sit inside a respectable average.
Small objects. A model can score close to zero on small objects and still post an acceptable overall mAP if it does well on medium and large ones. That matters most where the critical targets are distant or tiny, such as people at range in surveillance footage. AP-small is the number that exposes it.
Rare classes. mAP gives every class equal weight, so a model that effectively ignores a handful of rare categories can still look respectable overall. Per-class AP then shows a cluster of high scores and a cluster near zero. How to read that distribution for a particular dataset is a separate question from how the score is built.
Mixed error types. The single number lumps together missed detections, false alarms, misclassifications and poor localisation, so two models with the same mAP can fail in very different ways. TIDE (Bolya et al., 2020) splits detection errors into six types (classification, localisation, both, duplicate, background and missed) and isolates how much each one costs in overall performance. It runs directly on prediction files, so it can stand in for the standard mAP computation.
Low-confidence leakage. The symptom is an [email protected] that looks suspiciously high next to [email protected], and a model that produces many false positives once deployed at a working threshold such as 0.3. Picking that operating threshold is a deployment decision, separate from the score you report.
COCO gains that do not transfer. In the Roboflow100-VL study, YOLOv11 outperformed YOLOv8 on COCO but performed about the same across nano, small and medium sizes on a benchmark with half as many images and more than seven times as many classes. The authors read this as a sign that newer YOLO models may be overfitting to COCO. They also found that averaging mAP across many datasets gives a less noisy, more stable estimate than a single dataset. The same caution applies when comparing detector families by their COCO numbers, as in the trade-off between RT-DETR and YOLO for production inspection pipelines.
What mAP never measures. mAP is computed offline, so it says nothing about latency, throughput or real-time capability. A review of probabilistic object detection points out that mAP ignores predictive uncertainty. Two detectors whose boxes have the same means but very different covariances get the same mAP. The same review notes that mAP ignores ambiguity in ground-truth labels and is not a proper scoring rule.
Checklist for Reading a Reported mAP
- Which protocol: COCO 0.50:0.95, VOC 0.5, or a single threshold such as 0.75?
- Which evaluator: pycocotools or the Ultralytics built-in, given the trapezoidal-integration difference?
- What confidence threshold, NMS IoU and per-image detection cap were used?
- What are AP-small, AP-medium and AP-large, and how does AP-small compare with the headline?
- Does per-class AP show a cluster near zero?
- How large is the gap between [email protected] and [email protected]?
- Which error types dominate in a TIDE breakdown?
- Was the model evaluated on data that looks like the deployment domain, or only on COCO?
- Is there a separate latency figure measured on the target hardware?
Per-class AP matters most in safety-critical applications, where rare-class performance counts. We hold that an automotive perception validation package has to show these breakdowns beyond the headline score, as does any acceptance decision in computer vision R&D work.
The Decision Behind the Score
COCO mAP answers one narrow question well: how a detector ranks against others on COCO, under COCO’s rules. The question the score cannot answer is the one to settle before training starts. Which slice of your own evaluation set (a size band, a rare class, an error type, a latency budget) would make you reject a model even if its headline mAP went up? Once that slice is named and measured with the same evaluator every time, the headline number goes back to being a summary. It stops being the verdict.