Skip to content

Basic implementation of a social distance violation detection on any generic video using faster_rcnn from Facebook's Detectron2 and incorporating depth estimation from monodepth2 for more accurate results.

Notifications You must be signed in to change notification settings

Luxonis-Brandon/social-distance-tool-with-depth

 
 

Repository files navigation

Social Distance Tool with depth

example input output gif


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.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

About

Basic implementation of a social distance violation detection on any generic video using faster_rcnn from Facebook's Detectron2 and incorporating depth estimation from monodepth2 for more accurate results.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 77.3%
  • Python 21.9%
  • Shell 0.8%