It is a python script enabling user to ensure social distancing from a video input. Here a pre-recorded video is given as an input and number of people in a frame and distance between them is calculated using Computer Vision and Digital Image Processing.
The script given one of the best solution for video captured from a single camera, reducing the problem of capturing video from multiple perspective for 3D depth. It uses Digital Image processing to transform the given perspective video feed to 2D for better tracking.
A ROI (Region Of Interest) is to be selected where we want to check social distancing is maintained or not. This script is currently taking a pre-recorded video as input but we can tweak the code to make it work with live camera feed of a device.
Download the files from repository and run the main.py file, 2 basic input videos are provided with the files in the "data" folder but you can change the input video by placing desired video file in "data" folder and changing the video file name in main.py