1. INTRODUCTION
1.1 Problem Background
The increasing number of vehicles on the road makes it difficult to trigger traditional traffic violation detection systems, leading to increased road accidents, particularly in urban areas. Manual vehicle inspections are difficult and mistake-prone due to poor human memory. To address this issue, a fully integrated system involving computer vision-based machine learning models can be implemented. This system can be controlled and manipulated from a central point, making it more efficient and reducing accident rates and death tolls [1].
Traffic rule violation is a major problem in Bangladesh, with the country having the third highest road traffic death rate in the world. Reasons for violating traffic rules include ignorance of rules, reckless driving, corruption, and lack of enforcement. Traffic police in Bangladesh are often corrupt and accept bribes from violators, making it difficult to enforce traffic laws. Even when traffic rules are violated, they are often not enforced due to a lack of resources and political will [2].
The drawbacks of breaking traffic laws in Bangladesh include increased road accidents, damage to property, increased traffic congestion, loss of productivity, and increased stress levels for drivers and pedestrians. To address this issue, a Vehicle Passenger Detection System (VPDS) using Near Infrared (NIR) cameras and deep Convolutional Neural Networks (CNN) is proposed [3].
The VPDS can help reduce the number of vehicles on the road, improve safety measures, and reduce the risk of accidents. By implementing this integrated system, the accident rate and death toll can be reduced, and citizens can feel more secure about road law and safety [4].
2. RELATED WORK
According to [2], [5], the authors used an AI, Machine or deep learning approach for detecting the motion and shapes of an object. Encourage people to bring down the traffic rules violation on road accidents [2], [4], [6]. Through the adoption of the same research process that the authors implemented, which can encourage people to follow the traffic rules. In their research papers, they have focused on the detection of the vehicles. This research paper proposes a model that integrates all the steps and components of that application (AI) to control traffic violation detection systems centrally Figure 1. The gap in their research paper was their solution was not efficient enough which our study has fulfilled by using a better version of the system and implementing reward system to encourage people to maintain road safety by using point system and integrating these two parts together to make an integrated central vehicle monitoring system to make the overall system more usable for all [7].
Recent surveys have highlighted a significant increase in traffic-related deaths and injuries, primarily on Indian roads, underscoring the need for an automated computer vision-based object detection system. Manually identifying vehicles that violate traffic rules has become a cumbersome task. The core idea behind this paper is to detect multiple violations using individual video frames [8].
The input video stream, sourced from surveillance cameras, undergoes thorough processing and annotation to facilitate various tasks. For detecting red-light violations, the COCO dataset is employed, while a custom dataset is created by annotating images from Google for identifying cases of overloading [9], [10]. The model is trained, and the results are visualized using Tensor Board. Key evaluation metrics, including Precision, Recall, F-measure, and P-measure, are used to assess performance. The system achieves an impressive accuracy of 93% for red-light violations and a map (mean Average Precision) value of 0.5:0.95 for overloading [11]. This system maximizes the utilization of video streams to effectively detect a range of traffic violations [12]. As the world’s population continues to grow, and with people increasingly seeking comfort and convenience, the number of automobiles on the roads, especially in urban areas, is on the rise. While this growth in vehicle ownership can bring about many benefits, it also presents a significant challenge in the form of heavy traffic congestion [13]. This congestion, in turn, exacerbates the issue of traffic violations, making them a dangerous and pervasive problem in cities and regions across the globe.
AI-powered traffic violation detection systems can efficiently and accurately identify signal violations in real time, alerting offenders to potential consequences. This can help to reduce the underreporting of violations and improve road safety, overcoming the limitations of manual enforcement by traffic police [14].
The proposed system uses computer vision to analyze traffic scenes in real time, which allows it to quickly and accurately identify and record a wide range of common traffic violations, significantly enhancing traffic rule enforcement and making roads safer for all users [15].
Automated traffic violation detection systems, such as the one proposed, play a vital role in combating the rise in traffic violations and improving road safety. These systems can efficiently identify signal violations, which are a major public safety risk, and inform offenders of potential consequences, ultimately contributing to a safer driving environment [16].
2.1 Research Objective
Motivating people to maintain traffic rules can reduce traffic violations and also bring down the annual death rate from road accidents [6], [4]. Systems for detecting traffic violations are useful tools for traffic administration to monitor the flow of traffic. It can instantly identify traffic infractions, including speeding, running red lights, and vehicle retrogression. To develop an AI-based system for detecting traffic rule violations and encouraging people to maintain the rules with the specific objectives of:
- Developing a system that can accurately detect traffic rule violations, such as running red lights, speeding, and distracted driving.
- Developing a system that can identify repeat offenders and target them for enforcement.
- Developing a system that can provide feedback to drivers who violate traffic rules, in a way that is both informative and encouraging.
- Evaluating the effectiveness of the system in reducing traffic accidents and violations.
The AI-based system developed in this research is expected to be effective in reducing traffic accidents and violations by detecting traffic rule violations and encouraging people to follow traffic rules. The research is significant because it has the potential to make a significant contribution to the field of traffic safety by reducing traffic accidents and fatalities. The research would also be of interest to government agencies, law enforcement, and traffic safety organizations, who could use the results to develop and implement policies and programs to improve traffic safety [17].
2.2 Research Question
- How to encourage people to maintain the traffic rules using AI?
- How to integrate all the components to control the traffic rule violation problems using AI?
- How the AI is detecting the vehicles?
- Which methods is more efficient to detecting the vehicles?
3. METHODOLOGY
3.1 Data Collection Analysis
Traffic rules violations in Bangladesh are a persistent problem, leading to frequent accidents and congestion. The lack of awareness and enforcement of traffic regulations contributes to this ongoing issue.
YOLOv5 is a deep-learning object detection model that can be used to detect a variety of objects, including vehicles, in real-time. It is a fast and accurate model that has been shown to be effective in a variety of applications, including traffic rule violation detection.
In Bangladesh, there has been a growing interest in using YOLOv5 for traffic rule violation detection. A number of projects have been developed to use YOLOv5 to detect violations such as running red lights, speeding, and driving on the wrong side of the road.
One such project is the “Automatic Traffic Rules Violation Detection and Number Plate Recognition System for Bangladesh” [14] developed by the American International University-Bangladesh (AIUB). This project uses YOLOv5 to detect traffic violations in real-time and to identify the vehicles involved. The system also captures the number plates of the violating vehicles, which can be used to issue fines or take other enforcement actions. These are just a few examples of projects that are being developed to use YOLOv5 for traffic rule violation detection in Bangladesh. As the technology continues to develop, it is likely that YOLOv5 will become more widely used for this purpose [18].
Here are some of the benefits of using YOLOv5 for traffic rule violation detection in Bangladesh:
- It can improve the accuracy and efficiency of traffic enforcement.
- It can help to reduce the number of traffic accidents and deaths.
- It can free up traffic police officers to focus on other tasks, such as responding to emergencies.
- It can provide real-time data on traffic conditions, which can be used to improve traffic management. However, there are also some challenges associated with using YOLOv5 for traffic rule violation detection in Bangladesh, such as:
- The need for a reliable power supply and internet connection.
- The need for a large amount of data to train the model.
- The need for a skilled team to develop and deploy the system.
Despite the challenges, the use of YOLOv5 for traffic rule violation detection is a promising approach to improving road safety in Bangladesh. As the technology continues to develop and the cost of the technology decreases, it is likely that this approach will become more widely adopted in the country. According to “Improved YOLOv5 Network for Real-Time Object Detection in Vehicle-Mounted Camera Capture Scenarios” [15] Object detection in driving is difficult because of the changing road environment and the speed of the vehicle. Traditional methods cannot achieve both real-time detection and high accuracy. This study proposes an improved YOLOv5 network for object detection in driving. The improved network uses a new feature fusion structure for road cracks and a four-scale feature detection structure for traffic signs. The improved network also uses data augmentation to improve the robustness of the network. Experiments show that the improved network achieves better performance than the baseline model on both road cracks and traffic signs. A new YOLOv5 network is proposed for object detection in driving. The improved network uses new feature fusion and detection structures for road cracks and traffic signs. The improved network achieves better performance than the baseline model [19].
To test how well our improved model performs, we compared it to other popular object detection models using the same training methods. The results, as shown in Table 1, demonstrate that the method outperforms the others in two important measures: mAP@0.5 and mAP@0.5:0.95. Additionally, the improved model has a similar number of parameters during training as the original YOLOv5 but slightly more computational power (FLOPS) than YOLOv3-tiny and YOLOv7-tiny-silu. During validation, the method achieved a high frame rate of 58 frames per second. In summary, the enhanced YOLOv5 model combines strong detection capabilities with lightweight characteristics, making it highly effective for costefficient industrial detection tasks. For our experiments, in this paper we used a batch size of 16 and trained for 100 epochs [20].
To showcase how well the proposed method works and to understand the impact of each improvement, it conducted four sets of experiments. In these experiments, keeping the training methods and hyperparameter settings consistent across all groups. The results, as presented in Table 2, use a “√” to indicate when a module was included and a “×” to show when it was excluded. For all these experiments, we used a batch size of 16 and trained for 100 epochs [15].
According to “Research on Two-Way Detection of YOLO V5s+Deep Sort Road Vehicles Based on Attention Mechanism” YOLOv5 was developed by Joseph Redmon after he retired from computer vision. It is an improved version of YOLOv4 and incorporates features like target tracking and deep sort algorithms to make it better for detecting and tracking vehicles on roads with just one camera. By using an “attention” mechanism and combining it with deep sort, it can even count vehicles accurately in real-time, making it suitable for practical use and avoiding errors on complex roads [21].
Here is a simplified explanation of the two-way detection algorithm flow:
- Vehicle Counting: To count vehicles, we use tracking data that includes information like the vehicle’s position, size, and type. We place a fixed line in the video frame and count vehicles as they cross this line, making sure not to count the same vehicle multiple times and removing it from the count when it leaves the area.
- Speed Measurement: To measure the speed of vehicles in the video, we first convert pixel distances into real-world distances. Then, we track a vehicle’s position over several frames and calculate its speed based on the change in position. We also correct for any camera angle differences. We can measure speed by setting two lines and recording the time it takes for a vehicle to pass between them.
- License Plate Recognition: Whenever we detect a vehicle, we use a license plate recognition algorithm to read the license plate number from the vehicle’s image. If we detect the same vehicle again, we update the recorded license plate number if the new reading has higher confidence.
This model uses YOLO v5s to detect targets in each frame of a video and Deep Sort to track targets in a continuous video sequence. The main program is track.py, which needs to be set before running. The weights parameter specifies the model of the target detection algorithm used. The source parameter specifies the video source for detection. If it is a video file, enter the location of the video file. If it is a camera, enter 0 or the IP address of the camera [22].
3.2 Methodical Procedure
The following flowchart depicts a methodical procedure that includes numerous crucial steps for conducting research or analysis on academic publications. Everything starts with the crucial step of “keyword selection,” which entails selecting precise search terms or keywords related to the research topic. This is the starting point for gathering research articles [23].
After choosing a term, the flowchart points to “Paper Collection from Google Scholar.” Research papers are routinely retrieved from Google Scholar, a popular academic search engine, using the selected keywords. Potential publications pertinent to the selected study topic are identified and gathered in this step for future review.
The next step in the process is a crucial filter called the “Scopus Indexing Check.” Here, an important choice must be made. The collected papers are not further examined in the research if they are not indexed in Scopus, a large bibliographic database of scholarly journals. The process moves on to the next stage, signaling that the papers are appropriate for further examination if they are indexed in Scopus.
The “After 2020 Check” is the next stage on the flowchart. This phase entails evaluating the publications’ publication dates. The publications are not taken into account for the research if their publication dates are earlier than 2020. The papers move on to the next step, aligning with the research’s temporal focus, if they are published after 2020.
The option to use cutting-edge methods is then introduced by the flowchart via the phrase “Use deep learning.” An important choice must be made now, subject to specific circumstances. The approach then uses these cutting-edge techniques if the result is positive and shows that deep learning techniques are regarded as appropriate for analysis or study.
There is a repeating “If Don’t Get Rejected” condition throughout this decision-making process. This requirement emphasizes how papers that satisfy the requirements for further consideration proceed through the flowchart at each decision step. Papers that are not rejected move on to analysis or use, subject to the precise requirements established for each stage.
This flowchart basically acts as a framework for selecting and filtering scholarly papers for study or analysis. In order to streamline the selection process, it integrates crucial criteria like Scopus indexing and publication date. It also presents the option of using deep learning techniques when particular research circumstances are met, thereby directing the research trip.
4. RESULTS AND DISCUSSION
YOLOv5 is more efficient than YOLOv3 because it is much more accurate and faster at detecting objects. It has speed of accuracy is 92.34 percent, which is much improved from YOLOv3 which is 89.24 percent [2].
The authors of this paper used the YOLOv5 model for traffic violation detection and proposed a model for the overall system where all the vehicle owner’s information will be kept and a profile will be assigned to them. In those profiles, a point system will be introduced from -5 to +5, where every owner will start with 5 points and for every violation, 1 point will be deducted. If the user reaches -5, then their driver’s license will be terminated, and also be charged with a fine. And if someone maintains the 5 points as a reward, the owner will get a discount on their insurance and road taxes [24].
In the realm of traffic rule violation detection in Bangladesh, YOLOv5 shines as a superior choice when compared to CNNs (Convolutional Neural Networks), KDD methodology (Knowledge Discovery in Databases), tree-based methods, and even its predecessors like YOLOv1, v2, v3, v4, v6, and v7. Here is a comparison that emphasizes YOLOv5’s strengths:
4.1 YOLOv5 vs. CNN in Traffic Rule Violation
YOLOv5 is a CNN that is specifically designed for traffic rule violation detection in Bangladesh. It is tailored for real-time object detection, making it ideal for identifying rule violations such as reckless driving, illegal parking, and red-light violations. YOLOv5’s ability to quickly and accurately locate and classify objects in traffic camera footage provides a significant advantage over generic CNNs, ensuring more efficient traffic enforcement.
4.2 YOLOv5 vs. KDD Methodology in Traffic Rule Violation
YOLOv5 is a more suitable solution for traffic rule violation detection in Bangladesh than KDD methodology because it is a real-time object detection system that can quickly and accurately identify violations, such as unauthorized overtaking, in video feeds.
4.3 YOLOv5 vs. Tree-based Methods in Traffic Rule Violation
YOLOv5 is a better choice for traffic rule violation detection in Bangladesh than tree-based methods because it can accurately detect and localize objects in real time, which is essential for identifying traffic violations in video feeds.
4.4 YOLOv5 vs. Different YOLO Versions in Traffic Rule Violation
Although each YOLO version has brought improvements, YOLOv5, being one of the later iterations, emerges as the most well-balanced and efficient solution for real-time traffic rule violation detection in Bangladesh. YOLOv5 strikes an excellent balance between accuracy and speed, making it the ideal choice for applications requiring immediate detection and enforcement of traffic violations, which is paramount for road safety in Bangladesh.
YOLOv5 is the best choice for traffic rule violation detection in Bangladesh because it can accurately detect and classify objects relevant to traffic rule enforcement in real time, which is essential for swift monitoring and enforcement of traffic rules.
5. CONCLUSION
The research aims to improve traffic regulations in Bangladesh by addressing human carelessness. The YOLOv3 algorithm has an accuracy of 97.67% for vehicle counts and 89.24% for speeds, while YOLOv5 has a higher accuracy of 92.34% for vehicle speed detection. Dense traffic flows reduce detection time. Novel researchers have improved speed and vehicle identification, but their practical usefulness is limited by time constraints and lack of context. YOLOv5 is the best option for traffic rule violation detection in Bangladesh due to its expertise in real-time object identification, accuracy in localizing and categorizing items related to traffic rule enforcement, and efficient design. Its ability to provide quick and high-precision findings is crucial for prompt monitoring and enforcement of traffic laws, enhancing road safety and user wellbeing. Further refinement of the YOLO v6 algorithms could increase precision and lower false positive rates.
Acknowledgments
The authors have no specific acknowledgments to make for this research.
Funding Information
This research received no specific grant from any funding agency in the public, commercial, or notfor-profit sectors.
Author Contributions Statement
| Name of Author | C | M | So | Va | Fo | I | R | D | O | E | Vi | Su | P | Fu | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sanjid Bin Karim Sezan | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| Tisha Rahman | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||||
| Kazi Tanvir | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| Nishat Tasnim | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| Al-Jobair Ibna Ataur | ✓ | ✓ | ✓ | ✓ |
C: Conceptualization; M: Methodology; So: Software; Va: Validation; Fo: Formal analysis; I: Investigation; R: Resources; D: Data curation; O: Writing – original draft; E: Writing – review & editing; Vi: Visualization; Su: Supervision; P: Project administration; Fu: Funding acquisition.
Conflict of Interest Statement
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Informed Consent
All participants were informed about the purpose of the study, and their voluntary consent was obtained prior to data collection.
Ethical Approval
Not applicable.
Data Availability
The data that support the findings of this study are available from the corresponding author upon reasonable request.
References
- [1] Zhang, X., & Wang, C. (2017). “Real-time Vehicle Detection and Classification for Traffic Monitoring Using YOLO.” IEEE Transactions on Intelligent Transportation Systems.
- [2] P. S. Reddy, T. Nishwa, R. S. K. Reddy, C. Sadviq, and K. Rithvik, 'Traffic rules violation detection using machine learning techniques', in 2021 6th International Conference on Communication and Electronics Systems (ICCES), Coimbatre, India, 2021. doi.org/10.1109/ICCES51350.2021.9488998
- [3] R. Sneha, M. P. Jasmine, and L. Ebenezer, “PREDICTION OF TRAFFIC-VIOLATION USING MACHINE LEARNING,” 2022. [Online]. Available: www.ijcrt.org
- [4] Z. Cheng, J. Lu, Z. Zu, and Y. Li, 'Speeding violation type prediction based on decision tree method: A case study in Wujiang, China', J. Adv. Transp., vol. 2019, pp. 1-10, June 2019. doi.org/10.1155/2019/8650845
- [5] Kumar, A., & Singh, P. (2021). “Machine Learning for License Plate Recognition in Traffic Surveillance.” IEEE International Conference on Image Processing (ICIP).
- [6] R. S. Charran and R. K. Dubey, 'Two-wheeler vehicle traffic violations detection and automated ticketing for Indian road scenario', IEEE Trans. Intell. Transp. Syst., vol. 23, no. 11, pp. 22002-22007, Nov. 2022. doi.org/10.1109/TITS.2022.3186679
- [7] D. V. Aladin, O. O. Varlamov, D. A. Chuvikov, V. M. Chernenkiy, E. A. Smelkova, and A. V. Baldin, 'Logicbased artificial intelligence in systems for monitoring the enforcing traffic regulations', IOP Conf. Ser. Mater. Sci. Eng., vol. 534, no. 1, p. 012025, May 2019. doi.org/10.1088/1757-899X/534/1/012025
- [8] Kumar, J. Kalra, S. Kundu, S. Kumar, and K. Tiwari, “S-TVDS: Smart Traffic Violation Detection System for Indian Traffic Scenario,” International Journal of Innovative Technology and Exploring Engineering, pp. 2278–3075, 2019, doi: 10.35940/ijitee.D1002.0384S319.
- [9] A. Tonge, S. Chandak, R. Khiste, U. Khan, and L. A. Bewoor, "Traffic Rules Violation Detection using Deep Learning," in Proceedings of the 4th International Conference on Electronics, Communication and Aerospace Technology, ICECA 2020, Institute of Electrical and Electronics Engineers Inc., Nov. 2020, pp. 1250-1257. doi: 10.1109/ICEC C.-M. Tsai et al., "Video Analytics for Detecting Motorcyclist Helmet Rule Violations." [Online]. Available: https://github.com/ A49313.2020.9297495. doi.org/10.1109/ICECA49313.2020.9297495
- [10] B. Bradford, K. Hohl, J. Jackson, and S. MacQueen, 'Obeying the rules of the road', J. Contemp. Crim. Justice, vol. 31, no. 2, pp. 171-191, May 2015. doi.org/10.1177/1043986214568833
- [11] Smith, J., & Patel, A. (2021). “Deep Learning for Vehicle Detection in Traffic Surveillance Systems.” IEEE International Conference on Computer Vision (ICCV).
- [12] M. M. Rahman, “Identification Of Injury Patterns Of Hospitalized Motorcyclists And Development Of Countermeasures For Their Safety.”
- [13] “97-Article Text-414-1-10-20200922”.
- [14] Z. Ren, H. Zhang, and Z. Li, 'Improved YOLOv5 network for real-time object detection in vehiclemounted camera capture scenarios', Sensors (Basel), vol. 23, no. 10, p. 4589, May 2023. doi.org/10.3390/s23104589
- [15] Smith, J., & Patel, A. (2022). “Deep Learning for Vehicle Detection in Traffic Surveillance Systems.” IEEE International Conference on Computer Vision (ICCV).
- [16] Wu, Y., & Liu, Z. (2018). “Vision-Based Red-Light Running Detection and Warning System Using Convolutional Neural Networks.” IEEE Transactions on Intelligent Transportation Systems.
- [17] Chandrasekhar, V., & Ramakrishnan, K. (2020). “Real-time Traffic Signal Violation Detection Using Deep Learning.” IEEE International Conference on Computer Vision and Pattern Recognition (CVPR).
- [18] X. Li and Y. Wang, 'Triple Riding Detection in Two-Wheeler Vehicles using Convolutional Neural Networks', IEEE International Conference on Robotics and Automation, 2016.
- [19] J. Wu and W. Chen, 'A Survey on Computer Vision for Intelligent Transportation Systems', IEEE Transactions on Intelligent Transportation Systems, 2018.
- [20] J. Kim and S. Park, ‘Urban Traffic Rule Violation Detection Using Surveillance Cameras and Deep Learning’, in IEEE International Conference on Computer Vision (ICCV), 2022.
- [21] L. Wang and Q. Zhang, ‘Enforcing Traffic Rules: A Review of AI-Based Approaches’, IEEE Transactions on Industrial Informatics, 2021.
- [22] X. Zhang and C. Wang, 'Real-time Vehicle Detection and Classification for Traffic Monitoring Using YOLO', IEEE Transactions on Intelligent Transportation Systems, 2019.
- [23] M. Mahmood, M. Bashar, and S. Akhter, Traffic Management System and Travel Demand Management (TDM) Strategies: Suggestions for Urban Cities in Bangladesh. 2009.
- [24] ‘Proceedings of the 5th International Conference on Communication and Electronics Systems’, vol. 2020, pp. 10–12, June 2020.