Say your validation table ends with mAP50 at 0.91 and mAP50-95 at 0.62. Is that good? The honest answer is: it depends, but those two numbers side by side already say something. This guide shows how to read YOLO mAP, and the numbers around it, in the order that saves the most time.
We lean on the official Ultralytics docs and a Roboflow explainer for the facts, and we add a few rules of thumb on top. By the end you will know which number to trust for your use case, why the confusion matrix can look “wrong”, and what to fix first when a result is weak.
In this article
- What the YOLO mAP table actually shows
- How IoU decides what counts as correct
- mAP50 vs mAP50-95: which one to trust
- Precision, recall and the confidence trap
- Reading the confusion matrix without being fooled
- Symptom table: what to fix first
- Find errors image by image
- Our take: pick the metric by the cost of a mistake
- FAQ
- Final thoughts
What the YOLO mAP table actually shows
After training, Ultralytics prints a table from validation. Each row is a class, plus one row called all. The columns are Images, Instances, and a block called Box(P, R, mAP50, mAP50-95).
Two details trip people up. First, the mAP columns in a class row are really the AP of that single class. The all row is the mean over the classes that have labels. The Ultralytics metrics guide says this directly. Second, the Instances column tells you how many labeled objects each class has in the validation set. A class with a handful of instances gives a noisy score, so do not over-read it.
So the first habit is simple. Look at the per-class rows before you look at the all row. A good average can hide one weak class.
How IoU decides what counts as correct
Every YOLO mAP number starts with IoU, short for intersection over union. It measures how much a predicted box overlaps the ground-truth box. A score of 1 is a perfect match and 0 is no overlap.
The IoU threshold is the minimum overlap for a prediction to count as correct. Below it, the prediction counts as a false positive, even if the object and class are right.
Here is a small example with made-up numbers, just to show the arithmetic. Your label box is 100 by 100 pixels, so its area is 10,000. The model predicts a box of the same size, shifted 20 pixels to the right. The overlap is 80 by 100, which is 8,000. The union is 10,000 + 10,000 – 8,000 = 12,000. So IoU is 8,000 / 12,000, about 0.67.
That box passes thresholds 0.50, 0.55, 0.60 and 0.65. It fails 0.70 and everything above. A 20-pixel drift looks harmless to the eye, yet it already loses four of the ten strict thresholds. Keep this picture in mind for the next section.
mAP50 vs mAP50-95: which one to trust
mAP50 scores detections at one IoU threshold, 0.50. mAP50-95 averages the score over ten thresholds, from 0.50 to 0.95 in steps of 0.05. Roboflow’s explainer lists all ten, and it notes that the average is usually lower because stricter thresholds turn some earlier hits into misses.
Use them for different questions:
- mAP50 answers: does the model find the object, roughly in the right place?
- mAP50-95 answers: does it also place the box tightly, again and again?
The gap between them is a free diagnostic. Ultralytics describes the case where mAP50 and recall look fine but mAP50-95 is much lower. The model finds objects but does not place the boxes precisely. In our 0.91 versus 0.62 example, that is the first thing we would suspect.
There are also mAP75, which uses a threshold of 0.75, and size-based scores for small, medium and large objects. In the COCO convention that Roboflow describes, small means a box area under 1,024 square pixels and large means over 9,216. If your weak spot is tiny objects, our guide on small object detection with YOLO and tiling goes deeper.
Precision, recall and the confidence trap
Precision asks: of everything the model detected, how much was right? Recall asks: of everything really there, how much did the model find? A higher confidence threshold usually raises precision and lowers recall. A lower one does the opposite.
Roboflow gives a neat example. Suppose a model makes four car predictions with confidence 0.95, 0.85, 0.65 and 0.40. At a threshold of 0.80, only the first two are kept. At 0.50, the third joins them. Same model, different results.
Now the trap. The P and R in your validation table are not measured at the confidence you plan to deploy with. The Ultralytics docs explain that they are reported at the confidence that maximizes the smoothed, class-averaged F1 curve, with matching at IoU 0.50. For YOLO26n on COCO that point is about 0.20. They are also not measured at the conf value you pass to model.val().
Meanwhile, mAP uses the whole precision-recall curve. That curve needs low-confidence predictions, so validation runs with a very low default conf of 0.001. If you raise it, mAP falls. The docs show YOLO26n on COCO dropping from 0.402 mAP50-95 at the default to 0.336 at conf=0.25.
What this means in practice: do not change conf to “see real-world numbers” and then compare the new mAP with an older run. Keep one validation run at defaults for mAP. Make a separate run at your deployment conf for error counts.
Reading the confusion matrix without being fooled
Ultralytics saves confusion_matrix.png and a normalized version. Correct detections sit on the diagonal. Confusions between classes sit off it. Object detection has no true negatives, so there is a background column for detections that match no object and a background row for missed objects.
The normalized matrix divides each column, which is a true class, by its total. So read down a column to see how the objects of one true class were predicted. This differs from the default in some other tools, which normalize by row, so check before you compare plots across libraries.
Here is the surprise. The matrix counts detections above the validation conf, which is 0.001 by default. At that setting a huge number of weak boxes land in the background column. The docs give an example: for YOLO26n on COCO, precision pooled from the matrix is 0.039 at the default conf, against 0.66 in the results table. At conf=0.25 the two are much closer, 0.733 from the matrix and 0.698 in the table.
So if the matrix makes your model look terrible, check the conf first. It may not be the model.
Symptom table: what to fix first
Use this as a quick lookup. The first four rows follow the interpretation guidance in the Ultralytics docs. The last two are our additions.
| What you see | Likely meaning | Try first |
|---|---|---|
| Recall fine, precision low | Too many wrong detections | Raise the prediction confidence; accept a small recall drop |
| Precision high, recall low | Real objects are being missed | More data or better features; look at small objects |
| mAP50 fine, mAP50-95 much lower | Boxes are loose | Review how consistently boxes were drawn |
| One class far below the rest | That class is harder or rarer | Add examples; consider the cls_pw training argument |
| High precision but “random” false alarms | Possibly unlabeled objects in the validation set | Open the false positives and check the labels |
| Training loss keeps falling, validation mAP stalls | Possible overfitting | Stop earlier, add augmentation or data, try a smaller model |
Loose boxes often come from inconsistent labeling, not from the model. If that sounds familiar, our post on bounding box vs polygon annotation shows when a tighter shape is worth the extra effort.
Find errors image by image
Aggregate scores tell you that something is wrong. Single images tell you what. Ultralytics keeps per-image precision, recall, F1, and counts of true positives, false positives and false negatives at IoU 0.5. You can rank images worst-first and open the bad ones.
from ultralytics import YOLO
model = YOLO("path/to/best.pt")
# Validate at the confidence you plan to deploy with,
# and save a TP/FP/FN picture for each image.
results = model.val(data="path/to/data.yaml", conf=0.25, visualize=True)
# Sort images from lowest F1 to highest
worst = sorted(results.box.image_metrics.items(), key=lambda kv: kv[1]["f1"])
for name, m in worst[:20]:
print(name, "F1:", round(m["f1"], 2), "TP:", m["tp"], "FP:", m["fp"], "FN:", m["fn"])
For each of the twenty images, ask one question: is this a model error or a label error? A missing, wrong or badly placed label can make a correct prediction look like a mistake. The Ultralytics guide gives two sensible rules. Fix a label only when it breaks your written annotation guidelines, never just because the model disagrees. And keep a test split you do not touch during this review, so you can check that the fixes really help.
If this review shows that labels are the weak link and you do not have time to redo them, a data annotation service such as Annotationera can label images for you. Either way, write your guidelines down first.
Our take: pick the metric by the cost of a mistake
Many guides stop at definitions. We think the useful question is what a wrong answer costs in your project. This is our opinion, built on the metric descriptions above, not a rule from the docs.
- A false alarm is expensive (for example, rejecting a good product): watch precision at your deployment confidence, and lean toward a higher threshold.
- A miss is expensive (for example, a defect reaching a customer): watch recall, and lean toward a lower threshold with a human check behind it.
- The box feeds another step (measuring, cropping for reading text): watch mAP50-95 or mAP75.
- You only need to know whether something is present: mAP50 is usually enough.
Practical tip: a five-step reading order
- Check the per-class rows and the Instances column.
- Compare mAP50 with mAP50-95 to judge box tightness.
- Open the F1, precision and recall curves and pick a confidence for your cost of error.
- Run validation again at that confidence and rank images worst-first.
- Sort each bad image into model error or label error, then act.
Common mistakes and their fixes
- Comparing runs from different package versions. The docs note that since
ultralytics 8.4.219the AP calculation samples the curve at 101 recall points, so the same weights can score a little higher or lower than before. Compare runs made with the same version. - Raising
confin validation and reporting the lower mAP. Use the default for mAP and a separate run for deployment numbers. - Editing validation labels until the score goes up. That measures your editing, not your model. Keep a frozen test split.
If you are still choosing a model, see YOLO26 vs YOLO11. More guides like this live in our Computer Vision category.
FAQ
What is a good YOLO mAP score?
There is no universal number. Scores depend on how hard your dataset is and what mistakes cost you. As a reference point, the Ultralytics docs report 0.402 mAP50-95 for YOLO26n on COCO at the default setting. A factory dataset with one clean object type can score far higher without being “better”. Compare against your own baseline on the same split.
Why is mAP50-95 lower than mAP50?
It averages ten IoU thresholds, and the stricter ones reject boxes that were fine at 0.50. A big gap points to loose boxes, either from the model or from inconsistent labels.
Why do precision and recall differ between the table and the confusion matrix?
The table uses the confidence that maximizes the smoothed F1 curve. The matrix counts detections above the validation conf, 0.001 by default, and matches boxes regardless of class when pooled. Set the same conf for both if you want them to agree more closely.
Is the per-class mAP really mAP?
Strictly, it is the AP of that class. The all row is the mean across classes. The Ultralytics maintainers have confirmed this in the docs discussion.
Which confidence threshold should I deploy with?
Open BoxF1_curve.png, BoxP_curve.png and BoxR_curve.png. The F1 peak is a balanced starting point. Move higher if false alarms cost more, lower if misses cost more. Then test on images the model has never seen.
How do I read these numbers in Python?
After results = model.val(...), use results.box.map for mAP50-95, results.box.map50 for mAP50, results.box.map75 for mAP75, results.box.mp and results.box.mr for mean precision and recall, and results.box.maps for per-class values. See the Ultralytics evaluation guide for the full list.
Final thoughts
YOLO mAP is a summary, and summaries hide detail. Read the per-class rows, compare mAP50 with mAP50-95, choose a confidence that fits your cost of error, then open the worst images. That small routine tells you more than any single score.
Sources: Ultralytics, YOLO Performance Metrics; Ultralytics, Model Evaluation and Fine-Tuning; Roboflow, mAP@0.5 vs mAP@0.5:0.95.
