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.
- Clone and download the repo
git clone <this_repo_url>
-
Then download the YOLOv3 weights from this link and store it in the yolov3 folder as yolov3.weights
-
Download the required python packages
pip install -r requirements.txt
- Run the main.py file
python main.py
Output video
- 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.
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