Formulas
precision = TP ÷ (TP + FP)recall = TP ÷ (TP + FN)A detection example
A validation set has 80 labeled defects. The detector outputs 70 boxes; 56 of them match a defect at the chosen IoU threshold and 14 match nothing.
- Precision = 56 ÷ 70 = 0.80: four in five alarms are real.
- Recall = 56 ÷ 80 = 0.70: three in ten defects slip through.
The threshold trade-off
Lowering the confidence threshold lets more boxes through: recall rises and precision usually falls. Plotting both over every threshold gives the precision-recall curve, and the area under it is average precision, the basis of mAP. Which side to favor is a product decision. Safety inspection can tolerate false alarms that a person dismisses, but not misses. Automatic tagging that nobody reviews needs high precision.
Pitfalls
- Duplicate boxes on one object: only one can match, the rest are false positives, which is why non-maximum suppression matters.
- Precision is undefined when a model predicts nothing; reports handle that case differently.
- Missing labels in the ground truth turn correct detections into false positives and make precision look worse than it is.
- One global pair hides classes: a model can have high overall recall and still miss most of a rare class.
Where to see them in Supervisely
The evaluation report gives precision, recall and their curves for the whole model and for each class. A bar of missed objects opens the exact images where they were missed, which is often the fastest way to learn whether a low recall comes from the model or from the labels.