Monitoring Social Distancing Using People Detection

Here I will explain how to actually implement our social distance monitoring tool. For implementing the people detection, we will use Facebook’s Detectron library which has all the trained weights for RetinaNet for people detection.

Hello readers! Continuing from my previous article where I explained the theoretical part of our object detection model, here I will explain how to actually implement our social distance monitoring tool.

As already discussed, we have to first detect people and then use some heuristics on top of that to achieve our goal.

For implementing the people detection, we will use Facebook’s Detectronlibrary which has all the trained weights for RetinaNetfor people detection.

After detecting all the people in a given frame, we will use simple pixel distances to calculate how far the person is from another person. After calculating the distance between two people we can put a threshold on that distance to decide if two people are near or far away from each other.

We can make the model more robust?

We are going to use a simple method that I discussed before. We can also do some calibration if we know where we are placing the camera. For example, if we know where we are going to put the camera, we can take an image of a 1 meter long pipe, or something of known dimension, and look at how many pixels it is taking up in the image. This will give us an idea about how many pixels correspond to how much length which we can use to calculate the actual distance.

One other method we can use is augmented reality (AR) on mobile phones. While using AR we can estimate the actual distance between two points as it simulates the real world distance by taking the location of the cell phone as (0,0,0). If we know the location of people in a frame, we can combine with AR and find the distance between them.

We are not going to do anything fancy, but just a simple task of trying out various threshold values on pixel distance to make it work for a given video. In the demonstration that I am going to show, you will see that people who are far apart will have green boxes around them whereas if they are near to each other, the box will turn red.

How to Find Ulimit For user on Linux

Explains how to find ulimit values of currently running process or given user account under Linux using the 'ulimit -a' builtin command.

MEAN Stack Tutorial MongoDB ExpressJS AngularJS NodeJS

MEAN Stack Tutorial MongoDB ExpressJS AngularJS NodeJS - We are going to build a full stack Todo App using the MEAN (MongoDB, ExpressJS, AngularJS and NodeJS). This is the last part of three-post series tutorial.

Creating RESTful APIs with NodeJS and MongoDB Tutorial

Creating RESTful APIs with NodeJS and MongoDB Tutorial - Welcome to this tutorial about RESTful API using Node.js (Express.js) and MongoDB (mongoose)! We are going to learn how to install and use each component individually and then proceed to create a RESTful API.

systemctl List All Failed Units/Services on Linux

Explains how to use the systemctl command to list all failed units or services on Debian, Ubuntu, CentOS, Arch, Fedora, and other Linux distros.

CentOS Linux 8.2 Released and Here is How to Upgrade it

CentOS Linux 8.2 (2004) released. This release adds corrections for security issues based upon RHEL 8.2 souce and here is how to upgrade it.