Analysis and Control of Traffic Using Artificial Intelligence
Analysis and Control of Traffic Using Artificial Intelligence
Seminar Report
On
submitted by:
Pratik Goyal
Roll Number:3146
T.E. Division A
Seminar Guide
Prof.J.R.Tambe
2020-21
Department of Computer Engineering
Amrutvahini College of Engineering,
Sangamner
CERTIFICATE
This is to certify that Mr. Goyal Pratik Dharamveer student in Third Year
Division A, Computer Engineering has successfully completed her Seminar titled
“Analysis and Control of Traffic using Artificial Intelligence” at Amrutvahini College
of Engineering, Sangamner towards partial fulfillment of Seminar Workin Computer
Engineering.
ii
Contents
Abstract i
Acknowledgements ii
Contents iii
List of Figures v
Abbreviations vii
1 Introduction 1
2 Literature Survey 3
5 System Architecture 15
5.1 AI Architecture for Traffic Control System ................................................... 15
5.1.1 Video capturing Method: ...................................................................... 16
5.1.2 Object Detection..................................................................................... 16
5.1.3 Object tracking ....................................................................................... 17
5.1.4 Data collection methods ........................................................................ 18
iii
Contents iv
8 conclusion 28
References 29
iv
List of Figures
v
List of Figures vi
AI Artificial Intelligence
RFID Radio frequency identification
HSV Hue,Saturation,Value
ITS Intelligent transport system
NN Neural network
FS Fuzzy system
GA Genetic Algorithm
vii
Chapter 1
Introduction
Intelligent technologies which are penetrating to different parts of human life don’t
ignore transportation. we can take intelligent transport systems and automated
transport systems which use information, transportation and communication tech-
nologies implemented to vehicles or to infrastructure. These systems aim to in-
crease people or goods mobility along with increasing road safety and transporta-
tion comfort, reduction of transport collisions and impacts on environment. Infor-
mation technologies usage became inherent component of “human“ development.
Ability to effectively process and use information and knowledge became one of the
most important parts of economic growth and prosperity. In transportation, the still
changing environment of many participants, special attention should be paid to
artificial intelligence – progressive information technology.
The standard traffic control systems used are very antiquated compared to the
fast pace of life that we live today. Manual controlling and automatic controlling are
the two most commonly used systems . Manual controlling involves presence of
traffic police where the traffic signals in controlled by his commands. On the other
hand, automatic controlling system uses constant timer technology where the
signal alters after a fixed interval of time. Image processing techniques canbe
implemented to manage traffic control system and avoid the above drawbacks
while providing a more efficient approach. a system where sensors and other re-
lated hardware like RFID active tag, RFID passive tag, and RF reader were used
to identify the presence of vehicle and change traffic light accordingly. A HSV based
approach use the hue and value of the image to determine the day time
1
Chapter 1. Introduction 2
and night time image . Only the value parameter of the images has been included
after analyzing in this research in order to differentiate between the day and night
images.Also contain process of determining the headlights of vehicles to count the
number of existing vehicles on a road at night using gray scale conversion, noise
filtering and background.
As the number of vehicles keeps on increasing and the scale of cities expands
rapidly, growing urban traffic congestion is a serious problem faced by cities around
the world. With the development of communication, computing and control tech-
nologies for intelligent transportation systems (ITS), adopting network-wide traffic
signal control strategies is an efficient way to mitigate traffic. In this framework, the
first and the important step is to establish an artificial traffic model to describethe
dynamics of traffic flows in urban networks which is possible due to influence of AI.
The section I of the study indicates Artificial intelligence definition,characteristics,Main
reasons for successful growing of AI at present, section II of the study express the
influence of AI in transportation. III AI Techniques section IV system architecture
,section V Data collection methods ,section VI Proposed solution for traffic control
and Analysis,Expected result etc.
Literature Survey
Harpal et al. implemented a system where sensors and other related hardware like RFID
active tag, RFID passive tag, and RF reader were used to identify the presence of vehicle
and change traffic light accordingly .
Albagul et al. also developed a system using infrared object detector . The above implemented
systems require a lot of hardware installations and that can often provide erroneous results
due to interference in signals. As a result, image processing is an effective approach
compared to these traditional methodologies.
Choudekar et al. applied edge detection in their research works for detecting vehicles
. However, the detection of the vehicles can be done without the implementation of edge
detection using the comparison of pixels of foreground and background images thus
increasing the efficiency of the system.
Taha et al. implemented a HSV based approach where they experiment the hue and value
of the image to determine the day time and night time image . Only the valueparameter of
the images has been included after analyzing in this research in order to differentiate between
the day and night images.
Perera et al. applied a process of determining the headlights of vehicles to count the
number of existing vehicles of a road at night using gray scale conversion, noise filtering
and background subtraction . Eliminating the mentioned processes, we converted the
RGB foreground image directly to black and white format with a threshold value to
3
Chapter 2. Literature Survey 4
preserve only the headlight pixels eliminating all the unnecessary ones, thus adding to
the overall efficiency of this system.
AI is branch of computer science that involves creation of intelligent machines that work
exactly like humans and possess all the capabilities as that of a human brain.
Artificial Intelligence:
According to these definitions we can say that AI systems are characterized by:
They think like people .
They act like people.
They think reasonably (rational).
5
Chapter 3. What Is Artificial Intelligence 6
They can perform a numerous human function such as speech recognition , learning ,
planning and problem solving . AI is set of algorithm and intelligence to try to mimic
human intelligence .
AI works by combining large amounts of data with fast, iterative processing and intelli-
gent algorithms, allowing the software to learn automatically from patterns or features in
the data.
Artificial Intelligence mainly works on three techniques. They are Symbolic AI, Data-
Driven and Future development. Symbolic artificial intelligent covers Expert systems,
Fuzzy logic and Early principle of AI. An expert system, the computer is given a prob-
lem and few practices were carried out to check its logical problem-solving skills. They
have given a set of rules and they will strictly follow the best in a constrained environ-
ment.In fuzzy logic, it is mostly true or false method and applied in control systems. In
Data-driven machine learning, Neural networks and deep learning algorithm are applied
process the pool of data by data mining and big data and is applied in NLP. It is im- portant
to distinguish between different methods and apply the right one to their level of
maturity.
We all have days where we have to do busy work: dull, boring tasks that may be necessary but
are neither important nor valuable. Fortunately, AI are beginning to address someof
this through human-computer interaction technologies. Virtual assistants like Siri,
Cortana, and Google Assistant perform basic tasks, conversing with the user in natural
language.
Data informs every level of a modern company’s operation. Even small businesses have
a lot of material to interpret, so a major enterprise consumes amounts of information at
a scale equally awe-inspiring and terrifying.
3. Distribute data
Modern cybersecurity drives a need for comparing terabytes of inside data with a com-
parable amount of outside data. This has been a very difficult problem to solve, but AI
are perfect tools for the job.
Every business book written in the past 50 years has sections devoted to developing
efficiency; it is a prized workplace characteristic. A major stumbling block in that pursuit
has always been addressing individual employee traits. Now, some forward- looking
companies are adopting AI to solve the dynamic problems of human behavior.
Industrial automation leader Rethink Robotics builds interactive robot systems driven
by AI. This process not only reduces cost and improves efficiency for the company, but
creates much safer environments for the human workers. The dangerous elements of
manufacturing jobs are supplanted by machines, while the brains behind them remain
safe and human.
However AI theory is developing some decade years already its using had to wait for
progress in IT technologies area. Including AI in transport machines or systems requires:
Computer networks creation and growth as wireless nets, logistic systems, Internet are.
Thanks to this current technical progress Artificial Intelligence contains ways and means
to be used in transportation such as neural nets, AI planning, evolution algorithms,
knowing and expert systems, fuzzy logic, multi-agent systems, vector regression, data
mining, optimizing techniques, etc.
AI at present provides instruments and allows solving problems in each kind of transport
and their interaction (air, road, railway and water transport) and is used in areas such
as:
Design, operation, time schedule and administration of logistical systems and freight
transport.
AI techniques allow using applications for entire transport system managing – vehicle,
driver, infrastructure and the way in which these components dynamically offer transport
services.
AI methods have been introduced to develop innovative traffic control strategies and
fine tune signal timing plans and parameters. These AI applications can be summarized
into the following three categories and detailed in the remaining of this study: neural
networks (NN), fuzzy systems (FS), and Genetic Algorithm (GA). An introduction tothese
AI methods is given below Figure.
10
Chapter 4. Artificial Intelligence Techniques 11
Genetic Algorithm is an evolutionary algorithm. The model is based on three basic design
items: the use of genetic algorithms as an optimization technique, the use of cellular
automata simulators within the evaluation function, and the use of a clusteras a
parallel execution environment for this architecture. The number of traffic signals
contained in the traffic circle under study is supposed to be “N Stages”; the chromosome
encoding consists of the state of every traffic light, at every step of the fixed period. There
are allowed only two possible states: Red encoded as ’1’ – and Intermittent Yellow –
encoded as ’0’. This have been set like this in order to simulate two real world traffic
control commands: ’Stop’ (Red Light) and ’Pass with caution’ (Intermittent Yellow).The
initial population of the GA is created randomly. At random points – for a pair of parent
chromosomes – it selected two random points, cuts them at these positions into three
pieces and then interchanges the central chunk. When an individual is chosen to be
mutated – according to the mutation probability – the value stored at a randomly chosen
position of its. the number of vehicles that left the network during the traffic simulation
carried out.
Fuzzy logic is widely used in a machine control. fuzzy logic has the advantage that
the solution to the problem can be cast in terms that human operators can understand
.Fuzzy control systems include input values in terms of logical variables that take on
continuous values between 0 and 1 based on fuzzy logic. the design of a fuzzy traffic light
controller at the intersection of two streets that changes cycle time depending uponthe
densities of cars behind green and red lights and the current cycle time. A fuzzy model of
the system has been built and tested to predict the behavior of the model underdifferent
traffic conditions. Based fuzzy inference system was used to synchronize the time of
duration and phase angle of the traffic lights, and also maintain the maximum possible
velocity of the vehicles traveling on the road. The classifier event action block can
implement both crisp and fuzzy rules. This system uses one network of traffic light
controller agents at each intersection. Each traffic controller agent uses a fuzzy classifier
block to make decisions about traffic light timing in order to minimize local vehicle
wait time. The traffic data are acquired from the detectors in the intersections and lanes.
Mistakes were possible due to different car lengths, car speeds, and the length of the
intersection. Therefore, this approach consequently reduced car waiting times and start-
up delay times using fuzzy control of feedback data.
Traffic light can be controlled by collecting of information about the number of passing
vehicles, and processing this data. The neural network computes timing information for
the control unit of the traffic lights controller on the basis of the information coming from
the cameras or sensors. ENN is another traffic light control system developedto deal
with object recognition in outdoor environments . In outdoor environments, lighting
conditions cannot be controlled or predicted, objects can be partially occluded, and their
position and orientation is not known a priori. The chosen objects are traffic or road signs,
due to ease of sign maintenance and inventory in highways and cities, driver support
systems and intelligent autonomous vehicles. A neural network can achieve classification
and have presented an intelligent traffic light control method based on extension theory
for crossroads. First, the number of passing vehicles and maximum passing time of one
vehicle within the green light time period are measured in the main-line and sub-line of a
selected crossroad. Some experimental results were obtainedto verify the effectiveness
of the proposed intelligent traffic flow control method. The diagnostic results indicated
that the proposed estimated method can discriminate the traffic flow of a standard
crossroad rapidly and accurately.
4.5 Applications
1. AI In Marketing
With the growing advancement in AI, in the near future, it may be possible for consumers
on the web to buy products by snapping a photo of it.
2. AI In Banking
AI in banking is growing faster than you thought! A lot of banks have already adopted
AI-based systems to provide customer support, detect anomalies and credit card frauds.
An example of this is HDFC Bank.
3. AI In Finance
Ventures have been relying on computers and data scientists to determine future patterns
in the market. Trading mainly depends on the ability to predict the future accurately.
Machines are great at this because they can crunch a huge amount of data in a short span.
Machines can also learn to observe patterns in past data and predict how these patterns
might repeat in the future.
4. AI In Agriculture
AI can help farmers get more from the land while using resources more sustainably.Issues
such as climate change, population growth, and food security concerns have pushed the
industry into seeking more innovative approaches to improve crop yield.
5. AI In HealthCare
When it comes to saving our lives, a lot of organizations and medical care centers are
relying on AI. There are many examples of how AI in healthcare has helped patients all
over the world.
6. AI In Gaming
Over the past few years, Artificial Intelligence has become an integral part of the gaming
industry. In fact, one of the biggest accomplishments of AI is in the gaming industry.
7. AI In Autonomous Vehicles
For the longest time, self-driving cars have been a buzzword in the AI industry. The
development of autonomous vehicles will definitely revolutionaries the transport system.
System Architecture
A.Video capturing
B. Object detection
C. Object tracking
D. Vehicle count
15
Chapter 5. System Architecture 16
The operational benefits of real-time video are somewhat obvious so why would an
agency also be interested in recording or archiving any of this CCTV video footage.
Object detection is a computer technology related to computer vision and image pro- cessing
that deals with detecting instances of semantic objects of a certain class in digital images and
videos. Well-researched domains of object detection include face detectionand pedestrian
detection.
A good framework for real time object detection is Viola Jones Object Detection Frame-
work. It is fast at run time but slow in training. Object detection aids in pose estimation,
vehicle detection, surveillance etc.
Object tracking in videos is a classical computer vision problem. It consists of not only
detecting the object in a scene but also recognizing the object in each and every frame,
so as to distinguish it from other objects, both static and dynamic.
a) Observation: we can count the traffic flow during one day, in some places that suffer
from traffic congestion, in order to get an actual data about transportation flow, peak
hours, and bottleneck, so we can find out where is the most effected aria by traffic
congestion.
b) Ultrasonic, and Image processing Vehicle Detector: Ultrasonic Vehicle detector will be
are installed at 300 m intervals used to detect vehicles based on the difference in arrival
time o f the waves which are reflected from vehicles and roads surface by transmitting
ultrasonic wave towards roadways.
C)We also plan to use a monitoring camera installed over roads which outputs traffic flow
information such as queue length in multiple lanes, volume, classification, occupancy,
presence, and speed. The camera will be strategically placed in the cross-sections at the
most effected aria by traffic congestion Figure 5.6.3. The data will be received and
processed within the model to adjust traffic lights timing to optimize traffic flow in
coordinated traffic lights systems.
Fig 6.1 presents a block diagram of the proposed model. In pre-processing state, day and
night images are differentiated using the methods described in section A. The images of
day and night are processed differently implementing the methods described in section B
and C, respectively.
20
Chapter 6. Proposed Solution For Traffic Control 21
Fig. 6.2 illustrates a block diagram of pre-processing. Firstly, the top half of the foreground
image with the natural light of the sky and artificial light of road lights is cropped out.
Secondly, this RGB image is converted to HSV and vhistogram is computed. According
to Taha et al. bright pixels have v-component value above 150 in a 0 to 255 scale . This
scale has been converted to the range of 0 to 1 scale and used to determine the bright
pixels having v-components value above 0.59.
Firstly, the RGB images are converted to gray scale images and the road portion of the
background image and foreground image is extracted using mask created with specific co-
ordinates for a specific road. Secondly, the foreground image is subtracted from the
background image which results in Fig.6.4(a). After that, the background image is
subtracted from the foreground image to give an output of Fig.6.4(b). The reason for
subtracting twice is that some subtractions result in negative values due to subtraction
from lower dark pixels to brighter higher pixels. Afterwards, the images are binarized
by a threshold value shown in Fig. 6.4(c) and Fig.6.4(d). Then the negative pixels are
discarded while merging the two subtraction results. Fig. 6.4(e) represents the merged
binarized image.
(e) Fig. 6.4. Image subtraction and binarization. (a) Subtraction of foreground from
background. (b) Subtraction of background from foreground. (c) - (d) Binarization of
subtracted result images. (e) Merging of binarized image.
C. Night Time Image Processing Fig. 5 presents a block diagram of night time vehicle
detection procedure.
Fig. 6.5. Block diagram of night time image processing To detect night time vehicles,
the road portion of the foreground image is extracted using mask created with specific
co-ordinates for a specific road. Then the cropped foreground image is binarized by a
threshold value to filter only the pixels with high intensity thus extracting the headlights
which is shown in Fig. 6.4(a).
Two sets of images were used in this system where the calculated accuracy varies from
80 to 100 percent and the average accuracy results out to be 94.10 percent . Compared
to the accuracy of 90.5 percent of vehicle detection at night in the research of Perera et
al. this system achieves a slightly higher accuracy of 94.1 percent .
24
Chapter 7. Experimental Results And Analysis 25
This system achieves an accuracy of 95.08 percent to detect the number of vehicles during
the day compared to the edge detection methodology of Chandrasekhar et al. where the
accuracy was limited to 93.47 percent. Moreover, Hasan et al. approached the detection
of vehicles using the counting of white pixels of foreground image to detecttraffic density
directly . Whereas, this system detects the number of connected white pixels to create
vehicle objects and count their numbers to give a more precise count on the existing
vehicles rather than an overall traffic density.
Logical view – The results reveal that our proposed approach outperforms the other two
MPC control strategies in managing the traffic demands among subnetworks, especially
in the oversaturated traffic conditions. The reason for the lower subnetwork flow is that
the function of MFD is obtained from the curve fitting method, which are not able to
describe the scatter errors in the saturated and oversaturated part of MFD, leading to
inefficient usage of the network maximum flow. It may be solved by adding some
stochastic terms into the MFD function in future work. The similar result is clearly seen
in the MFDs for the three subnetworks. In order to further illustrate that the integrated
MPC approach is superior in distributing the number of vehicles efficiently over each
subnetwork, we utilize the standard deviation (SD) of link densities to analyze the
homogeneous degree within each subnetwork, which is defined as follows
7.1 Algorithm
conclusion
conclusion
we can reduce the possibilities of traffic jams and Accident due to use of AI. Also the
number of passing vehicle on the road decides the density range of traffic and on basis
of vehicle count it decides the traffic light delays.
28
References
[2] The People’s Republic of China Road Traffic Accident Annual Statistical Report(2017).
[3] Article on ’Smart Traffic Control System Using Image Processing ’ Publishedin(2016).
[4] ’Traffic Analysis and Control Using Image Processing ’ an Article Published in(2017).
29