Robot gripper selecting a cyan block among a washer and a partly shadowed pin.

What you need

Use an independent labeled test set and a fixed matching rule, including class agreement and localization requirements.

Illustrative detector metrics. Precision: 90 percent; Recall: 81.82 percent; F1: 85.71 percent.
Illustrative detector metrics. Original Academy diagram using illustrative values; not a measured hardware result.
Read the diagram as a data table
Values used in the illustration
Condition or componentpercent
Precision90
Recall81.82
F185.71

The calculation

precision = TP / (TP + FP)
recall = TP / (TP + FN)
F1 = 2 × precision × recall / (precision + recall)

TP means matched correct detections, FP means unmatched or incorrect detections, and FN means missed ground-truth objects. Handle zero denominators explicitly.

Worked example

Illustrative numbers. Replace them with your measured inputs.

With 90 TP, 10 FP and 20 FN, precision is 0.90 and recall is 90/110 = 0.818. F1 is approximately 0.857. These are illustrative counts, not the performance of a deployed WIFA system.

Try it step by step

  1. Define detection matching and assign each prediction to at most one ground-truth object to avoid counting duplicates as successes.
  2. Sweep confidence thresholds on validation data and record the tradeoff between false targets and missed objects.
  3. Choose a threshold according to the process needs, freeze it and evaluate once on the independent test set.
  4. Inspect error examples by class, lighting and occlusion, and add a reject path for uncertain targets.

How to check the result

Keep the confusion counts and matching rule with the reported metrics. A reader should be able to reproduce every value.

Common mistake to avoid

High F1 does not prove accurate grasp coordinates or safe operation. Object detection and robot task success need separate validation.

Reference reading

Primary references for the underlying models, APIs or application context. The worked numbers and plots above are educational calculations, not results reported by these sources.

Read our methods, limitations and safety notes.