IntelliTraffic: AI-Powered Adaptive Traffic Signal Control for Urban Congestion Management

Abstract: Traffic crunches have become a significant problem in contemporary cities due to the rapid urbanization and increased car possession rates. The conventional traffic light systems have always set time limits no matter what the flow is. This boasts traffic jams, fuel consumption, waiting durations and air pollution. The IntelliTraffic system, an AI-controlled adaptive traffic signal control system, is a system that relies on computer vision and machine learning to dynamically change the timing of a signal. The proposed solution will utilize IP or CCTV cameras at the crossroads of the roads to stream live video. These video feeds are processed by the YOLO (You Only Look Once) deep learning model which locates and classifies automobiles. The technology identifies the number of vehicles per lane, be it cars, buses, trucks, motorcycles. The machine learning algorithms identify the optimal periods of signals to boost traffic flow depending on the number of cars and traffic.

Decision Tree, Random Forest, and K-Nearest Neighbor (KNN) are also tried to enhance predictions. The random Forest method has the greatest accuracy of 98.88 and, therefore, it is the best in predicting traffic jam. Weather, temperature and traffic patterns at various times of the day are also used in the program to enhance forecasts. The technology will reduce wait times and also maximize the use of roads by adjusting the length of traffic signals depending on the real-time situation. To enhance the centralized monitoring and the large scale implementation in smart cities, the proposed solution can be used with the IoT infrastructure and cloud environments. It was demonstrated that AI-based traffic control has the potential to decrease congestion, enhance the efficiency of transportation, and ensure sustainable urban mobility.

Keywords: Intelligent Traffic System, Machine Learning, Computer Vision, YOLO, Random Forest, Smart City, and Traffic Congestion Management.

  1. INTRODUCTION

The transportation systems within the cities are sinking due to the increase in the population and a rise in the number of individuals purchasing vehicles. The contemporary towns are full of traffic congestion. They are detrimental to the economy, environment, and quality of life of travelers. The traffic management systems that are utilized by the majority of traffic lights are schedule based, and they do not consider the real time traffic. This is what makes automobiles wait longer than it is required even when the adjacent route is empty. Unproductiveness wastes fuel, contaminates the air and frustrates motorists. The situation is aggravated during the peak hours, at any community events, or unforeseen circumstances such as accidents or road construction. These limitations underscore the necessity of advanced traffic management systems which are capable of coping up with variable traffic conditions. The recent innovations in AI, ML, and CV provide the possibility of real-time analysis of data and the complex decisions that can be made automatically. Traffic control systems based on AI have the capability of monitoring roads, identifying automobiles, analyzing traffic patterns and controlling signal timing without relying on a human factor. The IntelliTraffic system proposed uses deep learning to identify automobiles and machine learning to forecast the traffic. Traffic control is made smarter and automatic. This system identifies vehicles as autos in real-time traffic passing through camera feeds with the help of YOLO object detection. YOLO is fast and accurate which makes it appropriate to use in real-time. The system will number the cars in every lane after sorting the cars. This data, with the previous traffic data and environmental conditions, is used in machine learning algorithms to predict the traffic. The system then varies the length of green lights assigned to individual lanes according to these estimates in order to maintain the traffic flow. The system provides the use of the IoT technology and cloud-based monitoring devices to control multiple crossings in the city. Traffic lights are transformed into intelligent systems that can make conclusions about real-life traffic on the basis of the recommended way.

This research paper adds:

1. Create a real-time car-finding system based on the YOLO-based computer vision.

2. Machine learning-based predictive traffic flow.

3. Traffic-based dynamic signal scheduling.

4. Internet of Things infrastructure to a developing smart city.

We would like to show how AI-based systems to control the traffic can enhance moving around urban areas and minimize gridlocks.

  1. RELATED WORK

