Skip to content
Adaptive AgroTech NetworkUniversity of Southern Denmark · SDU Drone Center
Book2026
← Raspberry Pi Robotics LaboratoryChapter 37

Detect people in a saved image

InstructorDr. Redmond R. Shamshiri
AffiliationAssistant Professor of Robotics · University of Southern Denmark (SDU)
Study time35 minutes
Study companion. These editable notes, worked examples and exercises supplement the source material. They are not a verbatim video transcript or a reproduction of the book.

Study Detect people in a saved image. Use the accompanying model, numerical example and practical task to connect the topic to a measurable engineering result. Notes are original supplemental material, not a transcript.

Learning Objectives

  • Explain the role of detection metrics and operating thresholds in the engineering system.
  • Calculate the worked quantity with consistent units.
  • Design a measurement that can reveal an implementation failure.

Study guide

Original companion notes. These notes support the topic of this lesson. They are not a transcript or a claim about the exact contents, hardware settings or examples in the video.

Lesson focus: Detect people in a saved image

Test in several lighting and distance conditions and inspect the actual image used by the algorithm.

Detection metrics and operating thresholds

A detection score is not a calibrated probability of success in the field. Test on the relevant lighting, distance, crop and background. Report missed targets and false positives separately, and avoid evaluating near-duplicate frames from training footage.

Model, units and assumptions

\[Precision=\frac{TP}{TP+FP},\qquad Recall=\frac{TP}{TP+FN},\qquad IoU=\frac{|B_p\cap B_g|}{|B_p\cup B_g|}\]

TP, FP and FN depend on the matching rule, class and confidence threshold. Bp and Bg are predicted and reference bounding boxes. Specify the IoU threshold used for a true-positive match.

Worked engineering example

With 80 true positives, 20 false positives and 40 missed objects, precision is 0.80 and recall is 0.667. Raising confidence may improve precision while worsening recall.

Practical task and evidence

Apply the following procedure to the topic of this lesson: Detect people in a saved image.

  • Hold out scenes or recording sessions rather than random neighboring frames.
  • Inspect errors by lighting, distance and object size.
  • Measure acquisition-to-action latency as well as detection metrics.

Submit: a diagram or interface table, a short timestamped dataset, the calculation with units, and a paragraph explaining the largest observed limitation.

Check your understanding

Question. For TP = 45, FP = 5 and FN = 15, find precision and recall.

Show worked answer

Precision = 0.90; recall = 0.75.

Extension. Change one assumption in the model and explain which measurement would reveal that it no longer holds.

Summary

Detection metrics and operating thresholds: keep units, assumptions and timing explicit. Check the numerical model against an independent observation before using it in a larger system.

Suggested Reading & Resources

  • Reading
    Book source: Raspberry Pi Robotics Laboratory

    Primary documentation or original technical reference; check the version used in your lab.

    Open ↗
  • Reading
    OpenCV camera calibration and geometry

    Primary documentation or original technical reference; check the version used in your lab.

    Open ↗