This project is a social distancing violation detection system implemented using Python. The previous development of this project used MobileNet SSD pre-trained on MS-COCO as the person detection algorithm. After the previous project finished in July 2020, I decided to further improve the detection algorithm by changing from MobileNet SSD to YOLOv3 to increase the accuracy. The program uses OpenCV for the image processing and utilizing the DNN module which solely tested on CPU. The system accuracy tested on Oxford Town Centre CCTV video-dataset (266 frames). This project was submitted to Malaysia Technology Expo (MTE) 2020 Special Edition COVID-19 International Innovation Awards under Faculty of Electrical Engineering of Universiti Teknologi MARA.
All the requirements can be installed via the command:
$ pip3 install -r requirements.txt
The default input video is located in videos folder. To change the program to use camera stream as input, you need to change the configuration from CAMERA_FLAG : false
to CAMERA_FLAG : true
.
Note: All configurations can be changed in the config.json file.
Run:
$ python social_distancing_violation_system.py
Output frame 10 to 250:
FRAME 10 | FRAME 50 | FRAME 100 |
FRAME 150 | FRAME 200 | FRAME 250 |
Dataset | TP | TN | FP | FN | % |
---|---|---|---|---|---|
Oxford Town Centre | 29 | 0 | 0 | 11 | 72.5 |
Dataset | TP | TN | FP | FN | % |
---|---|---|---|---|---|
Oxford Town Centre | 23 | 15 | 9 | 2 | 77.5 |
Previous project Person Detection for Social Distancing and Safety Violation Alert based on Segmented ROI
Dataset MegaPixels: Origins, Ethics, and Privacy Implications of Publicly Available Face Recognition Image Datasets
This project is licensed under the terms of the MIT license.