Precision and recall

Precision is the share of a model's predictions that are correct, and recall is the share of the true objects or positives that the model finds. Together they describe the two ways a model fails: false alarms and misses. In Supervisely, the evaluation report gives precision and recall, with their curves, for the whole model and each class.

Metrics

Formulas

precision = TP ÷ (TP + FP)recall = TP ÷ (TP + FN)
TP: correct predictions. FP: predictions with no matching true object. FN: true objects the model missed.

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.

Frequently asked questions.

What is the difference between precision and recall?

Precision is the share of a model's predictions that are correct; recall is the share of the true objects the model finds. Low precision means false alarms, low recall means misses.

Why do precision and recall 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, the basis of mAP.