https://github.com/matlab-deep-learning/social-distancing-monitoring-system
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/)
https://github.com/matlab-deep-learning/social-distancing-monitoring-system
camera-calibration deep-learning example matlab matlab-deep-learning social-distancing-detection
Last synced: 5 months ago
JSON representation
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/)
- Host: GitHub
- URL: https://github.com/matlab-deep-learning/social-distancing-monitoring-system
- Owner: matlab-deep-learning
- License: other
- Created: 2020-06-10T01:22:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-24T04:02:08.000Z (about 5 years ago)
- Last Synced: 2025-05-07T19:47:38.340Z (6 months ago)
- Topics: camera-calibration, deep-learning, example, matlab, matlab-deep-learning, social-distancing-detection
- Language: MATLAB
- Homepage:
- Size: 15.7 MB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](http://www.robots.ox.ac.uk/ActiveVision/Research/Projects/2009bbenfold_headpose/project.html)[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](https://www.mathworks.com/products/matlab.html)
- [Deep Learning Toolbox](https://www.mathworks.com/products/deep-learning.html)
- [Image Processing Toolbox](https://www.mathworks.com/products/image.html)
- [Computer Vision Toolbox](https://www.mathworks.com/products/computer-vision.html)
- [Parallel Computing Toolbox](https://www.mathworks.com/products/parallel-computing.html)
- [MATLAB Coder](https://www.mathworks.com/products/matlab-coder.html)
- [GPU Coder](https://www.mathworks.com/products/gpu-coder.html)
For more information on Deep Learning in MATLAB
-------------
[](https://kr.mathworks.com/matlabcentral/fileexchange/76760-social-distancing-monitoring-system)
**[Download a free MATLAB trial for Deep Learning](https://www.mathworks.com/products/deep-learning.html)**
References
-------------
[1] B. Benfold and I. Reid. Guiding visual surveillance by tracking human attention. In BMVC, 2009
Copyright 2020 The MathWorks, Inc.