Skip to content

This project related to road safety. We have to wear a helmet according to road safety rules when riding a motorcycle. Therefore, these rules are monitored by the police. Also, Due to the invention of high-quality cameras and the development of the state of art in AI, the surveillance system willing to use AI system to detect whether passengers …

Notifications You must be signed in to change notification settings

KrishArul26/Motorbike-Helmet_detection-using-YOLOV3

Repository files navigation

Motorbike-Helmet_detection-using-YOLOV3

YOLOV3

YOLO stands for "You Only Look Once" which uses Convolutional Neural Networks for Object Detection. On a single image, YOLO may detect multiple objects. It implies that, in addition to predicting object classes, YOLO also recognises its positions in the image. The entire image is processed by a single Neural Network in YOLO. The picture is divided into regions using this Neural Network, which generates probabilities for each region. YOLO predicts multiple bounding boxes that cover some regions of the image and then based on the probabilities, picks the best one. Moreover,

           1. YOLOv3 has a total of 106 layers where detections are made at 82, 94 and 106 layers.

           2. It consists of a residual blocks, skip connections and up-sampling.

           3. Each convolutional layer is followed by batch normalization layer and Leaky ReLU activation function.

           4. There are no pooling layers, but instead, additional convolutional layers with stride 2, are used to down-sample feature maps.

Problems Statment

When riding a motorcycle, we must We have to wear a helmet according to the rules of the road. Therefore, these rules are monitored by the police. Due to the invention of high quality cameras and the development of the state of the art in AI, the surveillance system willing to use AI systems to detect whether the occupants are wearing a helmet or not. In this category, I have developed a model that can first detect the motorcycle and then find out who is sitting on the motorcycle. Finally, it will determine whether the person is wearing a helmet or not. For this purpose, I trained the pre-trained model YOLOV3 to recognise motorcycles and people.

Motor Bike detection/ Helmet detection/ Human detection system built with OpenCV, Keras/TensorFlow using Deep Learning and Computer Vision concepts like YOLOV3

Technologies Used

                   1. IDE - Pycharm
                   2. YOLOV3 - Pre-Trained Object Detection Model
                   3. GPU - P-4000
                   4. Google Colab - Just for Image analysis
                   5. OpenCV - Just for the continious image and To draw boxes
                   6. labelimg - Just for labeling images
                   7. TensorFlow - For Tensor Analysis 
                   

🔑 Prerequisites

  • All the dependencies and required libraries are included in the file requirements.txt

📁 Data Collection & prepration

  • 2000 helmet images were collected and used those images for trained the YOLOV3.

  • This project has done up to 50000 epochs with error 0.08 values.

  • Labelling the images - Generate the XML files based on original images, which means you indicate the object in images and find the coordinates of the object in the particular image. and record the information into XML files.

🚀 Installation

  1. Clone the repo
git clone https://github.com/KrishArul26/Motorbike-Helmet_detection-using-YOLOV3.git

  1. Change your directory to the cloned repo
cd Motorbike-Helmet_detection-using-YOLOV3
  1. Create a Python 3.6 version of virtual environment named 'motorbike' and activate it
pip install virtualenv

virtualenv motorbike

motorbike\Scripts\activate

  1. Now, run the following command in your Terminal/Command Prompt to install the libraries required
pip install -r requirements.txt

💡 Working

  1. Open terminal. Go into the cloned project directory and type the following command:
python motorbike_helmet_detection.py

🔑 Results

  • For this motorbike helmet detection, I used computer vision trained net work which is YOLOV3

Testing-1

Testing-2

Testing-3

Further Improvements

We can also develop the system to be able to extract the license plate information. In case the person is not wearing a helmet, then our system will be able to store the license plate information. And backend, it will find the registration of that license plate and send the penalty details by letter.

About

This project related to road safety. We have to wear a helmet according to road safety rules when riding a motorcycle. Therefore, these rules are monitored by the police. Also, Due to the invention of high-quality cameras and the development of the state of art in AI, the surveillance system willing to use AI system to detect whether passengers …

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published