Skip to content

This tool has four features, which are detecting humans in the frame using deep learning algorithms (faster-rcnn and yolo), calculating the distance between every human who is detected in the frame (scale factor and homography), showing how many people are at high, low and not at risk and generating notifications to warn if anyone is found viola…

Notifications You must be signed in to change notification settings

YassirMatrane/EnforcingSocialDistancingThroughComputerVision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

covid-social-distancing-detection

This project is a social distancing detector implemented in Python with OpenCV and Tensorflow.

Installation

OpenCV

If you are working under a Linux distribution or a MacOS, use this tutorial from Adrian Rosebrock to install this library.

Other requirements

All the other requirements can be installed via the command :

pip install -r requirements.txt

Run project

Calibrate

Run

python calibrate_with_mouse.py

From this file, we apply our manual calibration to draw ROI and distance scale from the first frame by the “setMouseCallback” function of OpenCV.

You will be asked as input the name of the video and the size of the frame you want to work with. You must use the actual size of your frame !

You will be also asked as inputs :

  • The distance in centimers between 2 persons in horizontal and vertical direction

Note : It is important to start with the top right corner, than the bottom right, then bottom left, than end by top left corner !

You can add any video to the video folder and work with that.

Start social distancing detection

Run

python social_distanciation_video_detection.py

About

This tool has four features, which are detecting humans in the frame using deep learning algorithms (faster-rcnn and yolo), calculating the distance between every human who is detected in the frame (scale factor and homography), showing how many people are at high, low and not at risk and generating notifications to warn if anyone is found viola…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages