To check whether if people are following social distancing precautions within a crowd using computer vision technologies
- Object detection using the YOLO COCO model to detect only people in the video stream.
- Computes the distances between all detected people in the bounding boxes.
- Based on the computed distances, we determine whether social distancing rule or precaution is being violated or not.
- Clone the repo
$ git clone https://github.com/Noel6161131110/Social-Distancing-Detector.git
$ cd Social-Distancing-Detector
- Install dependencies
$ pip install -r requirements.txt
- Run the main social distancing detector file. (set display to 1 if you want to see output video as processing occurs)
$ python social_distancing_detector.py --input pedestrians.mp4 --output output.avi --display 1
[Caution: The output video stream will not be accurate if you display as processing occurs]