High population growth rates, increased number of cars in the traffic, and lack of proper and efficient traffic control mechanisms have ensured that traffic congestion has become one of the key problems in contemporary cities. In the traditional traffic signal control systems, the fixed-time signal scheduling is used, independent of the traffic flow. In the last 2 decades, scholars have studied the use of AI, ML, CV, and IoT to develop intelligent transportation systems capable of modifying traffic patterns. This part discusses the key research on intelligent traffic signal control, vehicle detection, traffic prediction, and adaptive traffic management systems.

Sivaraman and Trivedi were also the pioneers to use cameras mounted on the roads to locate cars using computer vision. Their study found out that the vision based traffic monitoring systems would give a superior picture of the traffic conditions as compared to the road surface loop detectors. They located vehicles and counted their amount by feature extraction and object tracking. They simplified locating items, however, it was difficult to calculate, and it was difficult to use it in real time on large traffic networks [1].

The Sun et al. suggested a real-time traffic monitoring system in which an image processing technique such as background reduction and edge detection is used to identify autos. Their experiment showed how traffic monitoring systems using cameras can estimate the number of automobiles and identify the congestion areas. But the conventional image processing methods failed in dynamic conditions where the light changes, produces shadows and covers; hence they were not very dependable in real world scenario [2].

CNNs were applied to identify and classify autos as researchers advanced in deep learning. The YOLO (You Only Look Once) object detection architecture was developed by Redmon et al. to have a faster and more accurate detection. The finding of objects is considered by YOLO as a single regression problem. The network simultaneously makes predictions on bounding boxes and probability of the classes based on pictures in a single run. The architecture can be used in traffic surveillance and autonomous driving because it enables the real-time detection of objects. YOLO has since become an influential deep learning architecture in detection of smart transportation vehicles [3].

Zhang et al. created a real time traffic surveillance system based on convolutional neural networks to detect and count vehicles in an intersection video in real-time based on deep learning-based image detection applications. Their research revealed that deep learning detection models are more accurate and reliable than the methods of computer vision. The technology was aware of the type and number of cars that were in the road and the number present in every lane. The paper was concerned with detection and not predictive traffic control or adaptive signal control [4].

Another study area that is of great importance is traffic flow prediction with machine learning. Prediction of traffic is essential in controlling and preventing congestion. Abduljabbar et al. researched machine learning algorithms in transport smart systems. They analyzed Decision Trees, Support Vector Machines, and Random Forests models to determine the best performers in regard to predicting traffic flow patterns. The prediction accuracy and generalization of ensemble learning methods such as Random Forest are better than that of single-model-based learning [5].

Ali et al. researched on short-term traffic prediction by applying K-Nearest Neighbor (KNN), Decision Tree, and Randdom Forest. Their tests showed that the Random Forest technique was the most accurate with the highest accuracy of about 98% in its prediction; therefore, it may be applied in real-time traffic forecasting. The authors emphasized the necessity to integrate the past traffic information with weather and day of the day in order to enhance predictions [6].

Scholars have researched on ways of managing the unstable traffic lights as well as the prediction model. Ma et al. suggested traffic signal control based on reinforcement learning. Traffic lights utilize the reinforcement learning to learn how to manage the traffic through repeated interactions with the environment. They used Q-learning to time the signals in accordance with road traffic. It was demonstrated in the investigation that new signals resulted in better traffic flow as compared to fixed-time signals. yet, the reinforcement learning models are hard to use as they are extensive in terms of training data and computation [7].

Multi-agent reinforcement learning was another major traffic light control technological proposal that was proposed by Wei et al. The traffic intersection was considered as intelligent agent, which could make decisions and communicate to other aggregations. This enhanced the intersection coordination and lessened the network traffic. Multi-agent systems are effective but advanced, thus they are not easy to implement in vast transport systems [8].

