Social-Distancing-Monitoring-System
Social-Distancing-Monitoring-System copied to clipboard
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 (htt...
Social Distancing detection using Deep Learning
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
- 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
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
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.
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.
COVID19_SocialDistancing.mlapp
I have built a lightweight tool that enables even non-technical users to create the system for their own.
Requires
- MATLAB
- Deep Learning Toolbox
- Image Processing Toolbox
- Computer Vision Toolbox
- Parallel Computing Toolbox
- MATLAB Coder
- GPU Coder
For more information on Deep Learning in MATLAB
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.