Paper 1
Paper 1
Abstract— This study presents a novel system that utilizes Deep learning can also be used to detect anomalies in the
computer vision and machine learning approaches to address traffic data. For instance, if traffic on a specific road suddenly
the problem of traffic congestion in urban areas. The proposed increases, the system can detect this and adjust the timing of
system leverages the advanced object detection algorithm, You the traffic lights accordingly. This helps to ensure that traffic
Only Look Once (YOLO), to detect and track vehicles in live is flowing smoothly and efficiently at all times. Hence, it is an
camera footage from traffic junctions. The system then effective solution to traffic congestion.
calculates the traffic density in real-time by analyzing the
number and speed of vehicles passing through the intersection. II. LITERATURE SURVEY
The proposed system utilizes an intelligent algorithm that
optimizes traffic flow by switching traffic lights based on the A system that uses AI and image processing approaches to
calculated traffic density. This approach reduces congestion and estimate traffic density from real-time images captured by
minimizes delays, resulting in faster transit times and reduced cameras at intersections [1]. In order to reduce the traffic
fuel consumption and air pollution. To assess the performance congestion, it also concentrates on algorithms for changing
of the proposed system, experiments are carried on real- world traffic signals based on density of the vehicles. This allows
traffic data. The results demonstrate that the system can people to move more quickly and reduce pollution. The
accurately detect and track vehicles with high precision and captured images have been processed in real-time using an
recall rates. The real-time traffic density calculations produced image-processing toolkit YOLO. To estimate the density of
by the system were found to be highly reliable, and the traffic vehicle traffic in all four directions, several parameters have
light switching algorithm led to a significant reduction in traffic been determined. However, it does not address the issue of
congestion and improved traffic flow. The proposed system has preventing starvation of a particular lane due to the lack of
several advantages over traditional traffic management minimum or maximum green signal time.
systems, including lower implementation and maintenance
costs, improved accuracy and efficiency, and the ability to adapt Nazarov et al., proposed a system, which uses the YOLO
to changing traffic conditions in real-time. object detection technique to find and track the objects on
different frames of the video. After the object detection step,
Keywords— Object Detection, You Only Look Once a standard mathematical procedure is used to count the
(YOLO), Traffic Control number of intersections between the vehicles’s current and
previous frame positions. However, accuracy drops when
I. INTRODUCTION vehicles are closer together, dark vehicles and night scenes are
AI based real-time traffic signal control system using challenging [2].
machine learning is a traffic control system that uses artificial Anand and Neethidevan proposed a methodology that uses
intelligence to adjust the timing of traffic lights in order to Darkent architecture with the YOLO algorithm to find every
minimize the congestion and optimize the traffic flow. It object in a video stream that was obtained from a Webcam [3].
employs deep learning algorithms to analyze real-time traffic The Nonmax suppression technique will get a single
data. The algorithm then modifies the traffic light timing prediction per object. The advantage of using YOLOv3 is that
based on the data it has collected, allowing for a more efficient it can able to process 67 frames per second. It is observed that
flow of traffic. This can help reduce traffic delays, improve air the accuracy rate of object detection is improved in the
quality, reduce fuel consumption, and improve safety. proposed method. However, it was only an experimental
This system is being increasingly implemented in cities comparison of various object detection techniques and did not
around the world, as it provides an effective solution to traffic consider the real-world situations.
congestion. The system works by first collecting data from Four types of vehicles such as buses, motor cycles,
traffic cameras located along roads and intersections. This automobiles and trucks are detected and tracked by analyzing
data is then, fed into a deep learning system, which uses the the video footage on road crossing [4]. It is observed that the
data to create an "intelligent" agent that can recognize patterns vehicle route accounting method is quite promising, with
in the traffic flow. This agent then predicts the optimal timing positive outcomes in different scenarios. However, to make
for traffic signals, taking into account multiple variables such these systems robust to occlusions and other unforeseen
as the amount of traffic on the road, and the speed of vehicles. events, considerably more study is required.
The system then adjusts the traffic lights accordingly in order
to optimize traffic flow.
Test data
2. The time module manages the current signal's timer, while 3. When the green light time of the current signal reaches 5
the vehicle detection module is responsible for detecting seconds, the vehicle detection module takes a snapshot of the
vehicles. next direction.
(i) (ii)
(iii) (iv)
(v) (vi)
Figure 3 Results of Vehicle Detection Module (i) Input images (ii) Output images
4. The resulting data is parsed, and the green signal timer is model. Then, modified the configuration of the .cfg file used
set accordingly. for training to match the specifications of our model. To
ensure that the model could detect all the required classes, we
5. Once the green timer of the current signal reaches zero, the adjusted the 'classes' variable by setting the number of output
next signal is activated and it becomes green, and sets it's neurons in the last layer equal to the number of classes.
corresponding signal timer.
The model was trained until the loss was significantly less
This algorithm is designed to be highly scalable and can be after making these configuration adjustments. The weights
easily adapted to handle any number of signals at an were now updated and adjusted according to our
intersection. Signals switch in a cyclic manner, rather than specifications. These weights were given as input for the
based on the density of traffic in a particular direction. detection of vehicles using OpenCV library. A threshold is set
IV. RESULTS & DISCUSSION for successful detection of vehicles. After the image is loaded
in to the model, it outputs the results in a JSON format i.e., in
A. Experiments on Vehicle Detection Module the form of key-value pairs (labels and co-ordinates). From the
The vehicle detection module is implemented using the labels and co-ordinates, bounding boxes on the images are
YOLO algorithm, which provides the better processing time drawn by using OpenCV.
and accuracy. Figure 3 shows the input and output images of Since, YOLO is a real-time object detection algorithm that
the vehicle detection module. Vehicle detection module was offers fast and accurate object detection in images. In our
trained using a customized YOLO model, which can identify proposed system, we chose the YOLO model because of its
a variety of vehicles including bikes, rickshaws, trucks and ability to detect and track vehicles in real-time, allowing us to
buses. The dataset was prepared by scraping images from efficiently process the live camera feed and make timely
google and manually labelling them using a graphical image decisions for traffic signal control. YOLO is specifically
annotation tool, LabelIMG. The pre-trained weights
downloaded from the YOLO website were used to train the
(i) (ii)
Figure 4. Results of signal switching module
(i) (ii)
(iii)
Figure 5. Results of Simulation Module
designed for real-time object detection, making it more also updated as 5+10=15, which is the sum of the
suitable for our traffic signal control system [13]. yellow and green signal timings of TS 2. (Figure
4(ii)).
B. Experiment with Signal Switching Module
C. Experiment with Simulation Module
The results of signal switching module are shown in
Figure 4. The signal switching algorithm depends on the To simulate the real-world traffic, experiments are done
traffic density, total count of vehicles, green light duration, with the simulation module implemented from scratch using
number of lanes etc [14]. Pygame [15]. It helps in system visualization and comparison
with the existing system. There are 4 traffic signals at a 4-way
1. The red signal time of the second signal is set intersection. On top of each signal is a timer that displays the
according to yellow time and green time of first count down timer for the signal which switchers from one
signal and all other signals are loaded with default colour to another colour. Each signal maintains the number of
values (Figure 4(i)). vehicles that have been passed through the intersection. Cars,
2. The leftmost column shows the status of the signal, buses, bikes, rickshaws and trucks come from all directions. It
followed by the traffic signal number, and the current also has a timer that shows the elapsed time from the start of
timers of the signal. Here, TS 1, the first traffic simulation (Figure 5).
signal, switches from green to yellow. The output of Experiments are carried out with different traffic scenario
the vehicle detection algorithm, traffic density is and results are compared with the existing system. The
computed when the yellow timer reaches zero, and average cycle time and the delay time of the proposed and
TS 2 receives a green time of 9 seconds. The green existing system are calculated and tabulated (Table 1). The
signal time of TS 2 is set to 10 seconds because this proposed system is set with the cycle time of 90 seconds. The
number is less than the required green time of 10 cycle time and delay time are calculated for 10 different traffic
seconds. The countdown begins when the yellow scenarios. The test results shows that there is a reduction in
time of TS 1 hits 0, at which point TS 1 changes to delay time and reduction in cycle time ranging from 44.87%
red and TS 2 to green. The red signal time of TS 3 is to 83.20% and 27.78% to 74.44% respectively.
TABLE 1. RESULTS OF PROPOSED SYSTEM AND EXITING SYSTEM IN ACCORDANCE WITH DELAY TIME AND CYCLE TIME
Scenario Delay Reduction Cycle Time Reduction
No in delay in cycle
Proposed Existing System time % Proposed Existing System time %
System (Fixed Timer) System (Fixed Timer)
1 90
13.75 46.6 70.49 45 50.00
2 90
18.02 53.4 66.25 55 38.89
3 90
23.5 47.2 50.21 67 25.56
4 90
22.5 50.5 55.45 65 27.78
5 90
4.25 25.3 83.20 43 52.22
6 90
18.77 54.45 65.53 23 74.44
7 90
28.5 51.7 44.87 76 15.56
8 90
14.5 32.7 55.66 66 26.67
9 90
19.25 53.7 64.15 56 37.78
10 90
22.75 51.3 55.65 53 41.11
60
Delay Time (seconds)
50
40
30
20
10
0
1 2 3 4 5 6 7 8 9 10
Test Scenarios
Figure 6. Comparison of delay time between the proposed system and the existing system
Figure 6 shows the comparison of delay time between the [5] Sung-Dong Kim, “Situation-cognitive traffic light control based on
proposed system and the existing system. Figure 6 illustrates object detection using YOLO algorithm”, International Journal of
Computational Vision and Robotics, Vol. 10, No. 2, pp. 133-142, 2020.
that the delay time of proposed system is less when compared
[6] K. Sai Venu Prathap, D. Srinivasulu Reddy, S. Madhusudhan and S.
to the existing system. Mohammed Mazharr., “Intelligent Traffic Light System Using
YOLO”, Innovations in Signal Processing and Embedded Systems,
V. CONCLUSION Algorithms for Intelligent Systems. Springer, Springer, pp. 95-107,
In conclusion, utilizes an intelligent algorithm that 2023.
optimizes traffic flow by switching traffic lights based on the [7] Jian-Da Wu; Bo-Yuan Chen; Wen-Jye Shyr; Fan-Yu Shih., “Vehicle
Classification and Counting System Using YOLO Object Detection
calculated traffic density. The proposed system ensures that a Technology”, International Information and Engineering Technology
green signal is given longer duration with more traffic than the Association, Vol. 38, No. 4, pp. 1087-1093, 2021.
lesser traffic. This will reduce the traffic congestion, delay [8] Pranav Shinde, Srinandini Yadav, Shivani Rudrake, Pravin Kumbhar .,
time and waiting time, which will reduce pollution and fuel “Smart Traffic Control System using YOLO”, International Research
consumption. The cost required to install the system with Journal of Engineering and Technology, Vol. 6, No. 12, pp. 169-172,
CCTV cameras is negligible and also it does not use any 2019.
additional hardware. Hence, to assist improved traffic [9] S. Ransubhe, M. A. Mughni, C.R. Shiralkar, B. Ratnaparkhi, “Smart
Traffic Light Switching and Traffic Density Calculation Model using
management, the proposed system can be connected with the Computer Vision”. In 2023 IEEE 8th International Conference for
CCTV cameras in large cities. The system performs around Convergence in Technology, pp. 1-5, 2023.
25% better than the existing method, which is a substantial [10] M. M. Gandhi, D.S. Solanki, R. S. Daptardar and N. S. Baloorkar, “
improvement in terms of the number of vehicles crossing the Smart control of traffic light using artificial intelligence”. In 2020 5th
intersection. This system can be enhanced to perform better IEEE International Conference on Recent Advances and Innovations in
calibration using the real-world CCTV data for training the Engineering, pp. 1-6, 2020.
model. This system can also be enhanced by incorporating [11] A. Kanungo, A. Sharma and C. Singla, “Smart traffic lights switching
additional sensor data such as GPS data from connected and traffic density calculation using video processing”. In 2014 recent
advances in Engineering and computational sciences, pp. 1-6, 2014.
vehicles to provide even more accurate and detailed
[12] S. Javaid, A. Sufian, S. Pervaiz and M. Tanveer, “Smart traffic
information about traffic flow patterns. management system using Internet of Things”. In 2018 20th
international conference on advanced communication technology, pp.
REFERENCES 393-398, 2018.
[1] Soham Sawan, Shruti Londhe, Ajitametha, Ankit Kadam, Komal [13] J. Redmon, S. Divvala, R. Girshick, and Farhadi, A.,. “You only look
Mohite. “Adaptive Traffic Signal Timer”, International Research once: Unified, real-time object detection”. In Proceedings of the IEEE
Journal of Modernization in Engineering Technology and Science, Vol. conference on computer vision and pattern recognition, pp. 779-788,
4, No. 11, pp. 99-102, 2022. 2016.
[2] F. M. Nazarov , B. Sh.Eshtemirov, Sh.Sh.Yarmatov., “Technologies [14] B. Pratama, J. Christanto, M. T. Hadyantama and A. Muis, “Adaptive
For identifying Vehicles Standing at Traffic lights Based on Video traffic lights through traffic density calculation on road pattern. In 2018
Data”, Central Asian Journal of Mathematical Theory And Computer International Conference on Applied Science and Technology, pp. 82-
Sciences, Vol. 3, No. 12, pp. 52-59, 2022. 86, 2018.
[3] S. Anand, V. Neethidevan. “A Real Time Object Detection System [15] S.C. Ng, and C. P. Kwok, “An intelligent traffic light system using
Using a Web Cam with YOLO Algorithm”, Association of Cell object detection and evolutionary algorithm for alleviating traffic
Biology Romania, pp. pp.1876-1881, 2021. congestion in Hong Kong”. International Journal of Computational
[4] Durriya Bandukwala, Muskan Momin, Akmal Khan, Aasim Khan, Intelligence Systems, Vol. 13, No. 1, pp.802-809, 2020.
Lutful Islam, “Object Detection Using YOLO”, International Journal
for Research in Applied Science & Engineering Technology, Vol. 10,
No. 5, pp. 823-829, 2022.