Count false alarms and missed objects

Choose a threshold using held-out examples and report false alarms, missed objects, and localization errors.

Exercise brief·Intermediate·3 min read

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.667

Stop the previous attached run with Ctrl+C and deploy the calculation to the same target:

wendy run --env LESSON_SCRIPT=evaluate_counts.py

Expect 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.

Checkpoint 1 of 2

A scene has 10 real objects. The detector reports 8 boxes: 6 match real objects and 2 do not. What are precision and recall?

Commit to an answer. Every choice explains itself.

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.

Checkpoint 2 of 2

You record one video of your demo scene, then put even-numbered frames in the training set and odd-numbered frames in the test set. What is wrong with this evaluation?

Commit to an answer. Every choice explains itself.

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.

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

Speech and camera projects

Ask Wendy

Answers about Wendy and WendyOS

What would you like to know?

Ask about devices, development, and deployment.

Check linked docs for technical details.