This tool combines two algorithms to accurately detect people who are violating the social distancing protocol:
- Facebook/Detectron2 (Faster RCNN implementation)
https://github.com/facebookresearch/detectron2
- "Digging into Self-Supervised Monocular Depth Prediction"
https://github.com/nianticlabs/monodepth2
Starter code taken from an excellent tutorial from Aravind Pai:
https://www.analyticsvidhya.com/blog/2020/05/social-distancing-detection-tool-deep-learning/
Use:
Social-Distance-Tool-with-Depth.ipynb
Libraries needed:
- Detectron2 = 0.13
- OpenCV >= 3
- Matplotlib
- tqdm
- pytorch = 1.4
- torchvision = 0.4
Input:
- A video sequence
Output:
- bounding boxes on all persons detected in the video
- highlighing people who are in close proximity
- depth map for accurate calculations
This code is for non-commercial use.
This work is licensed under a Creative Commons Attribution 4.0 International License.