Skip to content

Social Distancing Violation System (SODV) developed using YOLOv3 MS COCO pre-trained model and OpenCV.

License

Notifications You must be signed in to change notification settings

afiqharith/social-distancing-violation-system

Repository files navigation

SODV: Social Distancing Violation System YOLO version 3

SoDV LICENSE FKE RMC

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.

1. Prerequisites and configurations

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.

2. Run project

Run:

$ python social_distancing_violation_system.py

3. Program structure

outputimage

4. Program output

outputimage

Output frame 10 to 250:

outputimage outputimage outputimage
FRAME 10 FRAME 50 FRAME 100
outputimage outputimage outputimage
FRAME 150 FRAME 200 FRAME 250

5. Overall accuracies

graph

6. Accuracy for person detection

Dataset TP TN FP FN %
Oxford Town Centre 29 0 0 11 72.5

7. Accuracy for social distance violation detection

Dataset TP TN FP FN %
Oxford Town Centre 23 15 9 2 77.5

8. Project drawback

  • No camera calibration for intrinsic parameter

9. References

Previous project
Person Detection for Social Distancing and Safety Violation Alert based on Segmented ROI

Output video
Youtube

YOLO Pre-Trained Model
YOLO Darknet

Dataset
MegaPixels: Origins, Ethics, and Privacy Implications of Publicly Available Face Recognition Image Datasets
Oxford Town Centre CCTV video-dataset

LICENSE

This project is licensed under the terms of the MIT license.

Releases

No releases published

Packages

No packages published

Languages