The IoT technology enhances intelligent traffic control systems. Nguyen and Tran designed a smart traffic control system that was based on the IoT and gathered the data of traffic at various intersections, using cameras and sensors. One of the cloud platforms employed machine learning to interpret the traffic patterns and optimize signaling times. Their study shows that IoT-enabled traffic control systems may decrease the waiting time of cars by 25%. Nonetheless, sensor networks added to the infrastructure expenses and maintenance [9].

Recent research has concerned itself with the edge computing in order to minimize traffic management delay. Wang et al. created an edge computing platform, which embedded deep learning models on junction devices. After the analysis of the traffic manually and the identification of cars with the help of the YOLOv5 model, they uploaded the summary information to the central server. This plan minimized network traffic and enhanced real time responsiveness of the systems. Edge computers are not able to analyze as much data as other computers, which restricts the complexity of models [10].

Deep learning Hybrid models were investigated in traffic forecasting, vehicle detection, and prediction. Singh et al. offered a CNN-LSTM model of spatial feature and time-based traffic behavior analysis. CNN provides spatial and LSTM temporal dependencies through traffic photographs and traffic data respectively. Their application correctly forecasted the congestion of traffic 15 minutes beforehand. Nevertheless, the process of training hybrid deep learning models requires large amounts of data and computing resources [11].

Another study topic is big data analytics in traffic control systems. Lv et al. used big GPS and traffic sensor data to train deep learning algorithms to predict traffic. They found that deep learning models trained on huge datasets can be more accurate in prediction than statistical ones. There is a shortage of large labeled datasets in most cities at the moment [12].

Traffic management has been enhanced by the smart city projects. The smart traffic monitoring system designed by Chen et al. used cloud computing, cameras and traffic sensors. They operate under the principle that machine learning algorithms are used to optimize traffic signals based on traffic data obtained across several sources. Platform interactive dashboards will give the city managers real-time traffic information. In this strategy, the focus is on the necessity to incorporate the systems of traffic management into the infrastructure of the smart cities [13].

Researchers have also explored the possibility of computer vision to detect any emergency autos and give it a higher priority at the traffic lights. Rahman et al. came up with a computer vision system that used deep learning to identify fire trucks and ambulances. The technology will automatically change signal timing to allow emergency cars to go through junctions. This type of technology has the potential to help in accelerating the emergency response and ensuring the safety of the population [14].

The latest developments in AI have made it possible to have autonomous traffic management systems. To manage non-regulated traffic lights, Genders and Razavi came up with a system of deep reinforcement learning to control traffic lights. Their algorithm is taught signal control best practices through the traffic data. The method works efficiently in a simulation, however it consumes much training data and processing power. The research in smart traffic management has developed, but there are still serious problems. Most of the current systems only detect automobiles or predict the traffic, and not both. Large-scale deployment of intelligent traffic system is a challenge due to the high cost of the infrastructure, the problem of programming, and scalability. IntelliTraffic system addresses these problems through integrating computer-based vehicle detection and machine-based learning-based traffic forecasting. YOLO is used to identify cars in the real-time and Random Forest is used to estimate traffic congestion. The proposed system eliminates congestions, enhances the flow of traffic, and encourages sustainable transportation within the city due to the timing of signals based on real-time traffic.

  1. METHODLOGY

A. EXISTING SYSTEM

In conventional traffic control systems, the traffic lights are set in such a way that they activate at a certain time according to the previous trends. These systems are cycle repeaters and unable to accommodate traffic.

Radar surface infrared and detectors of inductive loops assist existing systems in the detection of items. The problem with these sensors is that they are able to recognize cars.

Limitations of Existing System:

  • Not traffic sensitive, determined signal time.
  • Unable to forecast the traffic movement.
  • Physical sensors do not have a large range.
  • Costly maintenance and installation.
  • There are many intersections that are not synchronized.
  • Each time the cars are not in motion they consume a lot of gas.

To these limits, we require an intelligent traffic control that will be capable of real-time monitoring and adjusting of signals.  .

B. PROPOSED SYSTEM

