Skip to content

sherwyn11/Social-Distancing-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Distancing Analyzer

Overview

Social distancing is deliberately increasing the physical space between people to avoid spreading illness. Staying at least six feet away from other people lessens your chances of catching COVID-19. This project uses OpenCV and YOLO to monitor/analyze whether people are maintaining social distancing or not.

  • This project uses YOLO for object detection.
  • Once the objects(people) are detected it then draws a bounding box around them.
  • Using the centroid of the boxes we then measure the distances between them.
  • For the distance measure, Euclidean Distance was used.
  • A box is colored RED if unsafe and GREEN if safe.

Getting started

  1. Clone and download the repo
  git clone <this_repo_url>
  1. Then download the YOLOv3 weights from this link and store it in the yolov3 folder as yolov3.weights

  2. Download the required python packages

pip install -r requirements.txt
  1. Run the main.py file
python main.py

Demo

Output video

Limitations and Future Scope

  • This project does not take into account the camera perspective.
  • It does not leverage a proper camera calibration (Distances are not measure accurate).

 Will work on these limitations.

References

License

License: MIT

MIT License Link

Also, do give my medium article a read! Click Here

PS: This is my first OpenCV project. Will work on more in the future.

PPS: Stay Home and Stay Safe!😊


© Sherwyn D'souza 2020