
2023 International Conference on Computer Communication and Informatics (ICCCI), Jan 23-25, 2023,
Coimbatore, India
979-8-3503-4821-7/23/$31.00 ©2023 IEEE
Adaptive Traffic Control System Using YOLO
Sirphy S Dr. S.Thanga Revathi
SRM Institute Of Science And Technology SRM Institute Of Science And Technology
Kattankulathur, Chennai, India Kattankulathur, Chennai, India
ss4913@srmist.edu.in thangars@srmist.edu.in
Abstract- The fact is that, the population and numbers
of vehicles on the road are increasing day by day. With
increasing population and hence number of vehicles,
traffic jam is becoming one in every of the crucial issues.
The effect of hold-up consumes the time of the drivers and
to compensate for the time wasted at the traffic signal the
drivers drive the vehicle in over speed and violate the
traffic rules. The rash driving may also have a chance of
meeting accidents. Also, the effect of the hold-up of the
vehicle on the road for a long time increases air pollution.
One of the factor that affects the traffic flow is the traffic
signal management system we use today. To beat the
issues of traditional control systems there's a shift in
adaption to an Adaptive control system. The Adaptive
control System (ATCS) could be a traffic management
technique that modifies the timing of traffic signals
supported the traffic density. The proposed system uses
image processing and AI to detect the vehicles present on
the road by using traffic cameras at the traffic junction.
The signal switching algorithm is based on the real-time
traffic density calculated by the live images acquired by
the traffic cameras to scale back the traffic congestion.
Keywords—Traffic light control system, Traffic
management, Adaptive traffic control systems, image
processing.
Introduction
Many road networks face traffic congestion due to the current
traffic management system we use in practice. The effect of
the hold-up of the vehicles leads the drivers to harsh driving
and may have the chances to violate the traffic rules or may
cause unwanted accidents. Also, air pollution increases due
to unwanted fuel consumption at the traffic junction. The
main factor which affects the traffic system is the traffic
signal timer we follow today. Those traffic signal timers
operate upon the static timers fixed to them, and they won't
consider the real-time traffic density. The traffic control
system repeats with same phase and duration with no change.
An increase in traffic congestion demands a new solution for
the traffic control system and that can be resolved in this
Adaptive Traffic Control System.
The traffic management method that is currently in use are:
1. Manual controlling:
In this method a man is needed to govern the traffic flow. That
the traffic police are assigned in charge to control the traffic
in the junction. The traffic police controls the traffic by
carrying a signboard, sign light, or whistle.
2. Traffic lights with static timers:
In this method, the traffic lights automatically switch to from
one light to another formulated on the timer value provided.
The timer value is a constant pre-programmed numeric value.
3. Electronic Sensors:
Sensors are placed on the road. These sensors give
data regarding the traffic present on the road. The traffic
signals are managed, by the data provided by the installed
sensors on the road.
The traffic management method that is currently in
use has a drawback for making unwanted hold in the traffic.
That the man controlling the traffic needs manpower to
operate. With the limited number of traffic police, it’s hard to
supervise the traffic by the police in the cities or towns. Also,
the static timer traffic light signals are not much effective.
Since it has a fixed timer to switch the signals, which doesn`t
effective for the real-time traffic present on the road. The
sensors are expensive to install on the road and also the
accuracy of the sensor and its coverage are often been
conflict. Due to the limited range of the sensor, thus it requires
more sensors are to be installed on the road to find the
accurate value.
The CCT surveillance camera is installed at the
traffic junction to provide security. That the cameras are
installed at the traffic junction to monitor. The number of
vehicles and the vehicle classification can be done by
capturing the image obtained at the traffic junction, which can
then be used to operate the traffic light based on the current
traffic density present in the area so that the traffic flow is
optimized and the traffic congestion is minimized. This
proposed system is based on Computer Vision and the traffic
management system is designed based on real-time traffic
present on the road. A live image is captured by the CCTV
camera at the traffic junction and the image is processed by
YOLO to detect the vehicles present in the image. By YOLO
2023 International Conference on Computer Communication and Informatics (ICCCI) | 979-8-3503-4821-7/23/$31.00 ©2023 IEEE | DOI: 10.1109/ICCCI56745.2023.10128619
Authorized licensed use limited to: Zhejiang University. Downloaded on June 11,2025 at 10:40:30 UTC from IEEE Xplore. Restrictions apply.

we can find the vehicle class and the count of each class
present. With the obtained count of the vehicle and the class
of each vehicle, the traffic density is calculated and the time
required to operate the green signal is set accordingly to the
traffic. The lanes with more vehicles get more green signal
time. That the time for green signal depends on the traffic
density present on the lanes. Thus the time for green signal is
optimized and the traffic is reduced as the static traffic
management system which also reduces the cause of air
pollution and saves the fuel for the future.
Literature Review
[1] This proposed system focus on city road junction
with signal intersections. In this model PTV VISSIM, a
microscopic software is used to test the traffic signal lights
and simulation to assist the evolution and testing of different
types of traffic management system. That a thirty two grid
road network in Washington was selected. To find the real-
time traffic scenario, and the traffic data were collected at
each intersection to get an idea of the traffic flow in the city.
“An adaptive linear-quadratic regulator (LQR)” that
operating the traffic in a cyclic manner is designed to reduce
both traffic hold-ups and incremental changes in the control
input.
[2] This proposed system is based on an Arduino-
UNO system which aims to minimize the time spent in traffic.
The CCTV camera installed at the traffic junction is used by
this system to acquire live images. After that, the image`s
saturation and hues are removed to convert the image to a
threshold image, which is done in MATLAB. The density of
the traffic is calculated by counting the number of vehicles in
the image. USB is used to connect the Arduino and
MATLAB. The packages which are required to run the
simulation are installed. Based on the traffic density and the
number of vehicles the Arduino sets the traffic signal time.
The green signal time is set by the Arduino for each direction.
[3] The system proposes a “smart traffic
management system using Fuzzy logic”. The CCTV camera
at the traffic junction installed is used by the system to acquire
live images. A grayscale image is converted from the
captured image to detect the objects in the image to find the
vehicles. To find the count of vehicles present over the image,
segmentation process is done by using the "sliding window"
method. The number of vehicles is done irrespective of the
size of the vehicle. Then ANN is used for the segmented
image. The output obtained from the fuzzy controller is used
to set the timers for the green signal.
[4] Proposes that the captured image is compared to
the initially captured image with no vehicles that the empty
lane image. The traffic density is found using the OpenCV
image processing technique. MATLAB is used to find the
percentage match between the reference and the captured
image, which results in different percentage matches at
different times. Thus on the basis of the percentage matching
the time is allocated for the lanes and control of the traffic
lights.
[5] Proposes that a traffic light signal is operated
upon a sequential manner. The green signal time is set based
upon the traffic density present over the road. The density of
the traffic is hence calculated by image processing using the
YOLO (You Look Only Once). And form the YOLO the
Jason format is converted as an input (count of vehicles) for
calculating the time required for green signal. And hence the
green signal time is depends on the current traffic density.
[6] Proposes a method of controlling the traffic
signal based on the data obtained from the image taken from
the road by the video camera present at the traffic junction.
The traffic control system depends on the traffic density
present on the road. The image processing technique is used
to find the density of the traffic that the total space occupied
on the road is found and calculated in terms of the total space
covered by the vehicles on the road in terms of the “pixels in
the video frame.” The counting of vehicles doesn't take place
in this method. The traffic lights are controlled in a sequential
manner and the weighted time for each lane is based on the
traffic density obtained.
Proposed System
Overview:
Our proposed system uses the CCTV camera
installed at the traffic junction to capture the current traffic
present on the road. The acquired image is then processed
using objection detection to find the density of the traffic
present over the road. The YOLO (You Look Only Once)
algorithm is used to calculate the number of vehicles present
on the road. The YOLO predicts the number of vehicles of
different classes. The signal-switching algorithm gets the
traffic density as an input to calculate the time for green signal
which depends on the density of the traffic. Accordingly, the
time for red light are updated. The time for green signal is set
to reduce the waiting time for each vehicle in all the lanes.
The stimulation is performed to find the system efficiency
over the current system.
Object Detection module:
This proposed system acquires the image captured
by the CCTV camera at the traffic junction and then the
captured image is processed by YOLO (You Look Only
Once) for object detection. YOLO is best known for its
accuracy and processing time. The YOLO module is trained
to detect vehicles, and it detects vehicles of different classes.
YOLO is a “Convolutional Neural Network (CNN)” which
finds objects in the real-time scenario. A signal propagation
(that a single look) is enough for the YOLO to detect the
object. YOLO is an algorithm that is used to recognize and
detect the object class which is present in the picture. It
considers object detection as a regression problem to find the
object in each grid and provide the class probabilities of the
detected image. In a single run, the entire prediction is done
in the image. The class probabilities and bounding boxes are
simultaneously predicted by CNN.
This algorithm is best known for its speed, high accuracy, and
learning capabilities.
1. Speed: It well known for the speed of detecting the
object because it predicts the object in real time.
2. High accuracy: It provides accurate result with
minimum background results.
Authorized licensed use limited to: Zhejiang University. Downloaded on June 11,2025 at 10:40:30 UTC from IEEE Xplore. Restrictions apply.