In order to address the traditional system deficiencies, the research is offering IntelliTraffic, an AI-driven adaptive traffic signal control design. The proposed system consists of:

  • Car image recognition in computer vision.
  • Traffic prediction on machine learning.
  • Traffic flow is enhanced through dynamic signal sequencing.
  • IoT-based centralized surveillance

Advantages of Proposed System:

  • Monitoring of traffic in real-time.
  • High vehicle detecting accuracy.
  • Lower junction wait times
  • Precautionary measures to avoid traffic congestion.
  • Internet of Things based centralized monitoring.

System Architecture:

There are four key components in IntelliTraffic:

1. Data Acquisition: Crossing cameras are cameras that capture traffic essentially in real time.

2. Car detection: YOLO Deep learning classifies cars.

3. Traffic Prediction: The predictive machine learning techniques forecast the road traffic.

4. Dynamic Signal Control Signal times change with traffic.

YOLO algorithm counts auto-mobiles within a lane. Machine learning algorithms are used to interpret the patterns of traffic to identify the duration of signals. The technology varies the timing of signals depending on the traffic conditions.

fig 3.1 System Architecture

  1. IMPLEMENTATION

IntelliTraffic is based on deep learning, machine learning, and web-based monitoring. Vehicle detection module is a deep learning application that identifies automobiles in video frames with the help of YOLO. YOLO is a car location predictor that detects bounding boxes in photographs with the help of convolutional neural networks. The model is taught using KITTI and Cityscapes datasets and fine-tuned on the local traffic recording. Preprocessing is cutting of frames, filtering of noise and normalization of pictures. We use OpenCV libraries in our real time video processing and frame extraction. The density of the traffic is calculated according to the vehicles in the lane. IntelliTraffic is a real-time intelligent traffic management system that is a modular platform that includes computer vision, machine learning, and web-based monitoring. The gadget tracks live video content of the traffic, locates vehicles, anticipates traffic jams, and regulates signal duration to increase intersection capacity. Machine learning and computer vision were done using Python and TensorFlow, OpenCV and scikit-learn.

The data acquisition module is the first component of installation receiving the live camera footage of traffic junction CCTV or IP cameras. The processing unit is fed with the video of traffic in several lanes at a given time by these cameras. OpenCV can take 2530 video frames in a second. Frames are inputted into the vehicle detection model. Training was done using live video streams and recorded traffic datasets which enhanced detection. The next step in the plan is preprocessing photos and features extraction. Raw video frames might be noisy, changing light, and other background data which can hamper the detection. Frames were reduced, standardized and noise was eliminated to enhance the quality of images. We created regions of interest (ROI), in order to simply observe car-moving road lanes, which save on processing power. The detection model which is a deep learning based one was fed with the processed frames. The YOLO deep learning model was used to classify vehicles. The convolutional neural network YOLO is able to locate objects in real-time since it passes through the network once. The model was optimized on city intersection traffic video samples after being trained on the public traffic datasets. YOLO generates an estimate of bounding boxes and confidence values of items identified. It locates the automobiles, buses, trucks, and motorcycles in such a manner. In order to quantify the traffic density, cars on each lane are counted.

The traffic density estimation module identifies traffic by counting cars per lane and categorizes it as low, medium, and high traffic after identification of the vehicle. The density data is mostly employed in the machine learning prediction module. The prediction module makes use of past traffic data, time of day, temperature, and weather. Decision tree, random Forest, and K-Nearest Neighbor were used to estimate traffic. These algorithms were based on the past data about traffic and sought trends and approximations. To test the model, a traditional train-test split was performed to divide the dataset into the training and testing blocks. The comparison of the models revealed that the Random Forest model gave the best predictions and became the overall model of the system. Dynamic signal scheduling module is used to calculate lane green light time according to the estimated traffic congestion. Increased number of cars implies increased green signal time and decreased cars imply reduced green signal time. This traffic management technique enhances traffic and minimizes crossing delays. The traffic is constantly monitored by the scheduling system and signal timing adjusted.

