Inspiration

Given that we have been in the COVID-19 pandemic for nearly a year, many people slowly began to struggle to continue maintaining the habit of social distancing in public. As the number of cases continues to remain high and the virus continues to pose a major threat to our society, it is imperative that we continue to take the necessary precautions to halt the spread of COVID. We believe that an application that can virtually detect if people are properly socially distancing can help individuals become aware of their new subconscious habits, and potentially be used in law enforcement to better enforce recent federal mandates that have been placed.

As college students, we have been indirectly impacted by this pandemic, and have struggled all year long to foster new connections with other students. Yet we are fortunate to be worrying about these issues, as many others have been directly impacted by this pandemic in much more serious ways, whether it is being laid off, being unable to pay rent, or losing a loved one. We want nothing but to return to a world where we can be with our friends and coworkers without having to worry about our own safety, but in order for that to happen we must deal with the reality we live in.

What it does

Mobile Distancing takes two pictures taken from a stereo camera or equivalent and calculates the distance between people in the images through a 3D modeling algorithm. It then detects which people are properly social distancing and displays those who are not.

How we built it

We used Python's OpenCV library in order to detect people in the images that we took. Once the people were identified, we incorporated our own modeling algorithm that included depth perception calculations and trigonometry to calculate the 3D coordinates of human subjects from the pair of photos taken by two cameras that were set slightly apart from each other. Using those numbers, we detected the people that were properly distanced, and those that were not, before displaying those who were not properly distanced by drawing a red box around them.

Challenges we ran into

Our team chose to use two pictures taken from the perspective of a stereo camera because of the lack of depth perception with the use of just one photo. Despite it being unrealistic to expect surveillance cameras or even regular phone cameras to have such technology, we decided that the increased accuracy in distance calculations was well worth the need for taking two photos side-by-side. Furthermore, we had concerns regarding the consistency of the OpenCV object detection but fixed it by choosing to detect the face of a person instead of their entire body.

Accomplishments that we're proud of

We are proud to have learned and implemented computer vision through OpenCV into our program after learning it for the first time and to have created a project that we believe has a real-world implementation.

What we learned

Our team had two goals for HackSC. We wanted to learn something new and build something really cool. We are glad to have accomplished both by learning the basics of computer vision, a topic we both found fascinating, as well as designing a project that we are proud of.

What's next for Social Distancing Detector

Mobile Distancing hopes to extend the applications of this project to video recordings, as well as incorporate it into a UI where the product could easily be opened and used as a mobile app. We aim to make this product have an impact on the way that we interact with one another throughout the remainder of this pandemic, with hopes of returning to an environment where we feel safe.

Built With

Share this project:

Updates