DOI : 10.17577/IJERTCONV14IS010059- Open Access

- Authors : Shreya K, Sunith Kumar T
- Paper ID : IJERTCONV14IS010059
- Volume & Issue : Volume 14, Issue 01, Techprints 9.0
- Published (First Online) : 01-03-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
Traffic Congestion Detection and Severity Assessment Using YOLOv8
Shreya K,
PG Student, St Joseph Engineering College, Mangalore
Sunith Kumar T
Assistant Professor, St Joseph Engineering College, Mangalore
Abstract – Urban traffic congestion causes inconvenience for commuters, increased pollution, and financial losses. Real-time analysis and severity evaluation are not features of traditional monitoring systems. This research suggests an automated method for identifying and categorizing the level of traffic congestion us- ing YOLOv8, a deep-learning-based object identification model. The system looks at real-time or recorded videos of traffic to find vehicles, count them, and figure out how heavy the traffic is. It checks how vehicles are spread-out and how many there are to decide if the traffic is light, medium, or heavy. Standard metrics (precision, recall, and maps) were used to assess the models detection performance, and it showed excellent accuracy in real- world situations with different lighting conditions, occlusions, and camera angles. The framework also incorporates vehicle tracking to forecast possible bottlenecks and analyze traffic flow dynamics. A refined YOLOv8 model tailored for crowded traffic situations, a new severity evaluation method that combines vehicle density and spatial clustering, and the viability of real-time deployment on edge devices for scalable urban traffic management are some of the major breakthroughs. By facilitating data-driven urban planning, dynamic traffic signal regulation, and proactive con- gestion reduction, this study advances intelligent transportation systems. For improved predictive analytics, future developments might incorporate V2X (vehicle-to-everything) connection and IoT sensors.
Index Terms – YOLOv8, traffic congestion, Intelligent trans- port systems, real-time detection, deep-learning, and severity evaluation
-
INTRODUCTION
Urban traffic congestion has become a major problem in todays cities because of quick urban growth and the huge increase in the count of automobiles on the roads. The growing need for more traffic has led to major issues because the roads are not keeping up. This has caused longer commute times, more fuel being used, worse pollution, and big financial costs for people and communities. Additionally, traffic congestion elevates stress levels among commuters and hampers the effi- ciency of emergency services, often delaying critical response times in densely populated urban areas. Traditional traffic operation systems, like traffic lights that run on set timers, dont work well for todays traffic problems. When roads get crowded, accidents happen, or there are large events, these systems still follow their set schedules. This makes it hard for them to modify and respond to traffic that moves around a lot and is hard to guess. This often causes longer waits, traffic jams at crossroads, and people wasting time even when
the light is green. This study tries to build and use a smart system that can spot and assess traffic jams as they happen, so that these problems can be handled better. The system uses the YOLOv8 deep-learning model to quickly and precisely identify and classify vehicles in real-time video feeds from various portion of the road. It looks at how busy each part of the road is and figures out how bad the traffic is by seeing how many cars there are and how they are moving. The system also helps officials by predicting how traffic will move in the future, so they can plan roads and manage traffic more effectively over time. Using this real-time data, it dynamically adjusts traffic signal timings to prioritize roads experiencing higher traffic volumes, thereby optimizing traffic flow across intersections. The main aim is to lower traffic jams, cut down delays, and build a smarter, more efficient way to manage city traffic that can quickly adjust to whats happening right now.
-
LITERATURE REVIEW
Traffic congestion is a common problem in cities that drives researchers to create smart systems for monitoring and managing it. Kamble and Kounte [1] proposed a machine learning approach for monitoring traffic congestion in the Internet of Vehicles. Their system used Gaussian process re- gression with GPS trajectory data to predict congestion levels. It provided effective, real-time traffic predictions by using both historical and live data. Gupta and Lee [2] introduced a traffic management method based on Graph Neural Networks (GNNs) to predict congestion in smart cities. By analyzing large traffic datasets, the system offered reliable congestion forecasts and allowed for better route planning, which reduced travel costs and improved urban mobility. Wei and Hong- ying [3] introduced a method for detecting traffic jams that makes use of visual texture analysis. They extracted energy and entropy features from grayscale images to estimate vehicle density, achieving 90% accuracy. Their research showed that texture- based methods can effectively estimate vehicle density in real time. Pangestu et al. [4] applied YOLOv8 for traffic density analysis using CCTV data. Their system detected and classified vehicles in video streams, reaching a training accuracy of 91%. However, they observed variations in perfor- mance when tested in complex real-world situations. Similarly, Pudaruth et al. [5] designed an urban road traffic monitoring system in Mauritius that uses YOLOv8 in real time. Their solution achieved over 91% accuracy in recognizing vehicles
and estimating traffic density, showing that deep-learning algorithms can be a cost-effective way to manage traffic. These studies show significant progress in traffic monitoring and prediction. However, few have combined congestion severity assessment with adaptive traffic signal control. The proposed system builds on YOLOv8s strengths to provide a real- time congestion detection and traffic management framework, aiming to fill this research gap and enhance urban traffic flow.
-
METHODOLOGY
The method uses video from cameras along the road to track traffic. It uses smart learning tools to check and track how much traffic is moving and how crowded it is right now. Each image from the video is checked using YOLOv8, which is a strong tool that can identify and group different kinds of vehicles such as trucks, buses, motorcycles, and cars. The system constantly checks how many vehicles are in the area by counting cars on the road.
Fig. 1: System Architecture
k
N =
i=1
Vi (1)
are applied to enhance the models adaptability to diverse scenarios. Using the annotated images, the YOLOv8 model
Three categories of congestion are created using these data: low, moderate, and high.
Low Traffic, if N 10
undergoes supervised training to optimize its ability to classify and localize different vehicle types. After training, the model is integrated into a Flask-based web interface, allowing users to upload videos for analysis. The model watches the video as
C = Moderate Traffic, if 10 < N 15
Hi gh Congestion, if N > 15
(2) it plays, detects and counts vehicles, checks traffic conditions, and provides results by showing how busy the area is. This
entire system is a real example of using computer vision for
After that, the traffic density is calculated and compared to set limits. To train the YOLOv8 detection model, a manually annotated dataset of traffic images was utilized. The labeling tool was used to create bounding boxes around pertinent vehicle types, and the annotations were saved in a format that works with YOLOv8 trainng. The system has a smart traffic signal control feature that helps improve how smoothly traffic moves at intersections and also detects when theres a lot of traffic. Vehicle density is calculated using real-time video streams from two perpendicular intersections, enabling dynamic traffic monitoring. By reducing how long cars have to wait and get stuck in traffic, this real-time traffic monitoring and signal adjustment method helps make traffic move better in city areas. Since it helps with problems like pollution, traffic jams, and other related issues, this system works well in todays smart city environments. It also give a flexible and cheap solution for handling raising traffic in cities that dont have enough room to construct new roads. When a road becomes very busy, the system changes the traffic light timing to give more green light time to the busier road until the number of cars goes down to a set level. This system helps city traffic run more smoothly by reducing delays and waiting times. It helps make the road system work better and improves how traffic moves around. This is a good choice for current smart cities because it can quickly adjust to traffic changes, which helps lower pollution and help traffic flow.
The whole system uses a Flask web app to monitor traffic
jams along with a YOLOv8 model that identifies objects. This is shown in Figure 1. The process begins with preparing the training dataset, where data augmentation techniques
smart traffic monitoring.
-
IMPLEMENTATION
-
Dataset and Annotation
A collection of over 2,000 road traffic images was utilized to teach us about the vehicle detection technique. Different types of lighting were used to capture the diverse forms of traffic, in- cluding high speeds and busy intersections. Boxes were drawn around automobiles, buses, trucks, and motorcycles in order to classify the photos using the LabelImg program. YOLOv8- compatible text files were used to store labels, including class numbers and special coordinates for training purposes.
-
Model Configuration and training
The YOLOv8 model was configured to detect only vehicle classes relevant to traffic monitoring. The model was trained from the beginning on the custom-annotated dataset to allow the model to learn features specific to traffic congestion detection without relying on pretrained weights. Google Colab through GPU was utilized to conduct training for 20 epochs, using 640×640-pixel images and a batch size of 8. Metrics such as box loss, classification loss, and mean Average Preci- sion (mAP) were monitored throughout the process. The model displayed very good results, with a precision of 92.5%, a recall of 92.7%, and an mAP@50 of 97%, displaying it works well for detection.
-
Congestion Detection and Alert System
The model worked well to check live videos as they played in real-time after it was trained. Every three seconds, the sys- tem refreshed the count of cars and kept looking at each new part of the video continuously. The current traffic conditions were carefully classified using a threshold-based approach. If there were ten or fewer cars, the area had low traffic. If there were between eleven and fifteen cars, the traffic was medium. And if there were more than fifteen cars, the traffic was high. Alerts like High Congestion Detected, which provide quick and useful information about traffic conditions as they change in real-time, were prominently displayed on the system interface to increase user awareness. This feature guarantees effective monitoring and prompt reaction to shifting traffic patterns.
-
Signal Switching Logic
As an experimental enhancement, the system was modified to control traffic lights at an intersection of two roads. Vehicle density on both roads was monitored in real time, and the green signal duration was adjusted based on which road exhib- ited higher congestion levels. This modification demonstrated the potential for integrating congestion detection with adaptive traffic signal management to improve intersection efficiency.
-
-
RESULT AND DISCUSSION
The system was evaluated using both live and recorded traffic video feeds from two road segments exhibiting varying levels of congestion. The congestion detection module accu- rately identified and categorized traffic conditions into low, moderate, and high congestion levels, while simultaneously generating real-time alerts. The adaptive traffic signal system dynamically optimized intersection timings based on real- time vehicle density, prioritizing congested routes to reduce delays and improve overall traffic efficiency. The YOLOv8 model demonstrated robust detection capabilities during both validation and testing phases. The system achieved a precision of 92.5%, recall of 92.7%, and an overall accuracy of 97%, confirming its reliability in detecting and classifying multiple vehicle types under diverse traffic and environmental condi- tions.
In addition to these results, the systems performance was backed by visual outputs and training graphs that showed how well the model learned over time. The training and validation loss kept going down with each training round, showing that the YOLOv8 model learned effectively without overfitting. Precision and recall also kept improving, reaching high and steady levels by the end of training. The test results showed that the model was able to keep more than 90% accuracy in sorting vehicles into four different types, even when the number of vehicles on the road changed. The system also worked well in detecting traffic congestion levels, correctly labeling it as low, medium, or high and adjusting traffic light timings in real time. These outcomes confirm the systems practical effectiveness in live traffic conditions, with promising implications for modernizing city traffic control systems.
-
Training and validation Performance
Fig. 2: Training and validation results for YOLOv8 Figure 2 display how the YOLOv8 model enhance during
training, highlighting clear gains in its ability to detect objects as it learned. The loss values go down over time, meaning the model is making fewer errors. The progressive improvement in precision, recall, and mean average precision scores indicates the models enhanced ability to accurately detect and classify vehicles throughout the training process. This shows the model learned well from the data and is good at detecting traffic jams in real situations.
-
Model Performance Metrics
TABLE I: YOLOv8 Performance Metrics
Metric
Value
Precision (P)
0.925
Recall (R)
0.927
Accuracy (mAP@50)
0.970
F1-Score
0.926
Table I presents the vehicle detection performance metrics, demonstrating YOLOv8s effectiveness in accurately identi- fying vehicles under test conditions. It had a precision of 92.5% and a recall of 92.7%, meaning it found most vehicles with very few errors. Experimental measurements yielded 97% mAP@50 and 92.6% F1 scores, demonstrating the systems effectiveness for vehicle detection in operational road condi- tions.
-
Testing Results
The YOLOv8 model achieved robust multi-object detection in video sequences, as evidenced by sustained high-confidence predictions in frame-by-frame evaluation. The labeled boxes, like those for cars and buses, clearly mark the edges of each vehicle. This helps the model correctly identify and position vehicles even in busy or complicated traffic scenes. The high confidence levels and clear, separate bounding boxes also prove that the system can reliably tell different types of vehicles apart.
As shown in Figure 3, the systems ability to recognize and identify diffrent types of vehicles is important for analyzing traffic congestion. Figure 4 provides a visual representation of real-time traffic congestion levels, offering clear insight into current roadway conditions. After counting all the vehicles in the area, the model uses set limits to decide if the congestion
Fig. 3: Vehicle Detection.
Fig. 4: Congestion Level.
is low, medium, or high. These visual results show how well the system understands traffic patterns and also give useful information for improving smart traffic light control in chang- ing situations. The model is ready to be used in real smart traffic management systems because it works consistently and reliably. However, certain challenges were encountered during deployment. In low-light or night-time scenarios, the system occasionally exhibited minor detection inaccuracies due to reduced image quality. Using the CPU alone caused noticeable delays in processing, which affected how well the system performed over time. Incorporating GPU acceleration significantly enhanced processing speed and reduced latency, enabling the system to meet the stringent requirements of real- time operation in dynamic urban environments.
-
-
CONCLUSION
This study presented a full system that can detect and measure traffic jams in real time. The system uses a YOLOv8 model that was trained on a specially created dataset with vehicle images that have been labeled by hand in various categories. The system can identify and differentiate between various types of vehicles, such as cars, buses, trucks, and motorcycles, in live video footage. It keeps checking traffic movement and changes traffic light timing to give priority to roads that are busier, helping to make traffic move more smoothly and cut down wait times at busy crossings. The test results showed the system works well, with a precision of 92.5%, recall of 92.7%, and a mean Average Precision (mAP@50) of 97%. These high numbers show the model is strong and can handle different traffic situations. This technol- ogy offers valuable applications for modern urban planning. When used in city traffic systems, it can help lower traffic
jams, cut down on bad vehicle pollution, and make roads safer by giving traffic managers useful information about how traffic is moving. Its ability to work in real time makes it a good fit for use in cities with different types of traffic.
For future enhancements, the system can be extended by integrating Internet of Things (IoT) technologies to enable smarter and more interconnected traffic management solu- tions. IoT-enabled traffic sensors and surveillance cameras could deliver real-time data streams from multiple intersec- tions across a city, empowering the system to make holistic traffic optimization decisions on a larger scale. Furthermore, incorporating cloud-based data aggregation and edge comput- ing devices could facilitate faster data processing and low- latency deployments in dense urban environments. To improve adaptability, reinforcement learning algorithms can be used to create smart traffic controllers that can predict traffic jams and make signal changes before problems happen. Combining deep learning, IoT, and adaptive control methods has a lot of potential to build traffic systems that are scalable, efficient, and smart for future cities.
REFERENCES
-
Shridevi. Jeevan. Kamble and Manjunath . R. Kounte, Machine Learn- ing Approach on Traffic Congestion Monitoring System in Internet of Vehicles, School of Electronics and Communication, REVA University, Bengaluru, India,2023.
-
] Kishu Gupta and Chung-Nan Lee, A Vehicle Congestion Prediction Approach for Smart City Traffic Management, Dept. of Computer Science and Engineering, National Sun Yat-sen University, Taiwan,2024
-
Li Wei and D. Hong-ying, Real-Time Road Congestion Detection Based on Image Texture Analysis, Shandong Jiaotong University, China.
-
Indra Bayu Pangestu, Maimunah, and M. Hanafi, Traffic Congestion Detection Using YOLOv8 Algorithm With CCTV Data, Universitas Muhammadiyah Magelang, Indonesia, 2024.
-
S. Pudaruth, I. M. Boodhun, and C. W. Onn, Reducing Traffic Con- gestion Using Real-Time Traffic Monitoring with YOLOv8, University of Mauritius, Mauritius, 2024.
-
Hari K.C., M. Pokharel, and Sushil Shrestha, Video Content Analy- sis for Detection of Road Traffic Congestion Pattern: An Optimized YOLOv8 Based Approach, Department of Electronics and Computer Engineering, Tribhuvan University, Nepal; Department of Computer Sci- ence and Engineering, Kathmandu University, Nepal; Digital Learning Research Lab, Kathmandu University, Nepal, 2024.
-
R. Ronariva, R. Antonio, and S. F. Jorge, Object Detection Algorithms for Car Tracking with Euclidean Distance Tracking and YOLO, 9th International Conference on Computer Science and Computational In- telligence (ICCSCI 2024), Indonesia, 2024.
-
M. Rezaei, M. Azarmi, and F. M. P. Mir, Traffic Net: 3D Traffic Monitoring Using a Single Camera, arXiv preprint, 2021.
-
S. M. Shaqib, A. P. Alo, S. Sultan Ramit, A. U. H. Rupak, S. Sadik Khan, and M. S. Rahman, Vehicle Speed Detection System Utilizing YOLOv8: Enhancing Road Safety and Traffic Management for Metropolitan Areas, arXiv preprint, submitted June 11, 2024.
-
Sternford Mavuchi, T. Magadza, and Racheal Chikoore, Deep Learning for Traffic Congestion Detection: A Survey Paper, Int. J. Innov. Sci. Res. Technol., vol. 8, no. 11, pp. 27902795, Nov. 2023.
