Skip to content

AI-enabled social distancing detection tool that can detect if people are keeping a safe distance from each other by analyzing real-time video streams from the camera. - Idea Credit : Landing AI (https://landing.ai/)

License

Notifications You must be signed in to change notification settings

matlab-deep-learning/Social-Distancing-Monitoring-System

Repository files navigation

Social Distancing detection using Deep Learning

Final Result

Background

Coronavirus disease (COVID-19) is a new strain of disease in humans discovered in 2019 that has never been identified in the past. Coronavirus is a large family of viruses that causes illness in patients ranging from common cold to advanced respiratory syndromes such as Middle East Respiratory Syndrome (MERS-COV) and Severe Acute Respiratory Syndrome (SARS-COV). Many people are currently affected and are being treated across the world causing a global pandemic. Several countries have declared a national emergency and have quarantined millions of people.

To be a part of the worldwide trend, I've created a Social Distancing detection system.

Application Workflow

Application Workflow

  • Detect Pedestrians in the perspective view
    • Train YOLOv3 detector for pedestrian detection
  • Convert perspective view into Bird's-eye view
    • Morphs the perspective view into a bird’s-eye (top-down) view
    • We assumes that every person is standing on the same flat ground plane.
  • Measure the distances between persons in Bird's-eye view
    • Estimate pedestrian's (x, y) location in the bird's-eye view.
    • Selecting bottom-center point of each person's bounding box in the perspective view and transform the points into bird's-eye view.

Part1 - Detect Pedestrians in the perspective view

Detect Pedestrians

COVID19_PeopleExtractGT.mlx

This file extracts dataset provider given ground truth information, Oxford Town Centre Dataset[1], and get ready for the training.

COVID19_TrainPeopleYOLOv3.mlx

Train the pedestrian detection model from ground truth data, extracted from above file.

Part2 - Convert perspective view into Bird's-eye view & Measure the distances between persons in Bird's-eye view

Calibration

COVID19_SocialDistancingScript.mlx

This file includes the entire social distancing system development script with pretrained people detection model. It covers calibration process from perspective view into bird's-eye view, extract person's location and measure the distances each other.
Measurement

Part3 - Test application and App for interactive execution

COVID19_PeopleVideoRunning.mlx

With the pretrained people detector, and using COVID19_SocialDistancingScript.mlx, it can run social distancing detector for existing video. Final Result

COVID19_SocialDistancing.mlapp

I have built a lightweight tool that enables even non-technical users to create the system for their own. App for Social Distancing

Requires

For more information on Deep Learning in MATLAB

View Social-Distancing-Monitoring-System on File Exchange

Download a free MATLAB trial for Deep Learning

References

[1] B. Benfold and I. Reid. Guiding visual surveillance by tracking human attention. In BMVC, 2009

Copyright 2020 The MathWorks, Inc.

About

AI-enabled social distancing detection tool that can detect if people are keeping a safe distance from each other by analyzing real-time video streams from the camera. - Idea Credit : Landing AI (https://landing.ai/)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages