Skip to content

We present the Automatic Helmet Detection System, a CNN model trained on image dataset that can detect motorbikes as well as riders wearing helmets.

Notifications You must be signed in to change notification settings

brlivsky/helmet-detection-yolo

Repository files navigation

Helmet Detection using YOLOv3

Motivation & Credits

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].

Prerequisites

Knowledge in one or more of the following will be helpful.

  1. Deep Learning
  2. Computer Vision
  3. PyTorch
  4. Google Colab

Dataset

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.

Implementation

Users are requested to go thoroughly through the original repo. Here is a walkthrough of the steps we've followed.

  1. Set up the environment in Google Colab
  2. Downloaded the dataset
  3. Converted the videos to image frames (code given)
  4. Annotated around 1000+ images manually using LabelImg, the more the merrier
  5. Uploaded the dataset (images + annotation file) to the Drive associated with Colab
  6. Used pretrained weights of COCO dataset to initialize the model (refer orginal repo)
  7. Trained on the new dataset uploaded
  8. Downloaded the weights and ran detection on PC
  9. Modified detect.py to enable webcam

Results

An image after detection of helmet and motorbike.

Result

Parameters on how good the model is in identifying the objects trained.

download

Future Work

For those who would like to extend the project, we would recommend adding the following features

  1. Number Plate Detection using OCR
  2. Seat Belt Detection
  3. A web interface to identify the traffic rule violatores and manage the system

Note and Disclaimer

  • This project was done as part of our Bachelor's Thesis in 2019 and is not actively maintained.

About

We present the Automatic Helmet Detection System, a CNN model trained on image dataset that can detect motorbikes as well as riders wearing helmets.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published