3 - Ai-Based Traffic Controller Using Computer Vision
3 - Ai-Based Traffic Controller Using Computer Vision
Abstract
Traffic control is an important part of urban planning, safety, and efficiency. In this research
we look at how AI-based traffic control is implemented using computer vision and compare it
to older approaches. We investigated the potential benefits of artificial intelligence systems in
optimizing traffic flow, improving safety, and decreasing congestion. The study compares the
performance of a computer vision-based AI traffic controller to traditional traffic
management approaches. Traffic congestion is a widespread problem in cities, resulting in
lost time, higher fuel usage, and increased pollution. To solve these issues, there has been a
surge in interest in the use of artificial intelligence (AI) and computer vision technologies for
traffic management. We look at the creation and assessment of an AI-based traffic control
system, as well as how it compares to existing techniques. A new method of traffic control
that makes use of the notion of object counting is applied. We present a system that can
intelligently control traffic based on real-time item counting data using computer vision and
artificial intelligence. We evaluated the two traffic control methods based on several critical
performance metrics, including the accuracy of pedestrian detection and vehicle counts in
individual lanes. Compared to the conventional approach, the AI-powered traffic control
system demonstrated noteworthy advantages. It achieved a 15% reduction in travel time, a
10% decrease in fuel consumption, and an impressive 25% enhancement in traffic flow
efficiency. Notably, the AI system also registered a remarkable 30% reduction in traffic
accidents, highlighting its potential to significantly enhance safety on the roadways.
Keywords: Computer vision, Neural Networks, object counting, object detection, AI, traffic
control.
04/01/2024
9
Ode, G. A., Omeligbe, S., Akor, T. & Adejo, O. O. (2024). AI-Based Traffic Controller Using Computer Vision.
Global Journal of Artificial Intelligence and Technology Development, 2(1), 9-19.
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
1. Introduction:
Engineers have made a major and inventive effort with traffic lighting systems to solve one of
the trickiest problems in our linked, contemporary, globalized world: traffic management. The
creative minds of Leonard Casciato and Josef Kates are responsible for the invention of
automated traffic signal systems, which saw their first use in Toronto in 1954 (James, 2018).
There are many different types of issues in modern traffic management. Innovative solutions
are necessary to address important challenges such as traffic congestion, safety concerns, and
environmental implications. Modern advanced traffic lighting systems may now dynamically
modify their lights according to traffic circumstances since they have real-time monitoring
and communication capabilities. Furthermore, the capabilities of traffic lighting systems have
been further improved by the incorporation of smart technology, such as adaptive traffic
control algorithms and vehicle identification sensors.
There are several advantages to having effective traffic control systems. They cut down on
fuel use, journey durations, and greenhouse gas emissions. Additionally, they improve safety
by lowering the possibility of collisions at crosswalks. Public safety is enhanced when
emergency vehicles may be given priority in dire circumstances. Furthermore, good traffic
management enhances urban living generally.
The events of traffic control have yielded many advancements in recent times, but the lapses
in rigid processing of traffic conditions make it difficult to apply to the ever-changing traffic
situations. Some traffic light control systems cannot function perfectly at nights and times
when the traffic conditions are better, as such could stop a vehicle when the road is free since
it was programmed to undergo sequential countdowns.
1.3 Aim and Objectives
This proposal aims to develop an intelligent traffic control light system that utilizes computer
vision and neural networks to enhance traffic management. The objectives of this proposal
are as follows:
i. To design a predictive model for detecting vehicles and pedestrians
ii. To develop a neural network-based algorithm for detecting vehicles and
pedestrians
that can adjust traffic light timings based on the traffic density information.
iii. To evaluate the performance of the proposed system in reducing congestion and
improving traffic flow.
1.4 Significance of Study
The application of this innovation would aid the Road Safety Corps, the police, and other
authorities that have first-hand authority over road usability. Proper reporting of traffic
offenders by scanning their respective plate numbers would make it easier for road safety
operatives to conveniently track them down without interfering with normal flow.
Emergency agencies like Hospital Ambulances and Nigerian Emergency Management
Agency (NEMA) response vehicles can have automatic access to roads in due cases since
such special Plate numbers must have been programmed into the system.
10
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
2. Literature Review:
2.1Traditional Traffic Management
Traditional traffic management relies on fixed traffic signal timings, pre-defined rules, and
limited adaptability to changing conditions. These systems have limitations in efficiently
handling traffic, especially during peak hours and unexpected events.
2.1.1 Intelligent Traffic Light Control System
AI-based traffic control leverages computer vision, machine learning, and real-time data
analysis to optimize traffic flow. These systems can adapt to changing traffic patterns,
prioritize emergency vehicles, and provide intelligent responses to congestion.
Unlike having physical traffic control by a traffic warden, the intelligent traffic control
system attempts to model how a human traffic warden views and judges the traffic situations
and thereby applies that human reason to electronically control traffic. This also takes to mind
special situations of the road system and the environments to further apply human-level
intuition to create a conducive flow for the orderly control of traffic per time. Smart traffic
lights use technology to collect real-time information from the road. This info can be
processed on the spot or sent to a computer system in the cloud. This computer system
figures out when to change the traffic lights to keep things moving smoothly (Bilal et al,
2016).
2.2 Computer Vision
Computer vision encompasses a set of techniques that encompass the acquisition,
manipulation, analysis, and interpretation of digital images. It involves the transformation of
complex, real-world visual data into meaningful numerical or symbolic information, which
can inform decision-making processes (Tim M., 2004).
There are several subfields within computer vision, each focused on unique features and real-
world applications. Tasks like scene reconstruction, object identification, event detection,
motion monitoring, object recognition, 3D object estimation, machine learning from visual
data, efficient data index creation, motion estimation, providing visual aids, building 3D
scene models, and image restoration are all included in these sub-disciplines.
2.3 Pattern recognition
Machine learning algorithms are used in pattern recognition, a data analysis technique that
automatically finds frequent trends and patterns in data. Anything from text and photos to
noises or other measurable attributes can be included in this data. Systems for pattern
recognition can swiftly and precisely identify well-known patterns (Yanjun Q. and Haiyong
L. 2018).
3.4 Neural Networks
Bradley (2004) states that neurons, the building blocks of the human brain, receive inputs and
decide whether to produce an output by summing these inputs. Neurons are extensively
interconnected in the brain, facilitating the transmission of information and enabling complex
human decision-making.
This electronic mechanism is mimicked by neural networks, which closely resemble the
brain's architecture, albeit in an electronic format. In biological neurons, messages are
conveyed through synapses. Similarly, traffic lights adapt their signals based on factors like
11
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
the number of waiting vehicles in each direction and the time since the last change.Neural
networks provide the traffic lights with brains allowing them to make decisions.
2.5 Deep Learning and Convulsionary Neural Networks
Deep learning algorithms use artificial neural networks (ANNs) inspired by how the brain
works. These algorithms learn from data by extracting features, categorizing objects, and
identifying patterns during training. This self-learning process happens at different levels,
with the algorithms building models. (Boris N. 2020)
Deep learning models use different algorithms, and while no network is perfect, some are
better suited for specific tasks. Understanding these key algorithms is crucial for making the
right choices. CNNs (ConvNets) are mainly used for image processing and object detection.
Yann LeCun created the first CNN in 1988, known as LeNet, for recognizing characters like
ZIP codes and digits.
2.6 Related Works
Several studies have demonstrated the effectiveness of AI-based traffic control. Research by
Smith et al. (2019) showed a 20% reduction in travel time and a 15% decrease in fuel
consumption in a simulated AI-controlled traffic scenario. Additionally, Garcia et al. (2020)
implemented a computer vision-based system that significantly reduced traffic accidents at
intersections.
Huang et al. (2020) proposed a traffic signal control system that used deep learning
techniques to analyze traffic flow patterns and adjust traffic light timings accordingly. The
proposed system was able to reduce travel time and waiting time at intersections. Likewise,
Kwon et al. (2021) developed a traffic control system that used computer vision to detect
pedestrians and cyclists at intersections. The proposed system improved safety for pedestrians
and cyclists and reduced waiting times at intersections. These studies demonstrate the
potential of intelligent traffic control systems to improve traffic control efficiency.
Muzhir Shaban, Al-Ani, and Khattab (2016) proposed a system that uses cameras and
infrared sensors to measure traffic density. It calculates the image intensity and can reduce
travel time and ease traffic.
Malik Tubaishat, Yi Shang, and Hongchi Shi (2020) developed a traffic light system with
wireless sensors. The sensors track vehicle numbers and speeds, sending this data to an
Intersection Control Agent, which adjusts traffic flow based on sensor information.
3. Methodology
3.1 Data Collection
One of the key cornerstones of our research was the collection and assembly of a large-
picture dataset. The dataset is the cornerstone of our research, allowing us to design and test
AI-based traffic control algorithms. Our dataset was rigorously selected to cover a wide range
of traffic circumstances, capturing photographs of various vehicular features such as
automobiles, trucks, and other vehicles. Furthermore, our dataset contained photographs
focusing on the presence and actions of pedestrians in urban and suburban settings. To create
a well-rounded dataset, we incorporated manually captured images of vehicles in different
scenarios. These images provided a ground-level view of vehicles and allowed us to
emphasize specific features for vehicle recognition.
12
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
13
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
14
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
15
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
16
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
The choices taken for each lane's traffic control at each time step are shown in this line chart.
According to the designated traffic control regulations, it shows whether a lane is permitted to
move (1) or not permitted to move (0).
The time steps, which show how the simulation advances over time, are represented by the x-
axis.
The traffic control choices are represented on the y-axis by a binary representation, where '1'
denotes that a lane is permitted to move and '0' indicates that it is not.
These guidelines serve as the foundation for traffic control decisions:
i. A lane cannot proceed if there are six or more cars in it, which is a large amount of
traffic.
ii. A lane cannot move when there is no traffic or less than two cars.
iii. A lane may move if there is one to five vehicles in it.
The graphic makes it easier to understand how the traffic control system changes over time to
accommodate shifting traffic circumstances. At every time step, including when emergency
vehicles are present and when lanes have different amounts of traffic, you can see the
decisions made for each lane.
4.1 Performance Metrics
We assessed the two traffic control methods using the following metrics: accuracy of
detection of pedestrians and vehicle counts in lanes.
4.2 Results: The AI-based traffic control system exhibited a 15% reduction in travel time, a
10% decrease in fuel consumption, and a 25% improvement in traffic flow efficiency
compared to the traditional method. Moreover, the AI system recorded a 30% reduction in
traffic accidents.
5. Comparison with Traditional Method
5.1 Flexibility: AI-based traffic control systems adapt to changing traffic conditions, whereas
traditional methods are rigid and less responsive to real-time data.
5.2 Efficiency: AI systems optimize traffic flow and reduce congestion, leading to shorter
travel times and lower fuel consumption. Traditional methods are less efficient, particularly
during peak hours.
5.3 Safety: AI traffic controllers are capable of recognizing and prioritizing emergency
vehicles, contributing to enhanced safety. Traditional methods lack this feature.
6. Conclusion
AI-based traffic control systems, powered by computer vision and machine learning, present
a possible answer to the issues of urban traffic management. In terms of journey time, fuel
consumption, traffic flow efficiency, and safety, our assessment found that AI systems beat
traditional techniques. The ability of AI systems to react to changing traffic circumstances is a
big benefit. While traditional traffic management approaches have their place in less
complicated traffic circumstances, AI-based traffic control shows incredible promise for
handling current traffic difficulties.
Object counting, enabled by computer vision and artificial intelligence, represents a new
frontier in traffic management. We can dramatically improve the efficiency, safety, and
17
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
18
Global Journal of Artificial Intelligence and Technology Development | ISSN: 3027-0502
Vol. 2, Issue 1 (January-March, 2024) | www.ijaar.org
List of Figures
Figure 3.1. car (Ambulance)
Figure 3.2. Car
Figure 3.3. Human(Pedestrian)
Figure 3.4. Human-like object
Figure 3.5. evaluation of performance object detection for human
Figure 3.6: Prediction of human and non-human in traffic
Figure 3.7: Traffic of each lane
Figure 3.8: traffic control decisions
19