The project was inspired from Dr. C. Krishna Mohnan's M2Smart Project at IIT H. The code was forked from an earlier version of yolov3 maintained by Glenn Jocher. Link to the original paper [here].
Knowledge in one or more of the following will be helpful.
- Deep Learning
- Computer Vision
- PyTorch
- Google Colab
Dataset can be requested from this link. Do provide a well written reason for the request. The video datset has to be converted to images and labeled manually. We've used LabelImg to annotate the classes, the classnames being Helmet and Bike.
Users are requested to go thoroughly through the original repo. Here is a walkthrough of the steps we've followed.
- Set up the environment in Google Colab
- Downloaded the dataset
- Converted the videos to image frames (code given)
- Annotated around 1000+ images manually using LabelImg, the more the merrier
- Uploaded the dataset (images + annotation file) to the Drive associated with Colab
- Used pretrained weights of COCO dataset to initialize the model (refer orginal repo)
- Trained on the new dataset uploaded
- Downloaded the weights and ran detection on PC
- Modified detect.py to enable webcam
An image after detection of helmet and motorbike.
Parameters on how good the model is in identifying the objects trained.
For those who would like to extend the project, we would recommend adding the following features
- Number Plate Detection using OCR
- Seat Belt Detection
- A web interface to identify the traffic rule violatores and manage the system
- This project was done as part of our Bachelor's Thesis in 2019 and is not actively maintained.