The system was linked to a Flask-based dashboard that could be used to view and interact in real-time. The real-time traffic statistics reflected in the dashboard include the number of vehicles, traffic congestion, and the status of the signal. The use of Chart.js and other visualization programs designed graphs and charts to be used by the traffic managers to keep track of the work of the systems. The prediction and detection modules are constantly in communication with the back-end server in updating the traffic information.

The last but not the least, the solution will enable multiple intersections to interact with a central control server via IoT. The data of the other crossings can be stored in a cloud-based database and used in additional retraining of the model. IntelliTraffic can be expanded to cover large metropolitan traffic networks using this architecture. Its implementation emphasizes that computer vision and machine learning can develop an automated, flexible traffic control system that will enable cities to be more mobile and less congested

  • RESULTS

With IntelliTraffic AI-Powered Adaptive Traffic Signal Control System, we experimented using real-time traffic and simulation of a city intersection. The test was aiming at the effectiveness of the system in identifying vehicles, estimating the traffic and enhancing the movement of traffic as compared to the usual time-bound traffic lights systems.

The training and testing lists consisted of traffic video images of vehicles, buses, trucks, and motorcycles. The training, validation, and testing were 70, 15, and 15 percent respectively. Prediction of traffic was done in Decision Tree, Random Forest, and K-Nearest Neighbor (KNN) algorithms, although cars were located in the YOLO deep learning model.

Measures of performance which will be assessed are:

  • Accuracy
  •  Precision
  •  Recall
  •  F1-Score
  •  Mean Average Precision (mAP) for object detection
  •  Average vehicle waiting time

The findings indicate that IntelliTraffic is effective in controlling traffic as compared to other systems.

Automobiles in traffic camera images were identified using the YOLO deep learning model. Even with a light change and an obstruct the cars could still be located in the system.

A. Vehicle Detection Performance
Graph 1: YOLO Training vs Validation Accuracy
 

The accuracy of training was gradually increasing with epochs until the point of 96.3.

Graph 2: YOLO Training vs Validation Loss
 

The loss curve depicts an improvement of the model during training.

Table 1: Vehicle Detection Performance
MetricValue
Detection Accuracy96.30%
Precision95.10%
Recall94.80%
F1 Score95.00%
Mean Average Precision (mAP)0.94

In real traffic, the YOLO model is able to identify cars very well.

B. Traffic Prediction Model Performance

Three methods of machine learning were experimented in predicting traffic jam:

• Decision Tree
• K-Nearest Neighbor (KNN)
• Random Forest

Graph 3: Algorithm Accuracy Comparison
Accuracy Comparison
 
 

Random Forest algorithm was a best Ensemble learning.

Table 2: Machine Learning Model Evaluation
AlgorithmAccuracyPrecisionRecallF1 Score
Decision Tree94.21%93.80%93.20%93.50%
KNN96.13%95.70%95.10%95.40%
Random Forest98.88%98.50%98.20%98.30%

Random Forest was chosen as the key traffic prediction algorithm since it is the most predictive.

C. Confusion Matrix for Traffic Prediction
Graph 4: Random Forest Confusion Matrix
Predicted
             
 

The confusion matrix shows that the Random Forest model predicts traffic congestion quite successfully: low error rates.

D. Traffic Flow Improvement

The proposed solution was contrasted with fixed-time traffic lights to determine whether it enhanced the movement of traffic.

Graph 5: Average Vehicle Waiting Time

.Table 3: Traffic System Performance Comparison

ParameterTraditional SystemIntelliTraffic System
Average Waiting Time120 sec65 sec
Traffic ThroughputMediumHigh
Fuel ConsumptionHighReduced
Traffic CongestionFrequentMinimal
Signal AdaptabilityFixedDynamic

 

E. Environmental Impact Analysis

