Social Distancing and Mask Detection
The social distance checker is an opencv project in which we monitor the distances between the people and if the distance comes out to be less than the threshold value (calibrated six feet in terms of pixels) then we indicate the violation by surrounding them with a red bounding box and with the help of AI/ML/pretrained files , if the person does not wear a mask then his face gets surrounded by a red bounding box.
The Outbreak of COVID-19 has affected almost everyone across the globe. During this pandemic, people are advised not to be in close contact with others to reduce the spread of the disease, but due to the negligence of many, we continue to face the repercussions of this pandemic As the name suggests, social distancing implies that people should physically distance themselves from one another, reducing the spread of contagious diseases like COVID. So, in order to monitor if people are maintaining social distance or not, we are working on the project named, Social distance checker.
Schematic Flow Chart of Social Distancing
In this project we have used Open-cv , numpy , TensorFlow , Keras and some pre-trained model files to detect persons and their different attributes(faces etc).
OpenCV stands for open-source computer vision. It was generated to support a common infrastructure for computer vision operations and use system behaviour in financial products. It generally targets image processing, faces recognition, video capture, searching, and object disclosure.It is created to implement various operations including recognising and detecting faces, analysing human tasks in videos, identifying objects, recording camera movements, tracking moving objects, and combining images to create a high-resolution image for the accurate scene.
TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML powered applications.It is an open source machine learning framework for all developers. It is used for implementing machine learning and deep learning applications. To develop and research on fascinating ideas on artificial intelligence, Google team created TensorFlow. TensorFlow is designed in Python programming language, hence it is considered an easy to understand framework.
| Components | Cost (in INR) |
|---|---|
| Python(Pycharm IDE) | open source (None) |
| Open-cv | open source (None) |
| Numpy | open source (None) |
| Matplotlib | open source (None) |
| TensorFlow | open source (None) |
| Keras | open source (None) |
| Total Cost | 0(None) |
It is used to maintain social distancing and helps in preventing the spread of deadly communicable diseases. This can be used in office places and many other places where huge no of gatherings generally occur , so we can do it by integrating this code with cctv (means we are using cctv as our webcam) and monitor the social distancing as this app will make a red bounding box around the person who is violating the social distancing rule and if more no of violations are coming then we can warn the people (we can see no of violations on the top left corner of the output screen)
-
It fails to detect the persons when the video of one of person gets blocked by another person.
-
It fails to detect the depth between the persons due to several reasons like several times we dont know the focal length of the camera , etc..
-
As in different videos , the position of the camera is different so we have to calibrate threshold distance each time.
-
We can do the project with other softwares in the future like yolo ,better neural network ,whole project on tenserflow
-
We can integerate it with cctv to use it practically in daily life and we can use it with bird eye view method to get better results.

