Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Tanmayee Godbole, Purva Sapkal, Sujal Malapure, Shrihari Ganbavale
DOI Link: https://doi.org/10.22214/ijraset.2024.65544
Certificate: View Certificate
In India, many motorcyclists frequently violate traffic rules by not wearing helmets, and enforcement by traffic police is often limited due to the demanding nature of manual monitoring. Helmet detection is a crucial aspect of ensuring road safety, particularly for motorcyclists. Non-compliance with helmet regulations can lead to severe injuries and fatalities in the event of accidents. This paper presents an intelligent system for automatic helmet detection using a combination of OpenCV for image processing and machine learning algorithms for classification. The proposed system utilizes real-time video feed or static images to detect and identify whether a person is wearing a helmet, aiming to automate helmet compliance checks in traffic surveillance environments. This automated helmet detection system has the potential to enhance traffic law enforcement and reduce human intervention, leading to safer road environments.
I. INTRODUCTION
In today's world, ensuring safety has become more critical than ever, especially in high-risk environments such as construction sites, factories, and roadways. Implementing safety protocols, like wearing helmets, is vital to protect individuals from potential hazards. However, manual enforcement of these measures can be inefficient and prone to human error. The Helmet Detection System, powered by Python, OpenCV, and the YOLOv5 (You Only Look Once) object detection algorithm, presents a highly efficient and intelligent solution.
This system leverages advanced computer vision techniques to automatically identify whether individuals in a scene are adhering to safety regulations by wearing helmets. The integration of YOLOv5, known for its real-time object detection capabilities, ensures that the system is not only fast but also highly accurate, capable of processing both static images and real-time video streams. By utilizing OpenCV's image processing capabilities, the Helmet Detection System can be deployed across various platforms, making it adaptable for different environments.
Processing significant amount of information in a time constraint manner is a challenging task. As such applications involve tasks like segmentation, feature extraction, classification and tracking, in which a significant amount of information need to be processed in short duration to achieve the goal of real-time implementation.
The combination of machine learning and OpenCV in helmet detection ensures accuracy and scalability, offering a solution that not only enhances safety compliance but also reduces human effort and error in the process.
This technology enhances safety protocols by providing automated monitoring and immediate feedback, reducing the dependency on manual supervision and significantly improving compliance rates. Its scalable nature ensures that it can be implemented in diverse settings, providing a proactive approach to safety that minimizes risks and protects lives.
II. LITERATURE SURVEY
Madhuchhanda Dasgupta, Oishila Bandyopadhyay, Sanjay Chatterji, Computer Science & Engineering IIIT Kalyani West Bengal, India,” Automated Helmet Detection for Multiple Motorcycle Riders using CNN”[1]. Dasgupta emphasized that a key component of an efficient traffic management system lies in its capacity to continuously oversee vehicle compliance with traffic laws. In densely populated urban regions of India, motorcycles often serve as a primary mode of transportation. However, the study observed that a significant portion of motorcyclists tend to avoid securing basic insurance for city commuting or even everyday street use, highlighting a critical gap in traffic safety and regulation adherence.
A helmet is crucial for protecting the head, one of the most delicate parts of the human body. It should be mandatory for all motorcyclists, as motorcycle accidents frequently result in severe head injuries. Wearing a helmet can be a simple yet life-saving measure.
To enhance the safety of motorcyclists in Surat, the Surat Municipal Corporation (SMC) took a significant step by implementing a real-time CCTV surveillance system, a pioneering initiative in India. Launched in 2015, the system was equipped with 297 cameras, managed through a centralized command and control centre , aimed at monitoring traffic compliance and enhancing road safety [2].The growing concern of increased accidents and injuries associated with motorcycle use, partly due to the non-compliance of motorcyclists in wearing helmets. The surge in motorcycle traffic has made it harder to maintain road safety, and one of the key factors is the failure to wear helmets, which leads to more severe injuries in case of accidents. Currently, to enforce helmet-wearing laws, authorities rely on manual checks or video surveillance footage from cameras placed at intersections.
These methods are labour intensive, time-consuming, and prone to errors, as they require human observation to spot violations. The proposed solution is a computer-based design that can analyze images, potentially from surveillance cameras, to automatically detect individuals riding motorcycles without helmets. This system would improve the accuracy and efficiency of identifying motorcyclists who are not complying with helmet regulations, helping to enhance road safety.
The system processes moving objects and classifies them as either motorcycles or other types of moving vehicles, based on features extracted from their regional properties. This classification is carried out using the K- Nearest Neighbour (KNN)algorithm. The KNN classifier helps identify motorcycles by analyzing key characteristics of the object’s movement and shape.[3]
However, a notable limitation of this system is that the motorcycle is only detected from a side view, making it impossible to capture or recognize the number plate. As a result, the system cannot officially identify the violator, limiting its effectiveness in enforcement actions. Vehicle classification into categories such as cars, motorcycles, trucks, etc., is performed using various methods. In this paper, **SURF (Speeded-Up Robust Features), HAAR-like features, HOG (Histogram of Oriented Gradients), and LBP (Local Binary Patterns)** are utilized as descriptors for feature extraction from vehicles. These descriptors help in identifying key features necessary for distinguishing between different vehicle types[4].For classification, advanced algorithms like **Multilayer Perceptron (MLPs), Support Vector Machines (SVMs),** and **Radial Basis Function Networks (RBFNs)** were employed. These classifiers enable precise categorization of vehicles based on the extracted features.
III. METHODOLOGY
This paper aims to propose a system for detection of motorcyclist without helmet. The system detects motorcyclists not wearing helmets and retrieves their motorcycle number plate in real time from videos captured by CCTV cameras at road junctions by making use of Machine Learning. The algorithm for a system that combines helmet and number plate detection using Open CV starts by capturing an image or video frame of a person riding a motorcycle. The image or video frame is then pre-processed using Open CV to enhance the quality of the image and reduce noise.
The whole part is divided into 4 important parts as follows:
The object detection is been done with YOLO which a method / way to do object detection. It is the algorithm /strategy behind how the code is going to detect objects in the image. YOLO takes entirely different approach. It looks at the entire image only once and goes through the network once and detects objects.
A. Object detection using python and OpenCV
The DNN (Deep Neural Network) module, which was originally part of the opencv_contrib repository, has been integrated into the main OpenCV repository as of last year. This enhancement allows users to perform inference on pre-trained deep learning models directly within OpenCV. Initially, the module supported only Caffe and Torch models, but it has since expanded its capabilities to include compatibility with additional frameworks, such as TensorFlow, thereby broadening its usability for developers and researchers in the field. The feeding of the video to the ML model is done using OpenCV for preprocessing and capturing of input is occurred frame by frame with the help of OpenCV tools. Firstly, resizing of the frames into the required resolution of 1920×1080p is done. Then the frame is fed as input to the neural network created using the TFNet function available with DarkFlow.
1) Software Requirements
2) Hardware Requirements
3) Libraries used
4) Algorithm
5) YOLO (You Only Look Once)
YOLO was proposed by Joseph Redmond et al. in 2015. It was proposed to deal with the problems faced by the object recognition models at that time, Fast R-CNN is one of the state-of-the-art models at that time but it has its own challenges such as this network cannot be used in real-time, because it takes 2-3 seconds to predicts an image and therefore cannot be used in real-time.[5]Whereas, in YOLO we have to look only once in the network i.e. only one forward pass is required through the network to make the final predictions. YOLO’s real-time object detection capabilities have been invaluable in autonomous vehicle systems, enabling quick identification and tracking of various objects such as vehicles, pedestrians [6], bicycles, and other obstacles [7]. These capabilities have been applied in numerous fields, including action recognition [8] in video sequences for surveillance ,sports analysis, and human-computer interaction [9]. YOLO models have been used in agriculture to detect and classify crops [10], pests, and diseases , assisting in precision agriculture techniques and automating farming processes. They have also been adapted for face detection tasks in biometrics, security, and facial recognition systems [11].
IV. FUTURE SCOPE
This project can be used to implement an automatic challan system. The Helmet Detection system can be interfaced to motorcycles. Doing this we can control the Bike condition based on Helmet Detection. If Helmet is detected initially then the bike can turn ON. Else the bike cannot turn ON.
V. RESULTS
The helmet detection system successfully identifies individuals wearing or not wearing helmets in images or video streams. By using a pre-trained machine learning model integrated with OpenCV for image processing, the system accurately detects helmets in real-time with a high confidence scoreThe system's performance demonstrates reliability in diverse environments like traffic and construction sites, with potential for further scalability and integration into real-world safety applications.
In conclusion, a helmet detection system using machine learning and OpenCV offers an effective solution for enhancing safety in various environments, such as roads and construction sites. By leveraging advanced image processing and AI models, the system can detect helmet usage in real time, helping to prevent accidents and ensure compliance with safety regulations. With its potential for integration into smart cities, IoT, and edge devices, this system can play a crucial role in improving public safety and reducing injuries through automation and advanced analytics.
[1] M. Veldurthi and A. D. Dharmavaram, \"Automatic Vehicle Identification and Recognition using CNN Implemented on PYNQ Board,\" 2022 6th International Conference on Electronics, Communication and Aerospace Technology, Coimbatore, India, 2022, pp. 1302-1306, doi: 10.1109/ICECA55336.2022.10009054. [2] India mission smart cities: Surat: pdf available at \"http://smartcities.gov.in/writereaddata/winningcity/SCP_%20SURAT.pdf\" [3] Waranusast, N., Bundon, V., Timtong, N., Tangnoi, C., & Pattanathaburt, P. (2016). Machine vision techniques for motorcycle safety helmet detection. In 2016 28th International Conference on Image and Vision Computing (IVCNZ), New Zealand, 2016. [4] Silva, R., Romuere, et al. (2016). Automatic Motorcycle Detection on Public Roads. CLEI Electronic Journal, Vol. 19, No. 1, pp. 70-77. ISSN: 1390-8773. [5] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look once: Unified, real-time object detection,” in Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 779–788, 2016. [6] W. Lan, J. Dang, Y. Wang, and S. Wang, “Pedestrian detection based on yolo network model,” in 2018 IEEE international conference on mechatronics and automation (ICMA), pp. 1547–1551, IEEE, 2018. [7] ] A. Benjumea, I. Teeti, F. Cuzzolin, and A. Bradley, “Yolo-z: Improving small object detection in yolov5 for autonomous vehicles,” arXiv preprint arXiv:2112.11798, 2021. [8] N. M. A. A. Dazlee, S. A. Khalil, S. Abdul-Rahman, and S. Mutalib, “Object detection for autonomous vehicles with sensor-based technology using yolo,” International Journal of Intelligent Systems and Applications in Engineering, vol. 10, no. 1, pp. 129–134, 2022. [9] S. Liang, H. Wu, L. Zhen, Q. Hua, S. Garg, G. Kaddoum, M. M. Hassan, and K. Yu, “Edge yolo: Real-time intelligent object detection system based on edge-cloud cooperation in autonomous vehicles,” IEEE Transactions on Intelligent Transportation Systems, vol. 23, no. 12, pp. 25345–25360, 2022. [10] M. Lippi, N. Bonucci, R. F. Carpio, M. Contarini, S. Speranza, and A. Gasparri, “A yolo-based pest detection system for precision agriculture,” in 2021 29th Mediterranean Conference on Control and Automation (MED), pp. 342–347, IEEE, 2021. [11] W. Chen, H. Huang, S. Peng, C. Zhou, and C. Zhang, “Yolo-face: a real-time face detector,” The Visual Computer, vol. 37, pp. 805–813, 2021. [12] . Viola and Jones, “Robust Real-time Object Detection”, IJCV 2001
Copyright © 2024 Tanmayee Godbole, Purva Sapkal, Sujal Malapure, Shrihari Ganbavale . This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET65544
Publish Date : 2024-11-26
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here