Understanding Precision, Recall, and the Precision Recall Curve
Precision and recall are the fundamental metrics for understanding detection system behavior. These metrics reveal different failure modes and help you choose the right operating point for your specific use case.
📐 PRECISION: HOW ACCURATE ARE YOUR DETECTIONS?
Precision answers: "Of all the boxes my model drew, how many actually contained objects?"
Precision = True Positives / (True Positives + False Positives)
A model with 90% precision means 9 out of 10 detections are correct. The remaining 10% are false alarms - boxes drawn where no object exists. Low precision creates noise: users see phantom detections everywhere, downstream systems waste resources processing fake objects.
🎯 RECALL: HOW COMPLETE IS YOUR COVERAGE?
Recall answers: "Of all the real objects in the image, how many did my model find?"
Recall = True Positives / (True Positives + False Negatives)
A model with 80% recall finds 8 out of 10 actual objects. The missing 20% are objects the model completely missed. Low recall means safety gaps: obstacles go undetected, defects slip past inspection, critical information gets lost.
⚖️ THE PRECISION-RECALL TRADE-OFF
Every detection model outputs confidence scores. By changing your confidence threshold, you trade precision for recall:
- High threshold (0.9): Only keep very confident detections. Precision goes up (fewer false positives), recall goes down (more missed objects)
- Low threshold (0.3): Keep uncertain detections too. Recall goes up (find more objects), precision goes down (more false alarms)
📈 READING THE PR CURVE
The Precision-Recall curve plots precision (y-axis) against recall (x-axis) as you sweep through all confidence thresholds. A perfect model hugs the top-right corner (100% precision at 100% recall). Real models show a downward slope - gaining recall costs precision.
The curve shape tells you about model quality. A curve that stays high before dropping indicates a model with good discrimination - it finds most true positives before false positives start appearing. A curve that drops immediately suggests the model struggles to separate real objects from background.