Professional Documents
Culture Documents
Institute of Engineering: Tribhuvan University
Institute of Engineering: Tribhuvan University
Institute of Engineering: Tribhuvan University
INSTITUTE OF ENGINEERING
THAPATHALI CAMPUS
A seminar paper on
by
Anwesh Ghimire
27257
A REPORT
DEGREE OF
KATHMANDU, NEPAL
May, 2022
COPYRIGHT
The author has agreed that the library, Department of Industrial Engineering, Thapathali
Campus, Institute of Engineering may make this Report freely available for inspection.
Moreover, the author has agreed that permission for extensive copying of this Report for
scholarly purpose may be granted by the professor(s) who supervised the work recorded
herein or, in their absence, by the Head of the Department wherein the Report was done.
It is understood that the recognition will be given to the author of this Report and to the
Department of Industrial Engineering, Thapathali Campus, Institute of Engineering in
any use of the material of this Report. Copying or publication or the other use of this
Report for financial gain without approval of the Department of Industrial Engineering,
Thapathali Campus, Institute of Engineering and author’s written permission is
prohibited. Request for permission to copy or to make any other use of the material in
this Report in whole or in part should be addressed to:
Head
Kathmandu, Nepal
2
TRIBHUVAN UNIVERSITY
INSTITUTE OF ENGINEERING
THAPATHALI CAMPUS
The facts and ideas presented in this paper are an outcome of the student’s hard work
and dedication to the project, undertaken as a partial fulfillment for requirements for
degree of
_____________________ _____________________
_____________________
Head
3
ABSTRACT
Managing road traffic management has always been a hassle in the context of Nepal.
Daily commuters face some sort of obstacles on the road almost every day. Even with the
prevalent problem, the traffic management has not achieved any impeccable outcomes
over the years. The rate of vehicle sales growth shows that the problem of traffic
management is not ending anytime soon with only the use of current technology and
system. Relating to the context this paper talks about how machine learning can be used
to help ease the traffic management system of Nepal.
Machine learning is a medium in which a large number of data is fed and the system
allows to learn patterns and similarities in those data or behavior in those data to proceed
with the required task. The road traffic management system that uses machine learning
can also be termed as intelligent traffic management system. Such technology is being
used worldwide to facilitate efficient traffic management.
Machine learning system for road traffic management uses technology such as object
detection and image segmentation to track the traffic on the road. Such technology can
then be used to predict and reduce traffic congestion and also track road law violations.
Since the process requires high power computers and cameras, the direct methodology
could not be used for this report. However, I was able to source my video of a traffic
junction as a data to an image tracking software which processed my data and gave me
the result as required.
The result was astonishing but as expected. It was able to track and predict the traffic
congestion and also find several road law violations that manual or human traffic officers
had a blind eye on. This report talks about the process of how machine learning can be
used to manage road traffic in detail.
4
ACKNOWLWDGEMENT
Finally, I also extend my thanks to all the teachers, faculty members and classmates for
their time and support during the course of my study.
5
TABLE OF CONTENTS
COPYRIGHT ............................................................................................................. 2
ABSTRACT ................................................................................................................ 4
ACKNOWLWDGEMENT ........................................................................................ 5
6
4.1 Case Study ............................................................................................ 17
REFERENCES ......................................................................................................... 23
ANNEX A ................................................................................................................. 24
ANNEX B ................................................................................................................. 26
ANNEX C ................................................................................................................. 27
7
LIST OF FIGURES
8
LIST OF ACRONYMS AND ABBREVIATIONS
9
CHAPTER ONE
INTRODUCTION
Intelligent Traffic System (ITS) has been developed to solve the road traffic condition
globally. It uses supported data, such as airborne optical remote sensing sensor, wireless
signal communication (i.e. probe vehicle-to-vehicle). Nevertheless, in the developing
countries, the first problem is that the data is not available because of the expensive
infrastructure and maintenance cost. Another alternative is utilizing data from traffic
video and captured image with manually processing by human. Manually processing
requires handcrafted features and manual calculation like calculating the distance and the
level of the traffic congestion between vehicle. Manually processing depends on the
human ability and requires time which is not short.
Through machine learning. a method to detect the road traffic congestion automatically
by utilizing the data from CCTV camera image feeds can be used. Convolutional Neural
Networking and processing of the data can be implemented to overcome the limitations
and even increase the efficiency of TMS.
10
based on the input of the video sequence extracted from the convolutional neural network.
The training process was implemented using the convolutional neural network topology
built using the YOLO algorithm. This technique works with spatial recognition of objects
in video frames. This was considered an input to most tracking algorithms. TMS using
machine learning also uses a rectangular region of interest (ROI), where segments
objects. Features of the Intelligent Traffic Signal Management System takes the picture
of the Transportation Hub and update it to the cloud using the CloudVision API Density
Help. The type of vehicle in the traffic that needs to be detected is taken as input and
updated using the Cloud Vision API density in the cloud. The vehicle type is detected
and then the status is sent to the previous signal. The previous signal, which is the current
signal, checks for the status of the next signal and continues operation. This process helps
the trigger an RFID placed next to the signal and detect vehicles passing through the
platform. As a result, the IoT and machine learning cameras use the sensor with two
controller boards. The camera sensor captures details from the trace and transfers the data
to the first controller board. The control panel uses this to adjust the traffic light and the
traffic light as appropriate. The MinMax fairness algorithm is used after estimating the
difference of between the counts of the two lanes. Lane, which has the lowest average
wait time, has priority.
11
Suppose we have input feature that represented as a two-dimensional feature map 𝑥𝑥with
size P1*X1, convolutional kernel 𝑊 with size of 𝑚*𝑛, and shift 𝑠. The convolutive
operation can be denoted as 𝐶 =𝑋*W, where output C is called as feature map. Output C
has size of 𝑝2 × 𝑞2, where 𝑝2 = 1 + (𝑝1 – 𝑚2)/𝑠 and 𝑞2 =1+(𝑞1 − 𝑚)/𝑠. Each neuron
unit in the convolution layer is connected to the receptive field units in the corresponding
local area of size 𝑚×𝑛.
Suppose 𝑊(I,j) is the weight parameter that represented as convolutive kernel that
connects i-th feature map from previous layer 𝐶i to j-th feature map 𝐶i and 𝑏j is the
corresponding bias. One feature map in the convolutional layer can be computed as: 𝐶j=
𝜎( ∑I *𝑊ij ∗ 𝐶i + 𝑏j) where 𝑆 is the set of the selected feature maps from the previous
layer and 𝜎𝜎 denotes the activation function, which can be a sigmoid 𝜎(𝑥) = 1/(1 + 𝑒^(-
x)), hyperbolic tangent 𝜎(𝑥) = (1 − 𝑒^(−2𝑥))/(1 + 𝑒^(−2𝑥) ) or rectified linear units
(ReLU) 𝜎(𝑥) = max (0, 𝑥).
12
1.5 Objectives
1.5.1 General Objective
To study about the use of Machine Learning in road traffic management
1.7 Limitation
The study faced many limitations during the process. The lack of data relating to machine
learning and ITMS was one of the major obstacles. Nepal is yet to implement any form
of ITMS in real life which is why any form of research about the real-life implementation
in the topic, in the context of Nepal, was next to impossible. Another limitation of the
study was that the technology the paper talks about has high economic cost as it uses high
power computers and cameras hence it was not possible to do the study real time.
Major Limitation for the study was the lack of finance to outsource the dataset for
processing
13
CHAPTER TWO
LITERATURE REVIEW
Shwetha, R.J., et al. 2018, described an Intelligent traffic signal management system
using cloud vision API and Machine learning. The images of the next traffic junction are
taken and updated to cloud and by the help of cloud vision API density and type of
vehicles are detected which in turn returns status to the previous signal. The previous
signal which is now the present signal will check for the status of the next signal based
on the status it does further operation. This trigger the RFID place next to signal to be
enabled and detects the vehicles crossing it resulting which a penalty to be paid to traffic
control.
Aditi, Y., 2019, proposed an Adaptive traffic management system using IOT and
Machine learning. Camera sensors and two controller boards will play major roles. The
camera sensor will capture the details from the lane with live streaming and pass it on to
first controller board. This board will differentiate all the vehicles from obtained data by
using Tensor Flow and maintain the count of vehicles in a particular lane. This count will
be passed on to another controller board. This board will use this count to adjust the traffic
signals and congestion lights accordingly. If there is a great difference between the counts
of two lanes, then using the Min-Max Fairness algorithm, the priority will be given to
low average waiting time. If the difference is not much, then using the Round Robin
algorithm, the priority will be given to low traffic congestion.
Venkata, D., ,2019, proposed a smart traffic management system for smart cities using
Reinforcement learning algorithm. Compound optimization error can be successfully
handled by using reinforcement learning technique and thus Deep learning technique has
drawn enormous fascination. Seeing the various merits in combining reinforcement with
deep learning method we have decided to work on setting proper and effective traffic
controlling system using these effective techniques.
14
CHAPTER THREE
RESEARCH METHODOLOGY
In this research I needed to deal with various parameters and data available through
various sources. It was imperative to understand the application of the data processing
in the practical scenario along with the technological and economic feasibility of the
proposed system. I tried to research the application of the proposed system in a global
scale as much as possible. The research talks about more general concept of machine
learning hence it was necessary to find out what topic within this concept would be
more suitable in the Nepalese context.
This research talks about the use of YOLO algorithm and CNN for TMS as a part of
machine learning. Most of the parameters were found from secondary data.
15
3.2 Study Design
Initially for the seminar topic, the ever-present problem of road traffic management was
selected. Then I researched about the best practices for road traffic management system
around the world and found out about how machine learning can be used to manage road
traffic. Further, I researched about the use of machine learning to manage road traffic in
the context of Nepal. Then, I thoroughly studied about the best component of machine
learning that can be used in terms of economic, technological feasibility. Also, the
practicality aspect of the system was studied.
After all the theoretical research, collection of data was started. I visited the junction at
Baneswor and captured various video files which was then forwarded to a video
processing website which used the proposed algorithm to find the results as required.
Then found out result was then analyzed and discussed to reach to a conclusion.
16
CHAPTER FOUR
RESULT AND CONCLUSION
4.1.1 Study 1:
In a scenario of uneven traffic management system in Baneswor we see every day, all
the sides of the intersection have to wait for preset timer of 180 seconds regardless of the
traffic density. Meaning that, even if there is low traffic density on one side and high
traffic density on the other side of the intersection, the lane having high density of traffic
will still have to wait the same amount of time as the side having low traffic density which
only adds to the problem of traffic congestion.
4.1.2 Study 2:
Similar to the first study, in this scenario, having no means of predicting traffic congestion
the east side of Baneswor will still wait for whole preset timer as the other side of the
intersection even if very high number of vehicles are incoming towards the side from the
previous junction. This will add to the problem of traffic congestion.
4.1.3 Study 3:
Not only the traffic congestion system, we can see very frequently that people overlook
the traffic rules about traffic light regulation, lane violation, speed violation in the
junction which cannot be easily noticed by human traffic officers. This facilitates
unmanaged traffic and increases the chance of road accidents.
17
4.2 Results/ Probable results
4.2.1 Study 1:
For the first scenario, the video file data fed to the processing computer after being
captured by the placed high range and high-power cameras will detect each and every
vehicle in all the sides of the intersection through the use of CNN. Then the detected
objects are placed in the rectangular region of interest. The traffic density is calculated
by the no of vehicles in each side of the intersection.
The data is then self-analyzed and the traffic light timer is self-adjusted by the system
without having to manually intervene. This will help manage traffic congestion that
comes forth due to scenario 1. The proposed algorithm is YOLOv3 algorithm.
4.2.2 Study 2:
For the second scenario object detection and image segmentation techniques used will be
the same. The way by which the proposed system will be able to predict traffic congestion
is that, the data from previous junction will be fed to the cloud vision API along with
their RFID tags. The incoming traffic to the selected junction can be judged form the
number of vehicles leaving the previous junction towards the selected junction along with
the number of vehicles in the lane.
18
After predicting the traffic congestion, it can be linked with the new junction and timer
automation whether to reduce the timer of lane with high traffic congestion possibility.
Another measure that can be implemented is that the newer traffic that are incoming from
the newer junction can be given message on vehicle dashboard to reroute if possible, so
as to reduce the number of vehicle and time spent by the user on the junction.
4.2.3 Study 3:
For traffic law violation
All the images in a junction are detected and recorded along with the RFID tag associated
with the number plate. The violation parameters are input in the system. The lawful
vehicles are bounded by blue and unlawful actions by any vehicles turns the bounding
box overlapping into red.
19
Figure 4. 3: After lane violation occurs
Chart Title
100%
95%
90%
85%
80%
75%
70%
1 2 3 4
Dataset
20
Chart Title
84
82
80
78
76
74
72
70
68
dataset 5 dataset 6 dataset 7 dataset 8
For any authorities wishing to make further investigation on the topic, I’d recommend to
collect as much data as possible and also look to implement real time data processing
which was not done in this study. Further, the economic feasibility and technological
feasibility side of the study should also not be overlooked.
I’d recommend the traffic control division of Kathmandu valley to look into the
possibilities of adding the Machine learning system into the traffic control policy and also
start experimenting on certain junctions as intelligent traffic management system seems
to be the future of traffic management system,
21
22
REFERENCES
Rangwal, A., et al, 2020,” Traffic Rule Violation Detection System using ML”,
Kurniawan, J., “Traffic Congestion Detection: Learning from CCTV Monitoring Images
using Convolutional Neural Network”, 2018. https://www.sciencedirect.com
23
ANNEX A
24
Figure A. 2: Output parameters
25
ANNEX B
26
ANNEX C
27