We were inspired by COVID-19 forcing us all to stay apart and the knowledge that this distance was ultimately critical to our health. Indeed, Dr. Mark Newman of UK found that social distancing saved and will continue to save numerous lives throughout the pandemic. Because we care deeply about that, we built this detector.

What it does

Our project takes direct input from a camera attached to a raspberry pi, feeds the stream of images into an OpenCV integrated YOLO3 image detector, and highlights which people are socially distanced and which are too close together.

How we built it

We first built a YOLO3 image detector. We then got that to work with the video feed from a raspberry pi and tell us the type of object displayed in the video and isolated just the people. Following that, we used certain reference points and known distances in the frame to scale pixels to feet depending on a given objects distance from the camera and figure out which 'people' rectangles were adequately distanced. We then livestreamed the feed of the video with the accurate distancing detection to a locally hosted HTML page.

Challenges we ran into

One challenge was building the YOLO3 image detector, but by far the biggest challenge was getting the distance measurement to work. Mapping pixels to feet dynamically, with a different measurement for any pixel in the frame was incredibly difficult.

Accomplishments that we're proud of

We're most proud of two things: first, getting the distance dtection to work, and second, getting the raspberry pi to feed into the python programs.

What we learned

We learned how to build a YOLO3 image detector, how to get distances between objects dynamically in an image, and how to stream a raspberry pi's images onto a webpage and run Python ML operations on it.

What's next for Distance Monitor

We next want to implement mask detection to figure out which individuals are masked, and a feature where the faces of vaccinated users is learned by a convolutional neural network and ignored in the algorithm as per CDC guidelines.

Built With

Share this project: