SmartVision is a social distancing detector implemented in Python with OpenCV and Tensorflow.
Take a peek at the backend program in work 😊
pip install opencv-contrib-pythonAll the other requirements can be installed via the command :
pip install -r requirements.txtDownload the faster_rcnn_inception_resnet_v2_atrous_coco model from Tensorflow by clicking here. Just download all the models you want to try out, put them in the models folder and unzip them. For example :
tar -xvzf faster_rcnn_inception_v2_coco_2018_01_28.tar.gzRun
python calibrate_with_mouse.pyYou will be asked as input the name of the video and the size of the frame you want to work with. Note : It is important to start with the top right corner, than the bottom right, then bottom left, than end by top left corner ! You can add any video to the video folder and work with that.
Run
python social_distanciation_video_detection.pyYou will be asked as inputs :
- The tensorflow model you want to use. Enter digit from shown options.
- The name of the video. Enter digit from shown options.
- The distance (in pixels between 2 persons).
Both video outputs (normal frame and bird eye view) will be stored in the outputs file.