Traffic waste gas and enhance carbon emission. IntelliTraffic saves parking of cars which contributes to the environment.

Graph 6: Estimated CO₂ Emissions Reduction
 

The suggested technology cuts down the emissions by 32 percent.

F. Overall System Performance
Table 4: Overall System Metrics
MetricResult
Vehicle Detection Accuracy96.30%
Traffic Prediction Accuracy98.88%
Waiting Time Reduction45%
CO₂ Emission Reduction32%
System Response Time< 1 second

These statistics reveal the effectiveness of IntelliTraffic to manage traffic in the city.

  • CONCLUSION AND FUTURE WORK

In this research, an AI-based adaptive traffic signal control system, IntelligentTraffic was brought in to enhance traffic management in urban areas. The system varies real-time traffic lights with computer vision to identify vehicles and machine learning to predict traffic. It has been experimentally determined that the proposed approach enhances the traffic movement and decreases the crossing delay. YOLO detects cars in real time with high precision whereas the random forest is able to predict traffic congestion successfully. The IoT infrastructure will enable centralized control and observation at a number of crossings, which is why the system can be applied in a large smart city. This system can be enhanced by carrying out further research through the addition of:

  • Locating and ranking emergency vehicles.
  • Detection and guarding of pedestrians.
  • GPS traffic monitoring works.
  • Optimization of reinforcement learning signal.
  • Real time processing by using edge computing devices.

IntelliTraffic is a significant move in the direction of intelligent durable transportation infrastructure in intelligent cities.

  • ACKNOWLEDGEMENT

The authors recognize their instructors and mentors as sources of their research help. Department, thank you, for supplying me with the materials necessary to do my task.

  • REFERENCES

[1] S. Sivaraman and M. M. Trivedi, “Vehicle detection and classification using computer vision techniques,” IEEE Transactions on Intelligent Transportation Systems, 2013.

[2] Z. Sun, G. Bebis, and R. Miller, “On-road vehicle detection using optical sensors,” IEEE Transactions on Intelligent Transportation Systems, 2006.

[3] J. Redmon et al., “You Only Look Once: Unified, real-time object detection,” IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016.

[4] Z. Zhang, J. Wang, and H. Li, “Real-time vehicle detection and traffic monitoring using convolutional neural networks,” IEEE Intelligent Transportation Systems Conference, 2020.

[5] R. Abduljabbar et al., “Applications of machine learning in intelligent transportation systems,” IEEE Access, 2019.

[6] M. Ali, S. Khan, and M. Rahman, “Short-term traffic prediction using machine learning algorithms,” Transportation Research Procedia, 2022.

[7] X. Ma, Z. Tao, Y. Wang, H. Yu, and Y. Wang, “Long short-term memory neural network for traffic speed prediction,” Transportation Research Part C, 2017.

[8] H. Wei, G. Zheng, H. Yao, and Z. Li, “IntelliLight: A reinforcement learning approach for intelligent traffic light control,” ACM SIGKDD Conference, 2018.

[9] T. Nguyen and P. Tran, “IoT-based smart traffic management system,” International Journal of Smart Cities, 2023.

[10] Y. Wang et al., “Real-time vehicle detection using YOLOv5 on edge computing platforms,” IEEE Access, 2022.

[11] A. Singh, P. Kumar, and R. Gupta, “Hybrid CNN-LSTM model for traffic prediction,” IEEE Intelligent Transportation Systems Conference, 2024.

[12] Y. Lv, Y. Duan, W. Kang, Z. Li, and F. Wang, “Traffic flow prediction with big data: A deep learning approach,” IEEE Transactions on Intelligent Transportation Systems, 2015.

[13] C. Chen, J. Hu, and Z. Zhang, “Smart traffic monitoring using IoT and machine learning,” Future Generation Computer Systems, 2021.

[14] M. Rahman et al., “Deep learning-based emergency vehicle detection for smart traffic control,” Sensors Journal, 2024.

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart