Inspiration

Our lifestyle has drastically changed during the COVID 19 pandemic. We are no longer able to go out regularly. However, the individuals who would like to safely travel to an area cannot accurately assess the risk present there. Therefore we were inspired to build a tool to help people travel while keeping sure that their health and safety is prioritized.

What it does

CRAM (COVID Risk Assessment Map) analyses live camera feed to see how safe an area is. It assesses the risk in an area based on the number of people not wearing masks or not socially distancing themselves from others. This is then displayed on a map. This is a great tool for people to have for people that leave their house so that they can ensure they will be safe wherever they travel to.

How I built it

Mask Detection: We used transfer learning and retrained the YOLOv5 model on a custom face mask dataset. The dataset was augmented by blurring and increasing/decreasing the brightness. Multiple versions of the model were trained for a total of 12 hours on Microsoft Azure.

Social distancing detection: We used YOLOv5 for person detection and used the bounding boxes for our calculations. Here we first built a robust way to internally transform the perspective of any video feed into an eagles eye view of the area using Homography and then calculated the euclidean distance between 2 individuals for a given threshold. By transforming the video feed, we can ensure that any part of the video, far or close, will always calculate social distancing with a threshold of 6 feet.

GUI: Tkinter was used to display a map and the color coded safety scores for each region.

Challenges I ran into

Mask Detection: The model took 10.5 hours to train the first time, and it performed poorly. We had to further adjust our dataset and retrain fewer layers for subsequent training sessions.

Social distancing detection: The matrix we calculated using Homography was quite difficult to fine tune.

Accomplishments that I'm proud of

Overall, our group is very proud of what we were able to accomplish. A realtime system that informs users of the safety of an area is invaluable especially when COVID cases are on the rise. We were able to achieve both the mask detection and social distancing detection features, which is what we envisioned at the start.

What I learned

We learned a lot about dataset preprocessing, in addition to getting exposure to Microsoft Azure. Furthermore, we gained experience with tkinter and creating GUIs.

What's next for CRAM

In the future, we plan to make our mask detector more accurate by spending more time on fine tuning our algorithm. We also plan to let the user move the map around, so that they have a wider variety of cameras to choose from instead of one specific location.

Privacy Concerns

For a real system, users wouldn't be allowed to access camera footage. Instead, they would have access to metrics such as the percentage of people socially distancing and wearing a mask. We only included the publicly available camera streams for demo purposes.

Built With

Share this project:

Updates