3. Learning capabilities: YOLO possess good learning
capabilities. That it learns the how the objects
appears and its representations. And applies them in
detecting the object in the image.
YOLO algorithm follows three techniques to detect the
object:
1. Residual Blocks:
As a first step, the image is divided into various grids
like smaller cubes. The below figure shows how the
image is been divided into grids. Every grid cell
detects the object that appears in them.
Figure 1: Blocks in YOLO
2. Bounding Box Regression:
The box that highlights or reveals the object found
in an image is the bounding box. The attributes of
the bounding box are:
• Width of the object (bw)
• Height of the object (bh)
• Class of the object (c)
• Centre of the bounding box (bx,by)
3. Intersection over union (IOU):
The object is detected by the Intersection over Union
by the bounding box. The output of the YOLO is a
box that surrounds the object which is detected in the
image. Every grid finds the object to which it
belongs and its respective scores. The predicted
bounding box is the same as the real object only if
the IOU is equal to one.
Fig 2: Object Identification
Signal Switching Module
The output of the object detection module is
processed as an input to this signal-switching module. That
the vehicle detected by each class and their count is used to
calculate the density of the traffic present on the road. Then
the time for green signal is set based on the traffic density
obtained from the YOLO object detection module and
accordingly alters the red signal timer. Cyclic manner signal
switching is used here according to the timers. The green
signal is set based on the total count of vehicles present on the
lane, and the other signals are adjusted accordingly. That the
lane with more traffic gets more time count for green signal
that the time is increased and the direction with less traffic
gets less green signal time.
The factors considered in developing the algorithm:
• At what point of time the image to be captured to
calculate the density of the traffic in the lane.
• The processing time taken to calculate the vehicle
count.
• The total number of vehicles of each type.
• Whether an emergency vehicle is present in the
traffic if so the signal has to be opened.
• The average speed to cross the intersection by each
class of vehicles
• The range of green signal time to prevent the
starvation of the passengers.
Initially, a default green signal time is initiated for
the first signal and the other upcoming cycles are done by the
algorithm. Two main threads are used in this algorithm,
where the first thread is responsible for detecting the vehicles
present in the direction and the next thread is meant to
calculate the time for green light. When the green signal time
of the operating signal reaches 5 seconds, the next signal
snapshot is taken to calculate the count of vehicles that the
traffic density present in the subsequent road direction. The
obtained result is then used to set the timing for the next
signal. Once the green signal time is zero, both the next and
current signal operates orange signal for 5 seconds to alert the
drivers. Then the subsequent signal becomes green for the
period of time calculated by signal switching algorithm.
The optimum green signal time is found by calculating the
total vehicles of each type and the average speeds of vehicles
to cross the signal per number of lanes.
• GST is the time given for the green signal
• Number Of Vehicles Of Class is the count of
vehicles of each type
• Average Time Of Class is the mean time taken by
the vehicles of each type to pass the junction
• No Of Lanes is the total number of lanes present in
the junction
Authorized licensed use limited to: Zhejiang University. Downloaded on June 11,2025 at 10:40:30 UTC from IEEE Xplore. Restrictions apply.

