Covid-19 Social Distancing Detector Approach:



Made By:

Basile Roth



We all are very much aware of the infamous corona virus and it's widespread growth that took millions of lives across the world and still, its spread is continuously increasing day by day. In such a time, it is very much important to follow social distancing to make ourselves and this world free from this pandemic.

To detect whether humans are following social distancing norms, an AI project has been developed by Basile Roth, a master's student from Montreal.

This project detects the person movement on the streets and if a person follows social distancing this project shows them in the green box that means they are following social distancing norms and if the box gets red that means they are not following social distancing and thus have potential risk of getting infected from the coronavirus.



Who can benefit from this project?

Social distancing can save us all from this deadly disease. Everyone who's going out to buy some items, going to work and also social workers like policemen also get a huge advantage in keeping an eye on the public and maintaining proper rules and regulation that are formed for the safety of people.





How does it work?

The approach uses Tensorflow object detection model Zoo pre-trained on faster_rcnn_inception_v2_coco dataset, that has a capability of detecting objects within 58 ms and has a detector performance score of 28 (pretty high).

Now, to use this model for people detection, few things had to be worked upon:

  • Load the file containing model in Tensorflow graph and define the desired predictions
  • Pass each image frame through the graph to get the outputs
  • Remove unwanted objects and predictions


Bird's eye view Transformation:
A top view of the scenew was also required to define the constraints of where the person is compared to next nearest person in the frame. To achieve this, OpenCV was used to transform an image taken from a perspective point of view to a top view of this image.

Based on the above process, a bounding box is generated for each person present in the image along with a centroid for each box.

Last part remains measuring the social distance and thus, the distance is measured between two centroids representing humans in that frame. The distance is measured in python using the math.sqrt() function.

Detailed information and workflow available here.



Demo:



Code Implementation:

The Complete Code is provided on GitHub by Basile Roth:
Covid 19 Social Distancing Detector Code.







Want GPU Instances at 5X lower cost?
If yes, then sign up: 🙌

Get access




Get your AI project featured

Fill out this Google Form and get a chance to be featured in this growing AI community