Skip to content

A simple dashboard to monitor Social Distancing post COVID19, using Python, Computer Vision and Deep Learning

License

Notifications You must be signed in to change notification settings

sanidhy/social-distance-dashboard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Distance Dashboard - Recognize and Visualize risk

ADDITONAL PROJECT: Mask Detection and Classification [Code and Demo] enter image description here

In a world recovering from the shock of COVID-19, it has become increasingly important to practice social distancing. A deep understanding of the pandemic shows how one person's negligence can cause widespread harm which will be hard to negate. So, using Computer Vision and Deep Learning might help monitor the practice of social distancing.

Nowadays, social distancing along with other basic sanitary mesures are very important to keep the spread of the Covid-19 as slow as possible. But this project is only a proof of concept and was not made to be use to monitor social distancing in public or private areas because of ethical and privacy issues

Using a faster model in order to perform real-time social distancing analysis. Use a model more robust to occlusions. Automatic calibration is a very well known problem in Computer vision and could improve a lot the bird eye view transformation on different scenes.

The application detects people who are close by and not adhering to the distancing norms and marks them in RED bounding boxes, signifying risk. Others, are in GREEN.

The Dashboard at the right, gives a visual representation of the data. The number next to the GREEN and RED icons are the number of SAFE and RISK people. Whereas, the BLACK is the total number of people in the frame.

The Pie Chart at the top just plots the SAFE vs AT RISK persons in the frame.

Here is a demo containing the application output:

Social Distance Dashboard output in Outdoor conditions

Social Distance Dashboard output in Indoor conditions

Full output on Youtube:

Click to go to the Youtube Video Social Distance Dashboard

How to use the application:

The entire application is encapsulated in the SocialDistanceDashboard.py file, which can be run using the command:

python3 socialDistanceDashboard.py

Pre-Requisitos

  • Python3
  • yolov3.cfg
  • coco.names
  • yolov3.weights

Input file:

The input can be a video file and needs to be updated on line number 198:

filename = "videos/video_1.mp4" # Your file path here.

YOLO v3 Dependency:

YOLOv3 trained on COCO is used for person recognition and detection, I have not included the weights as a part of the repository as it is quite big (236MB). You can download it at https://pjreddie.com/media/files/yolov3.weights and add it to the folder - "yolo-coco" as a part of the repository. I have mentioned the folder path on line number 203, and can be changed.

yolopath = "yolo-coco/" # Path points to folder containing weights, cfg and names.

Concerns over such monitoring applications:

While working on this project, I started having concerns over how this kind of monitoring can be used to create spaces with no freedom, which is scary. I understand this kind of work can be used to boost authoritarianism and force suppression. I can only hope we always keep in mind the freedoms of the individual while we build a safe society.

Resources:

Object Detection using YOLO from PyImageSearch - Link to article

Input videos used for testing and development:

Outdoor videos: VIRAT Dataset

Indoor videos: Learning Recognition Surveillance Group

MIT License Social Distance Dashboard

About

A simple dashboard to monitor Social Distancing post COVID19, using Python, Computer Vision and Deep Learning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%