International Knowledge Platform
Serving Researchers Since 2012

Ai-Based Traffic Rule Violation Detection and Notification System

DOI : 10.17577/IJERTCONV14IS010045
Download Full-Text PDF Cite this Publication

Text Only Version

Ai-Based Traffic Rule Violation Detection and Notification System

Rashmi R Kotian Guide: Ms Jayashree M

Department of Computer Applications

St Joseph Engineering College, Mangalore, Karnataka,India

ABSTRACT – Traffic rule violations often cause severe accidents. Typically, traffic personnel monitor roads manually to identify offenders, a process that is time-consuming, labor- intensive, and prone to errors.. This project looks at using Artificial Intelligence (AI) to automatically detect traffic rule violations like not wearing a helmet, carrying more than two people on a bike, or using a vehicle without permission. It uses video cameras and deep learning technology to recognize these violations in real time. When a violation is found, the system automatically creates a challan (a traffic fine ticket) and sends it to the vehicle owner's email. The system is built using YOLOv5 for detecting objects in videos, along with image processing, and a backend developed using Flask and MongoDB. This setup helps monitor traffic and enforce rules without needing manual effort.

  1. INTRODUCTION

    With more and more vehicles on the road and not enough traffic police to manage them, it has become harder to enforce traffic rules properly. In countries like India, traffic jams, reckless driving, and breaking safety rules happen often and can lead to serious accidents. Thanks to advancements in Artificial Intelligence (AI), especially in visual recognition, it's now possible to monitor roads using cameras. This project uses deep learning (specifically YOLOv5) along with modern web technologies to automatically detect traffic rule violations and instantly notify the person who broke the rule.

  2. OBJECTIVES

    • To automatically detect traffic rule violations like riding without a helmet or with three people on a bike using deep learning.

    • To instantly generate and send an email challan (fine) to the person who broke the rule.

    • To build a strong and flexible system using Python, Flask, MongoDB Atlas, and React.

    • To test how well the system works and see if it can be used in real-life traffic rule enforcement.

  3. LITERATURE SURVEY

1. According to A. P. Sharma et al., Faster R-CNN was utilized to build a traffic monitoring framework capable of identifying violations, though it lacked real-time efficiency due to higher computational requirements. This is a type of object detection model that can recognise different things in an image or video. They used it to detect if someone was breaking traffic rules. Their system could find violations, but Faster R-CNN is a bit slow for real-time detection because it takes more time to process each image.

2.R. Singh and team compared different AI models to see which works best for traffic violations. They found that YOLOv3 worked very well in busy city traffic because it is faster and can detect objects quickly in real time. This makes YOLOv3 better for use on roads where vehicles are moving fast and many objects need to be detected at once.

3.S. Patel and team built a system that could automatically detect license plates of vehicles and then send challans (fines) by email. This helped traffic police to quickly issue fines without manually writing them. However, their system mainly focused only on reading number plates and did not detect different types of violations like helmets or triple riding.

4.V. Kapoor and team worked on making smart cities safer by using sensors and AI together. Their system could monitor live traffic violations and also focused on keeping pedestrians safe by detecting when people crossed roads unsafely. This shows how AI can be used not just for vehicles but also to improve safety for people walking on roads.

Overall, these studies show that AI is becoming very useful in traffic monitoring. But they also point out some common problems, like delays in sending notifications in real time and difficulty in using these systems for very large areas or cities because it needs powerful hardware and careful planning to work everywhere smoothly.

  1. METHODOLOGY

    In this project, we first used a Helmet Detection dataset from Roboflow to train our YOLOv5s AI model. This model learned how to detect people wearing helmets, people without helmets, bikes, and cases where three people are riding on a bike.

    When we give a video or image to the system, the model checks it to see if any traffic rule is being broken. For example, if someone is riding without a helmet or if there are three people on a bike, it detects and marks it as a violation.

    The backend is built using Flask, which helps in uploading and processing files. The data about each violation, such as vehicle number, rider image, type of violation, and date-time, is saved in MongoDB Atlas. After this, the system automatically sends an email with the challan (fine) to the vehicle owner in real-time.

    For the frontend, there is a React dashboard made for the traffic police. They can log in to view all violation records, search and filter cases, check details, and download challans as PDFs.

    SYSTEM ARCHITECTURE

  2. RESULT AND ANALYSIS

    The system was tested to see how well it can detect different types of traffic rule violations.

    For helmet detection, the model had a precision of 0.93, meaning it was correct 93% of the time when it said someone was wearing a helmet. The recall was 0.91, which means it

    was able to find 91% of all people actually wearing helmets. Overall, the accuracy was 0.92, showing that the model performed well in detecting helmets.

    For triple riding detection (three people on a bike), the model had a precision of 0.89 and recall of 0.87, with an overall accuracy of 0.88. This means it was able to detect most cases correctly.

    For email notifications, the system achieved 100% success, meaning that whenever a violation was detected, the email challan was sent without any failure during testing.

    Also, the processing time per video frame was about 0.05 seconds, which means the system can process around 20 frames per second (FPS). This is fast enough to work in real- time for live traffic video feeds.

    6 . CONCLUSION

    The developed system demonstrates the potential of AI to automate traffic rule monitoring effectively, providing instant notifications and enhancing overall enforcement efficiency. Using YOLOv5 for real-time detection, Flask and MongoDB for backend processing, and a React dashboard for easy access, the system makes traffic management more efficient. It reduces the need for manual checks and can be scaled to work across the entire city, helping to make roads safer.

    1. FUTURE ENHANCEMENTS

      In the future, the system can be improved by:

      • Adding License Plate Recognition (LPR): So that it can automatically read vehicle number plates from CCTV footage.

      • Sending SMS Alerts: Along with emails, it can also send challan messages through SMS.

      • Adding Dashboard Analytics: To show useful data like the most common violations, busy hours, and places where violations happen most, which can help improve traffic enforcement.

      • Using Edge AI: Running the model on small devices like NVIDIA Jetson Nano so that detection can happen in real-time directly at the roadside without depending on cloud servers.

    2. REFERENCES

  1. Sharma, A. P., Real-Time Traffic Violation Detection Using Deep Learning IJERT, 2022.

  2. Singh, R. et al., YOLO-based Helmet Detecton in Traffic Surveillance, Springer, 2021.

  3. YOLOv5 Documentation – https://docs.ultralytics.com

  4. Roboflow Universe: Helmet Detection Dataset – https://universe.roboflow.com

  5. MongoDB Atlas – https://www.mongodb.com/cloud/atlas

  6. 6. Flask Documentation – https://flask.palletsproje

  7. cts.com