Average Precision and Mean Average Precision
Connect precision–recall curves to AP and mAP, then compare AP50, AP75, and COCO’s averaged overlap thresholds.
Average Precision and Mean Average Precision explained visually
Connect precision–recall curves to AP and mAP, then compare AP50, AP75, and COCO’s averaged overlap thresholds.
What you will learn
Locate objects, represent boxes, filter predictions, evaluate detections, and compare detector designs.
Build a precision–recall curve and AP
A model report says mean average precision is sixty. Another report says eighty. Before we decide that the second detector is better, we need to know what those numbers actually measure.
In the previous lesson, we measured precision and recall at one confidence threshold. Average precision looks across a sequence of thresholds instead.
For one object class, we rank predictions by confidence. As we accept more predictions, we calculate precision and recall under a fixed matching rule. This produces a precision-recall curve.
Average precision summarizes that curve. A detector earns a stronger result when it finds more reference objects while keeping false alarms low. The exact interpolation and averaging procedure depends on the evaluation protocol.
Average results across object classes
Mean average precision then averages the class results. If one class has an average precision of zero point eight and another has zero point six, their unweighted mean is zero point seven, or seventy percent.
That example is deliberately simple. Real benchmark reports can average over more than just classes.
Distinguish AP50, AP75, and COCO averaging
For example, a score labeled A P fifty uses an intersection over union threshold of zero point five. A P seventy-five uses zero point seven five, requiring tighter box alignment.
The main C O C O detection score averages results over ten overlap thresholds, from zero point five to zero point nine five, in steps of zero point zero five. It therefore asks the detector to perform well under both looser and stricter localization requirements.
This is why we should not compare a score measured at one overlap threshold with a score averaged across that full range as if they were the same test.
Compare protocols and deployment conditions
Check the dataset, classes, evaluation settings, and score definition. Also remember that a higher detection score says nothing by itself about speed, memory use, or performance on your own camera images.
Next, we’ll look at two major detection designs and connect these evaluation ideas to how detectors work.
Quick check: test your understanding
What is the unweighted mean of class AP values 0.80 and 0.60?
(0.80 + 0.60) / 2 = 0.70.
Do AP50 and AP75 use the same IoU matching threshold?
No. They use 0.50 and 0.75 respectively.
What overlap thresholds contribute to the main COCO detection score?
Ten thresholds: 0.50 through 0.95 in steps of 0.05.
Accessible referenceLesson 69 transcript317 words · Matches the published narration and captionsOpen transcript
A model report says mean average precision is sixty. Another report says eighty. Before we decide that the second detector is better, we need to know what those numbers actually measure.
In the previous lesson, we measured precision and recall at one confidence threshold. Average precision looks across a sequence of thresholds instead.
For one object class, we rank predictions by confidence. As we accept more predictions, we calculate precision and recall under a fixed matching rule. This produces a precision-recall curve.
Average precision summarizes that curve. A detector earns a stronger result when it finds more reference objects while keeping false alarms low. The exact interpolation and averaging procedure depends on the evaluation protocol.
Mean average precision then averages the class results. If one class has an average precision of zero point eight and another has zero point six, their unweighted mean is zero point seven, or seventy percent.
That example is deliberately simple. Real benchmark reports can average over more than just classes.
For example, a score labeled A P fifty uses an intersection over union threshold of zero point five. A P seventy-five uses zero point seven five, requiring tighter box alignment.
The main C O C O detection score averages results over ten overlap thresholds, from zero point five to zero point nine five, in steps of zero point zero five. It therefore asks the detector to perform well under both looser and stricter localization requirements.
This is why we should not compare a score measured at one overlap threshold with a score averaged across that full range as if they were the same test.
Check the dataset, classes, evaluation settings, and score definition. Also remember that a higher detection score says nothing by itself about speed, memory use, or performance on your own camera images.
Next, we’ll look at two major detection designs and connect these evaluation ideas to how detectors work.