Detect the social distance violations in real time using OpenCV and deep learning
Requirements
- Python
- Numpy
- OpenCV
- Scipy
- Object Detection models (Mobilenet or Googlenet or YOLO)
Steps
- Input the video stream using OpenCV
- Detect the people in the video stream using any of the object detection models
- Find the centroids of the identified people and calculate the distance between the centroids
- Check if the distance calculated above is lesser than the minimum value (in pixels) and consider it as violation
- Draw the bounding boxes in red color around the person if violating, green color box if the person is following the norms