Social distancing monitoring robot
Raspberry Pi robot that detects people with YOLO and flags distance violations in real time.
- computer vision
- embedded
- robotics
Problem
Watch a physical space, detect people in real time, and flag when they're too close together, with a physical response (alert, camera repositioning) rather than just a software log. Engineering design project, Kocaeli University, 2021.
Approach
Ran YOLOv3-tiny person detection on a Raspberry Pi via OpenCV's DNN module, computed pairwise centroid distances between every pair of detected people each frame, and flagged pairs under a distance threshold with red bounding boxes. A stepper motor swept the camera mount to widen coverage, a buzzer sounded on violations, and flagged frames got pushed to a small web dashboard over an API.
Result
Ran real detection sessions on actual hardware, 17 recorded sessions with flagged violation frames and session video, proving the pipeline worked end to end: detection, distance logic, physical alert, and remote logging, not just a notebook demo.
What I'd do differently
The distance threshold works in pixel space, not real-world distance, so it's sensitive to camera angle and subject distance from the lens. A proper version would calibrate pixel distance against camera intrinsics or a known reference object. Also found a hardcoded FTP credential in the original upload code while preparing this for publishing, moved it to environment variables, a good reminder that old project code needs a security pass before it goes public, not just a cleanup pass.