Fig 3: Flow Diagram
Simulation
Pygame is a python module designed used to create video
games. It contains set of graphics and sound libraries. This
proposed system uses pygame to demonstrate real-life traffic
and controls the traffic with the adaptive traffic control
system.
The simulation module is designed for a four-way
traffic junction with traffic signals for each way. Each signal
has the traffic timer count above the traffic signal light that
indicates the remaining time for the signal to switch. Each
signal calculates the number of vehicles that passes the traffic
junction.
Result and Discussion:
Object detection module:
The object detection module identifies and locates the
object detected in the image with green blocks. The class of
the object detected is found and the value is then returned. It's
used to obtain the total count of each vehicle class and used
to calculate the traffic density. The module was tested with
test images of the different numbers of vehicles and different
types of vehicles of all class. The metric value of object
detection is found to be in the range of 75% to 80%. The
accuracy can be improved by acquiring real-time video or
image from the CCTV cameras and used to train the module.
Signal switching module:
The proposed system is compared to the existing
traffic management system. Ten simulations of both sections
were run with varying traffic distribution over the four
directions. The performance is compared in with respect to
the count of vehicles that cross over the traffic junction in a
unit of time.
The distribution [p,q,r,s] is the mean probability of
vehicles in each lane is p/s, (q-p)/s, (r-q)/s, (s-r)/s
respectively. For example, the distribution is [300, 600, 700,
1000] the probabilities are 0.3, 0.3, 0.1, 0.3. The results are
expressed in the terms of the count of vehicles passed in the
particular road and the total number of vehicles passed over
the junction.
No Mean Distribution Road
1
Road
2
Road
3
Road
4
Total
1 [250,500,750,1000] 73 53 63 62 251
2 [700,800,900,1000] 90 32 25 41 188
3 [300,500,800,1000] 74 44 65 71 254
4 [300,600,800,1000] 70 52 52 65 239
5 [300,600,900,1000] 73 63 69 24 229
6 [400,500,900,1000] 81 29 88 37 235
7 [200,400,600,1000] 42 47 54 86 229
8 [350,500,850,1000]
49 46 69 50 214
9 [300,500,950,1000]
39 52 93 22 206
10 [350,700,850,1000] 51 64 37 43 195
Table 1: Simulation result of present traffic system
No Mean Distribution Road
1
Road
2
Road
3
Road
4
Total
1 [250,500,750,1000] 94 50 60 58 262
2 [700,800,900,1000] 185 25 23 28 261
3 [300,500,800,1000] 89 46 69 56 260
4 [300,600,800,1000] 87 106 38 50 233
5 [300,600,900,1000] 87 68 70 33 258
6 [400,500,900,1000] 97 29 100 34 260
7 [200,400,600,1000] 26 52 67 99 244
8 [350,500,850,1000]
64 53 80 47 244
9 [250,500,950,1000]
52 75 101 7 235
10 [350,700,850,1000] 66 82 40 48 236
Table 2: Simulation result of proposed Adaptive traffic
control system
Conclusion
The adaptive traffic control system alters the time for
green signal with respect to the real-time traffic density
obtained from the CCTV camera. This system also make sure
that the lane with high traffic congestion is allotted a more
time compared to the other less traffic direction. This will
reduce unwanted wait and traffic congestion, which also
reduces consumption of fuel and the cause of pollution.
By interpreting the data from the simulation results,
the proposed system performs more effectively than the static
traffic control method. With further training of the model, the
system can improve its performance in object detection.
The required cost to apply this system is negligible
(low) as the CCTV surveillance cameras are installed already
in the traffic signal reduces the cost and no additional
hardware is required like sensors to control the traffic
management system. Also, the maintenance cost is less as
compared to other modes of traffic control. This adaptive
traffic control system can be deployed with the current CCTV
Authorized licensed use limited to: Zhejiang University. Downloaded on June 11,2025 at 10:40:30 UTC from IEEE Xplore. Restrictions apply.

