Count false alarms and missed objects
Choose a threshold using held-out examples and report false alarms, missed objects, and localization errors.
Opening the Python editor…
Requirements and learning goals
Before you start
- The Wendy starter project from the YOLO walkthrough
- Saved model predictions
- A labeled image set
You will be able to
- Calculate precision and recall
- Avoid evaluation leakage
- Evaluate world-position usefulness
The browser exercise above works without extra setup. The project brief below assumes the listed prerequisites and gives you a task and checks to perform. Need a guided first project?
A detector can draw convincing boxes and still miss the object your demo needs. Evaluation measures those mistakes on labeled examples, so you can choose a based on evidence. Here you will count false alarms and misses, then check whether accepted detections are accurate enough for the next task.
Capture difficult inputs as failure episodes and add them to a held-out evaluation set rather than judging only the live demo scene.
Define a match before scoring
For a simple exercise, match a predicted box to one ground-truth object of the same class when overlap exceeds your chosen threshold. Match each object once. Duplicate predictions count as false positives.
Suppose twelve targets produce eight correct detections, two false positives, and four misses. Save this as evaluate_counts.py beside detect.py in the starter project:
tp, fp, fn = 8, 2, 4
precision = tp / (tp + fp)
recall = tp / (tp + fn)
print(round(precision, 3), round(recall, 3))
# 0.8 0.667Stop the previous attached run with Ctrl+C and deploy the calculation to the same target:
wendy run --env LESSON_SCRIPT=evaluate_counts.pyExpect 0.8 0.667 in the Wendy logs and in run.log on the app's results page. These example counts explain the arithmetic. Replace them with your independently matched predictions and labels to evaluate your detector.
Precision measures correctness among predictions; recall measures coverage of actual objects. See the metrics reference for overlap and average precision.
Keep evaluation independent
Split by session or scene, not neighboring video frames. Choose thresholds on validation data, then report the chosen configuration on untouched test data. Include empty scenes and similar-looking distractors.
List missed objects and incorrect predictions alongside the numbers. The construction drone demo documents renderer-domain evaluation and abstention. Simulated image results do not establish real-site performance.
Test the downstream task
A correct image box can still yield a poor navigation target. Measure world-position error against independently surveyed targets. Keep ground-truth positions exclusively in the scoring tool. Count rejected localizations too.
Common snag: reporting accuracy only on easy accepted cases. Report failures and abstention alongside successful predictions.
Finish with the selected threshold, a fixed dataset, an error table, and annotated failures. Optional extension: capture a new lighting session and evaluate without retuning on it.
Before you move on
Can you do each of these?
- Calculate precision and recall
- Avoid evaluation leakage
- Evaluate world-position usefulness
0 of 2 checkpoints solved. Try checkpoint 1