cameras at the traffic junction to facilitate better traffic
management.
References
1. Hong Wang “Optimizing Signal Timing Control for Large
Urban Traffic Networks Using an Adaptive Linear Quadratic
Regulator Control Strategy” IEEE TRANSACTIONS ON
INTELLIGENT TRANSPORTATION SYSTEMS, VOL.
23, NO. 1, JANUARY 2022.
2. Khushi, "Smart Control of Traffic Light System using
Image Processing," 2017 International Conference on Current
Trends in Computer, Electrical, Electronics and
Communication (CTCEEC), Mysore, 2017
3.A. A. Zaid, Y. Suhweil and M. A. Yaman, "Smart
controlling for traffic light time," 2017 IEEE Jordan
Conference on Applied Electrical Engineering and
Computing Technologies (AEECT), Aqaba, 2017
4. Vedansh Bhardwaj “Image Processing Based Smart Traffic
Control System for Smart City”. 12th ICCCNT 2021-IEEE -
51525
5. Mihir M. Gandhi “ Smart Control of Traffic Light Using
Artificial Intelligence “, 5th IEEE International Conference
on Recent Advances and Innovations in Engineering-
ICRAIE 2020 (IEEE Record#51050)
6. Md. Munir Hasan “Smart Traffic Control System with
Application of Image Processing Techniques”, 3rd
INTERNATIONAL CONFERENCE ON INFORMATICS,
ELECTRONICS & VISION 2014
7. About YOLO https://www.section.io/engineering-
education/introduction-to-yolo-algorithm-for-object-
detection/
8. LabelImg Annotation Tool
https://github.com/heartexlabs/labelImg
9. Pygame Library https://www.pygame.org/wiki/about
10. Traffic Signal Synchronization
https://www.cityofirvine.org/signal-operations-
maintenance/traffic-signal-synchronization
Authorized licensed use limited to: Zhejiang University. Downloaded on June 11,2025 at 10:40:30 UTC from IEEE Xplore. Restrictions apply.

