Improving Traffic Flow For Emergency Vehicles Using Deep Learning Techniques Final V2
Improving Traffic Flow For Emergency Vehicles Using Deep Learning Techniques Final V2
A Dissertation
Submitted to the Council of the College of Erbil Technical Engineering
College at Erbil Polytechnic University in Partial Fulfillment of the
Requirements for the Degree of Doctor of Philosophy in Information System
Engineering
By
Kamaran Hussein Khdir Manguri
B.Sc. in Computer Systems Engineering (2011)
M.Sc. in Electronics and Computer Engineering (2016)
Supervised by
Prof. Dr. Aree Ali Mohammed
Erbil, Kurdistan
August 2024
DECLARATION
I declare that the PhD. Dissertation entitled “Improving Traffic Flow for
Emergency Vehicles Using Deep Learning Techniques” is my own original
work, and hereby I certify that unless stated, all work contained within this
dissertation is my own independent research and has not been submitted for the
award of any other degree at any institution, except where due acknowledgment
is made in the text.
Signature:
I
CERTIFICATE OF PROOFREADING
This is to certify that this dissertation entitled: “Improving Traffic Flow for
Emergency Vehicles Using Deep Learning Techniques” written by the
postgraduate student (Kamaran Hussein Khdir Manguri) has been proofread
and checked for grammatical, punctuation, and spelling mistakes. Therefore,
after making all the required corrections by the student for further
improvement, I confirm that this last copy of the dissertation is ready for
submission.
Signature:
Name: Asst. Prof. Dr. Salih Ibrahim Ahmed
Phone No.: 07701502771
Email Address: [email protected]
Date: 01/07/2024
II
SUPERVISOR CERTIFICATE
This dissertation has been written under my supervision and has been submitted
for the award of the degree of Doctor of Philosophy in Information System
Engineering with my approval as supervisor.
Signature
Name: Prof. Dr. Aree Ali Mohammed
Date: / / 2024
Signature:
Name: Byad A. Ahmed
Head of the Department of Information Systems Engineering
Date: / / 2024
Postgraduate Office
Signature:
Name:
Date:
III
EXAMINING COMMITTEE CERTIFICATION
We certify that we have read this Dissertation “Improving Traffic Flow for
Emergency Vehicles Using Deep Learning Techniques” and as an examining
committee examined the student (Kamaran Hussein Khdir Manguri) in its
content and what related to it. We approve that it meets the standards of a
dissertation for the degree of Doctor of Philosophy in Information System
Engineering.
Signature: Signature:
Name: Prof. Dr. Mazen R. Khalil Name: Asst. Prof. Dr. Moayad Y. Potrus
Chairman Member
Date: / / 2024 Date: / / 2024
Signature: Signature
Name: Assist. Prof. Dr. Ismael K. Name: Assist. Prof. Dr. Azhin T. Sabir
Abdulrahman (Member) Member
Date: / / 2024 Date: / / 2024
Signature: Signature
Name: Assist. Prof. Dr. Shahab W. Name: Prof. Dr. Aree A. Mohammed
Kareem (Member) Supervisor
Date: / / 2024 Date: / / 2024
Signature
Name: Prof. Dr. Ayad Z. Sabir Agha
Dean of Erbil Technical Engineering College
Date: / / 2024
IV
DEDICATION
V
ACKNOWLEDGMENTS
VI
ABSTRACT
VII
Nadam, and RMSprob) are used to improve the detection performance based
on the best optimizer selection and yielded an accuracy of 98.84%. In addition,
a modified version of YOLOv5 was proposed for vehicle detection, which aims
to enhance the mean average precision (mAP) detection by 3%. Finally, the
proposed system was simulated to reduce the waiting time at traffic signal. The
experimental results demonstrate a significant reduction in waiting time,
ranging from 30 to 100 seconds depending on the status.
VIII
TABLE OF CONTENTS
DEDICATION ................................................................................................ V
ACKNOWLEDGMENTS ............................................................................ VI
ABSTRACT ..................................................................................................VII
1. INTRODUCTION .................................................................................... 1
CHAPTER TWO........................................................................................... 11
IX
2.1 Introduction....................................................................................... 12
2.2.3.a YOLO............................................................................................... 30
X
2.3.1 Arduino Board ............................................................................ 33
3.1 Introduction....................................................................................... 62
XI
3.6 Performance Metrics ........................................................................ 83
4.1 Introduction....................................................................................... 90
XII
LIST OF FIGURES
XIII
Figure 3.13 Steps of DenseNet201 Modification............................................ 75
Figure 3.14 DenseNet201 with CNN for classification .................................. 75
Figure 3.15 Modified DenseNet201 Architecture........................................... 76
Figure 3.16 Proposed Search Mechanism ....................................................... 77
Figure 3.17 Selecting Best Optimizer ............................................................. 78
Figure 3.18 Vehicle Types Detection Processes ............................................. 79
Figure 3.19 Modified YOLOv5 ...................................................................... 80
Figure 3.20 System Architecture..................................................................... 81
Figure 3.21 General Block Diagram of Optimized Traffic Flow ................... 82
Figure 3.22 Intersection Over Union (IOU).................................................... 87
Figure 4.1 Accuracy versus image size (DensNet201-120_freeze_layers) .... 92
Figure 4.2 Precision versus image size (DensNet201-120_freeze_layers)..... 92
Figure 4.3 Confusion matrix for the optimal model and optimizer ................ 95
Figure 4.4 Model’s loss (DensNet201 – 120 layers freezing) ........................ 95
Figure 4.5 Model’s accuracy (DensNet201 – 120 layers freezing) ................ 96
Figure 4.6 Batch Training ............................................................................... 97
Figure 4.7 Batch Prediction............................................................................. 98
Figure 4.8 F1 Score ......................................................................................... 99
Figure 4.9 Precision....................................................................................... 100
Figure 4.10 Recall ......................................................................................... 100
Figure 4.11 [email protected]................................................................................... 101
Figure 4.12 Confusion Matrix ....................................................................... 101
Figure 4.13 The loss functions for the training and validation sets of original
(YOLOv5s).................................................................................................... 102
Figure 4.14 The loss functions for the training and validation sets for
modified (YOLOv5sm) ................................................................................. 102
Figure 4.15 Simulated Environment of Traffic Intersection ......................... 103
XIV
LIST OF TABLES
XV
LIST OF ABBREVIATIONS
Abbreviation Meaning
Adagrad Adaptive Gradient Algorithm
Adam Adaptive Moment Estimation
ARM Advanced Reduced Instruction Set Computing
AVR Atmel Alf and Vegard's RISC Processor
BoI Blocks of Interest
BS Background Subtraction
CBL The Convolutional Layer
CCTV Closed-Circuit Television
CNN Convolutional Neural Network
COCO Objects in Context
CSVM Cubic Support Vector Machine
CTSD Chinese Traffic Sign Dataset
CUDA Compute Unified Device Architecture
CVIS Cooperative Vehicle Infrastructure Systems
DenseNet Densely Connected Convolutional Networks
EVs Emergency Vehicles
FPN Feature Pyramid Network
GPU Graphics Processing Unit
GTSDB German Traffic Sign Detection Benchmark
HIS Hue-Saturation-Intensity
HMM Hidden Markov Model
HOG Histogram of Oriented Gradients
ITS Intelligent Transportation Systems
KRG Kurdistan Region of Iraq
LaRA Laboratório de Robótica e Automação
LISA Intelligent & Safe Automobiles
LSS Local Self-Similarity Machine
XVI
mAP Mean Average Precision
MaxGT Maximum Green Time
MFCC-SVM Mel-frequency Spectral Coefficients Combined with
Support Vector Machine
MinGT Minimum Green Time
MobileNet Mobile Networks
MSFF Multi-Scale Feature Fusion
Nadam Nesterov-accelerated Adaptive Moment Estimation
OpenCV Open Source Computer Vision Library
PSO Particle Swarm Optimization
QL Q-learning
R-CNN Region-based Convolution Neural Network
ResNet Residual Network
RF Random Forest
RFID Radio-Frequency Identification
RISC Reduced Instruction Set Computing
RMSprop Root Mean Square Propagation
RNN Recurrent Neural Network
RoI Regions of Interest
SGD Stochastic Gradient Descent
SGW Simplified Gabor Wavelets
SORT Simple Online and Real-time Tracking algorithm
SPP Spatial Pyramid Pooling
SPPF Spatial Pyramid Pooling - Fast
SSD Single-Shot Detection
STL Smart Traffic Light
STS Swedish Traffic Signs
SVM Support Vector Machine
TSC Traffic Signal Control
XVII
TUIC Temporal Unknown Incremental Clustering
VANETs Vehicular Ad-Hoc Networks
VGG Visual Geometry Group
YOLO You Only Look Once
XVIII
CHAPTER ONE
1. INTRODUCTION
1
1.1 Overview
In recent years, there has been a notable increase in the number of cars (Jain
et al., 2019) leading to a widespread problem of traffic congestion (Biswas et
al., 2019) that presents various challenges worldwide. Consequently, there has
been a rise in car accidents and a worrying escalation in yearly CO2 emissions
(Coelho et al., 2005), both of which threaten the sustainability of future
transportation (Guo et al., 2019). Moreover, effective traffic management
heavily relies on the deployment of manpower (Kumaran et al., 2019a). Traffic
control systems, operating on a time-dependent basis, have been designed to
facilitate smooth traffic movement in all directions. However, it is important to
note that the transition of traffic signals from green to red during turns may
sometimes cause traffic congestion in one direction, with minimal
improvement in traffic flow in the opposite direction (Malhi et al., 2011).
Congestions resulting from traffic signals could have adverse effects on the
transportation economy, primarily due to increased fuel consumption (Lakshmi
and Kalpana, 2017) and time expenditure (Jing et al., 2017). Additionally, road
congestion contributes to environmental issues such as noise and air pollution
(Qadri et al., 2020). Moreover, accidents occurring in congested traffic
conditions can lead to injuries or even fatalities (Lakshmi and Kalpana, 2017).
Conversely, reducing congestion offers economic, environmental, and social
benefits. Among various solutions in urban settings, signalized intersections
have been identified as effective means for addressing prevalent bottlenecks,
thus playing a significant role in urban traffic management (Wei et al., 2019).
To this end, the concept of smart cities revolves around Intelligent
Transportation Systems (ITS), which are pivotal in modern urban planning
(Yuan et al., 2019, Zhang et al., 2011). Throughout history, transportation
systems have been vital components of national infrastructure. Research
indicates in 2011, approximately 40% of the global population was spent at
2
least an hour commuting daily (Zhang et al., 2011). Consequently, managing
the increasing number of vehicles has become increasingly challenging without
the assistance of technology (Veres and Moussa, 2019).
3
can improve the traffic flow(Wang et al., 2018), quieter intersections are
usually managed by human controllers or automated systems (Kumaran et al.,
2019a). Cameras are already present in many congested areas for various
purposes, but they can be utilized for analyzing traffic scenes with specific
hardware, instead of replacing existing closed-circuit television (CCTV)
cameras. These cameras are commonly used for security and vehicle detection.
This multi-functional use of cameras optimizes resources and enhances overall
traffic management efficiency (Khan and Ullah, 2019).
Usually, each traffic light contains three color lights: green, yellow and red
lights. These lights are positioned in the four directions—north, south, east, and
west—at intersections (Huang and Chung, 2009b). Figure 1.1 illustrates a
typical intersection formed by two perpendicular and parallel lanes. The traffic
signal comprises three signal lights: red (R), yellow (Y), and green (G), and
additionally features five lights: red (R), yellow (Y), a left turn arrow
illuminated during green (GL), a right turn arrow illuminated during green
(GR), and a straight-ahead arrow illuminated during green (GS) (Huang and
Chung, 2009a).
4
Figure 1.1 Four lanes intersection (Manguri et al., 2023)
The configuration of traffic lights can lead to different phase transitions
based on the interactions among the number of signal lights (Huang and Chung,
2009a). A state diagram in Figure 1.2 displays the sequence of 4 phase
transitions. The diagram shows a cycle that starts in phase 1 and ends in phase
4, providing an alternative series of operations. During phase 1, the southern
traffic light enables the GL, GR, and GS signals, allowing vehicles to turn left,
right, or go straight in the southbound direction. Similarly, during phase 4, the
GL, GR, and GS signals are activated at the southern traffic light, allowing
vehicles to turn left, right, or go straight in the southbound direction. The
system follows predetermined timing intervals with fixed durations.
5
Figure 1.2 Phase Transitions (Huang et al., 2005)
6
1.3 Problem Statement
7
4. Testing the proposed system and evaluating its performance with other
related works.
8
Collecting data from real traffic area officially requires a permission from
traffic police center. Due to the non-availability of public datasets, a customized
dataset has been created. The main challenge of the intersection traffic signal
control (TSC) problem is to determine an optimal configuration of traffic
signaling system that allows a maximum traffic flow in a network. Creating a
standard dataset for emergency vehicles is not feasible due to the lack of
standardized colors, sizes, and other characteristics. In this regard, an accurate
system for traffic congestion reduction is required to build, which is the main
goal of this study.
9
This chapter provides an implementation of the developed intelligent traffic
signaling system. Also, it discusses the obtained results.
Chapter Five: Conclusions and Future Works:
The summary of this study can be found on the chapter five, as well as
suggestions for future work.
10
CHAPTER TWO
11
2.1 Introduction
This chapter provides the theoretical background of this study such as object
detection and its techniques are discussed. Furthermore, literature review of the
recent studies carried out on computer vision for managing and controlling
Traffic signaling control can be categorized into several types based on the
some traffic signaling control systems, such as Pedestrian Signals, Traffic Signs
and Road Markings, Traffic control for construction zones, Railway Crossings,
throughout the day. This approach primarily assigns more green time to the
may incorporate distinct preset time intervals for morning rush hours, evening
peak hours, and other periods of high traffic. Nevertheless, this method is not
12
vehicle-actuated signals essentially respond to the need for green time and
(Wahlstedt, 2013).
time duration and total cycle length in response to real-time traffic needs. These
needs are determined using loop detectors or other conventional traffic sensors.
Within this control scheme, critical parameters such as minimum green time
(MinGT), maximum green time (MaxGT), and cycle duration can be adjusted
based on actual traffic conditions, often using data collected by loop detectors
(Shirvani Shiri and Maleki, 2017, Zheng et al., 2010, Zhang and Wang, 2010,
Viti and Van Zuylen, 2010). Furthermore, actuated signal phase timing
conditions. This means that parameters such as MinGT, MaxGT, and cycle
length are still determined using predefined values. These values rely on a
al., 2021).
13
optimize traffic flow while granting selective priority to public transport, all
cooperative control.
which are addressed by the intersection units (SPOT) in collaboration with the
central system.
zones. They rely on hand signals and stop signs to provide guidance and
cameras, and artificial intelligence to control the flow of traffic. This novel
14
method depends on the traffic light playing a central role in overseeing the
capture images of the vehicles on the road from a preset distance away from
the traffic signal. Subsequently, image analysis techniques are applied to assess
the number of vehicles present on the road. The information derived from this
analysis is then transmitted to the traffic light, enabling it to adjust signals (red,
Under the concept of STL, sensors are used on the sides of roads and
vehicles are interconnected. The collected data undergoes analysis, and based
network models proficient in making accurate decisions from data. Its strength
lies in situations marked by complex data and access to large datasets (Kelleher,
15
can reduce the chances of making errors during testing (Dong et al., 2021). But
the current moment, the limitation on neural network complexity was tied to
computers can now rapidly observe, learn, and respond to complex situations
Figure 2.1 Scale driving Deep Learning progress (Dong et al., 2021).
Figure 2.1 illustrates how the performance of the Deep Neural Network
The main focuses of deep learning techniques in the ITS including Density
estimations, traffic signal control, accident detection, traffic sign detection and
Deep learning neural networks use both data inputs and weights, which can
16
Additionally, they make use of activation functions, mathematical equations
the human brain (Kelleher, 2019, Chen et al., 2021), allowing for precise
layers serve as the backbone of all neural network types, working together to
construct a neural network model (Dong et al., 2021), however, the exact
Hidden layer: Intermediate nodes that partition the input space into distinct
inputs.
17
2.2.1 Deep Learning Factors
Deep learning techniques encompass various factors such as:
Architecture relies on three primary elements that emulate the usual procedures
within each layer, and the layer types. This complexity makes a thorough
connections between input and output, mirroring the structure of the human
brain due to their nonlinearity, multiple nodes, and layers, thus earning the term
18
"neural network." Several activation functions, as illustrated in Figure 2.3,
exist, including commonly used ones like Sigmoid, Hyperbolic tangent, and
Relu. Their primary function lies in transforming and abstracting data into a
occurs by minimizing the error between predicted and actual values (Dong et
al., 2021).
19
2.2.1. d Optimization algorithms
fashion. Hyperparameters, such as the learning rate, direct the update method,
the combination of their hyperparameters and update rule (Fatima and Journal,
2020).
as the function we aim to optimize for our specific problem). This, coupled with
model. The optimizer's function involves adjusting the weights and learning
rate of our model's nodes during training to effectively minimize the loss
training error (Fatima and Journal, 2020). All optimizers use a mathematical
formula to update the weights, along with specific learning rate values.
𝜕𝑒𝑟𝑟𝑜𝑟
𝑤𝑥′ = 𝑤𝑥 − ∝ ( ) 2.1
𝜕𝑤𝑥
Where wx′ denotes the updated weights while wx represents the old weights,
∂error
and ∝ indicates the learning rate. The term ( ) represents the derivative of
∂wx
learning rates.
20
RMSprop, despite its widespread use, is an optimizer that was never
RMSprop and Adagrad. It is known for its high efficiency, adaptability, and
fast convergence. Adam uses the L2 norm or Euclidean norm for optimization.
achieved by calculating the first and second moments of gradients and adjusting
III. Adamax
21
traditional noise in gradient updates, such as datasets with multiple outliers,
In addition, there are other optimization techniques available that were not
detailed in this study due to the good results obtained from tests, such as
and AdaDelta.
transformations and their sequence are best suited for a specific image dataset.
This manual approach not only poses a bottleneck in real-world data science
22
trial-and-error methods to explore various image transformations might hinder
are adjusted during the learning process to fine-tune and optimize the model's
for the same machine learning model to effectively capture different patterns in
through a process of trial and error to ensure that the model performs at its best
object detection not only categorizes objects within an image but also pinpoints
23
involves assigning images to predefined categories (Lillesand et al., 2015).
testing. During training, the framework extracts distinctive attributes from the
images to form a unique representation for each class. This process is repeated
binary or multi-class (Jaswal et al., 2014, He et al., 2016, Liu et al., 2015, He
and Sun, 2015). During the testing phase, the aim is to classify test images into
the classes for which the system was trained. The class assignment is based on
various domains within the computer vision community (LeCun et al., 2015).
DenseNet, ResNet, Mobile Net. VGG, Inception, AlexNet, and etc. The used
deep learning techniques during this study to standardize the proposed dataset
I. VGG Networks
its depth and simplicity. The VGG network is composed of very small
24
simplicity in constructing the system. The VGG network is primarily a deep
layer depth to avoid excessive network complexity (Haque et al., 2019). The
25
Figure 2.4 VGG network Architecture (Tammina and Publications, 2019)
II. ResNet
and image processing tasks like image classification and segmentation. These
1x1 and 3x3 convolutional layers, functioning as filters (He et al., 2016). These
layers play a crucial role in reducing network complexity while extracting high-
that pinpoints the precise location of objects (Haque et al., 2019). Figure 2.5
III. MobileNet
26
channel, and then the pointwise convolution combines the outputs from the
inputs in one step, the depthwise separable convolution separates this process
into two layers: one for filtering and one for combining. This factorization
significantly reduces both computational load and model size (Howard et al.,
IV. DenseNet
27
access to the entirety of feature maps stemming from preceding layers. The
transpires within each layer, defining the cumulative input feature maps at the
the volume of input feature maps. Serving as a bottleneck layer, the (1*1)
classification purposes, the incorporation of two dense layers housing 128 and
definition is as follows:
1
𝑦=
1+𝑒 −(∑𝑖 𝑤𝑖 ∗𝑥𝑖 )
2.3
Where y is the output of the neuron, 𝑤𝑖 𝑎𝑛𝑑 𝑥𝑖 represent the weights and
inputs, respectively.
28
Figure 2.7 DenseNet201 architecture (Jaiswal et al., 2021)
demand for precise models in object detection (Hu et al., 2004). The Viola-
Jones framework (Viola and Jones, 2001) gained popularity primarily for its
(Ohn-Bar and Trivedi, 2016) and car (Sun et al., 2006) detections. In recent
29
times, with the rise of CNN (Krizhevsky et al., 2012, Szegedy et al., 2015,
Works like Overfeat (Sermanet et al., 2013), R-CNN (Girshick et al., 2014),
Fast R-CNN (Girshick, 2015), Faster R-CNN (Ren et al., 2015), R-FCN (Dai
et al., 2016), SSD (Liu et al., 2016), and YOLO (Redmon et al., 2016)
2.2.3.a YOLO
achieves an impressive speed of 155 frames per second while also improving
30
the mean average precision (mAP) compared to other real-time detectors.
The YOLOv5 network is shown in Figure 2.8 and comprises three main
segments: the backbone, neck, and head (output result). The backbone,
extraction. Following this, the CNN's neck processes data to perform resolution
feature aggregation, and the final predictions based on object resolution are
Figure 2.8 The YOLOv5 network framework (Guo and Zhang, 2022)
31
In the backbone part, the input image, initially sized at 640 × 640 × 3, is
transformed by the focus layer for space-to-depth conversion. Using the slice
operator, this process reshapes the image to 320 × 320 × 12, creating a feature
map. This map is then passed through the convolution operator, which utilizes
32 convolution kernels, resulting in a feature map of size 320 × 320 × 32. The
plays a pivotal role in feature extraction from the map and stands out for its
YOLOv5l (large network), and YOLOv5x (very large network) (Glučina et al.,
2023, Zhou et al., 2021) (See Figure Y). The Spatial Pyramid Pooling (SPP)
module enhances the network's receptive field and captures additional features
on the feature pyramid network (FPN) (Chen et al., 2022). The FPN layer is
32
improve the network's performance and its ability to detect targets at multiple
scales. This is evident towards the end of the image, where the classification
components that are crucial for the system to operate effectively and efficiently
which include Arduino UNO board, a breadboard, LED Traffic Light Module
professionals and students, it enables the creation of devices that can interact
Arduino microcontrollers feature both inputs and outputs that enable the
development board, while the software component involves the Arduino IDE
33
either 8-bit Atmel Alf and Vegard's RISC processor (AVR) microcontrollers or
using the C or C++ language within the Arduino IDE (Ismailov et al., 2022).
where individuals can share their experiences and seek help when
itself is free to use through the official website, and users only need
Various types of Arduino boards are available (As shown in Table 2.2), each
34
differs from others in terms of their microcontroller types, crystal frequencies,
Mega 2560
Mini
Leonardo
For this study, the Arduino Uno has been selected as it meets the
provides a signal output. This module is known for its high brightness, making
35
in size, easy to wire, and comes with a targeted design and customizable
installation options.
2.3.5 Camera
Cameras are essential components in smart traffic systems where they are
roads and lanes, they provide valuable data that allows for precise control of
traffic signals.
upon machine vision techniques. The architecture of traffic signal control and
36
techniques like density estimation, traffic sign detection and recognition,
accident detection, emergency vehicle detection, and the like. This section
explores selected papers during recent years that introduce proposed methods
(Kumaran et al., 2019b) introduced a smart traffic signal control system that
utilizes computer vision algorithms. They also proposed a new method for
traffic signal timing based on traffic flow, using the Temporal Unknown
optical flow features. Test results show that their approach leads to reduced
uses linked cars to inform future research paths. More research is required to
create more widely applicable adaptive traffic signal control algorithms for a
37
controlling traffic flow. Notably, it can dynamically adjust the timing of traffic
light signals and rapidly respond to road traffic conditions, particularly during
systems introduced by (Joo et al., 2020). Their method tackles the issue of
signals evenly across roads using Q-learning (QL). Their research findings
terms of reducing waiting times and minimizing the standard deviation of the
control systems using deep learning techniques. Their method combines the
YOLO deep learning model to identify objects in a video stream with the
Simple Online and Real-time Tracking algorithm (SORT) to track these objects
38
traffic conditions found on roads in India. The system was tested in real-time
interconnected road networks, the system successfully reduced the risk of total
model using the Hidden Markov Model (HMM) to predict congestion patterns
these busy zones. By refining and analyzing floating vehicle trajectory data, the
(Ke et al., 2018) have demonstrated an innovative method for detecting road
flow, along with a pyramid scheme, is used to evaluate the speed of moving
39
technique is confirmed through thorough quantitative and qualitative
(Garg et al., 2016) presented a method for estimating traffic density through
busy road segments. This method involves two main steps: first, identifying
40
estimating traffic density. The effectiveness of the proposed methods was
car counting, employing the Background Subtraction (BS) method and the
manual car counting, and a comparative study is carried out before and after
and limitations of the BS method, analyzing six individual traffic videos from
density using fifty-nine individual traffic cameras. They evaluated the strengths
manually estimated density. The experiments showed that the SSD framework,
achieving high detection accuracy rates of 92.97% for SSD and 79.30% for
MobileNet-SSD.
41
K.-H. N et al (Bui et al., 2020), developed a method that uses advanced
techniques were utilized to detect, track, and count vehicles, allowing for the
calculation of road traffic density. The effectiveness of the method was tested
using real-world traffic data obtained from CCTV footage gathered over a day.
traffic density based on the obtained image from CCTV. The outcomes of this
42
estimation.
43
detection and recognition of traffic signs. Specifically, a novel technique called
the circle detection algorithm has been developed to identify traffic signs. In
oriented gradients, local binary patterns, and Gabor features, were utilized
traffic signs. The effectiveness of these methods for both detection and
recognition was assessed using the German Traffic Sign Detection Benchmark
(Yang et al., 2016) presented a method for detecting and recognizing traffic
signs, consisting of three primary steps. Firstly, they use thresholding of HSI
color space components to segment the image. Secondly, they use blobs
extracted from the previous step to detect traffic signs. A significant aspect of
their approach in the initial step is the use of invariant geometric moments for
the Histogram of Oriented Gradients (HOG) features to the HSI color space
and combine them with LSS features to create the descriptor. They test Random
Forest (RF) and SVM classifiers in conjunction with the new descriptor. The
effectiveness of the proposed system is evaluated using the GTSDB and STS
44
Salti et al. (2015), combined solid image analysis and pattern recognition
existing systems that use sliding window detection, their system focuses on
illumination, partial occlusions, and large scale variations, the system showed
setup of the recent GTSDB competition. The system not only excelled in the
dataset of Italian signs in mobile mapping, indicating its potential for successful
real-world deployment.
which are based on three types of features: color features, gradient magnitude,
and gradient histograms. Secondly, they presented a boosted trees classifier for
speed when evaluated on the Daimler, Laboratory for Intelligent & Safe
datasets.
Real-time detection and recognition of traffic signs are crucial for improving
45
the intelligence of smart vehicles. To tackle this challenge, (Shao et al., 2018)
proposed a new approach with two main steps. Firstly, images captured from
the road scene are converted into grayscale images. Then, Simplified Gabor
Wavelets (SGW) filters are used to optimize the parameters of the grayscale
prepare the data for the following step. In the second stage, the maximally
stable extremal areas approach is used to identify the region of interest, and the
superclass of traffic signs is classified using SVM. CNN is used for subclass
classification of traffic signs, using input from simplified Gabor feature maps
and the same parameters used in the detection phase. Finally, the proposed
method is assessed on the GTSDB and Chinese Traffic Sign Dataset (CTSD)
colorful graphics. They improved two digital image processing methods, the
gradients, and local binary patterns - into the intelligent system. The
46
datasets. Practical results showed that their technique significantly
in real-time operations.
(Ellahyani et al., 2016) consists of three main steps. Firstly, the image is
(HIS) thresholding. Next, blobs identified in the previous step are used to detect
traffic signs. Finally, the recognized traffic signs are classified in the last step.
In their research, two different methods are used for sign classification.
Initially, forms are classified using invariant geometric moments rather than
drawing inspiration from current ones. The HSI colour space, obtained from
the descriptor for the new approach. Finally, the suggested method's efficacy is
evaluated and tested against the German Traffic Sign Recognition Benchmark
The CNN machine learning algorithm is known for its high effectiveness in
were compared. The training was conducted using the TensorFlow library, and
47
a massively parallel architecture was adopted for multithreaded programming
detecting and recognizing traffic signs was carried out in real-time on a mobile
Graphics Processing Unit (GPU). The method's efficiency was then assessed
48
92.048 (
LaRA)
Shapes classified by
GTSRB, using invariant
(Ellahyani et HOG, LSS and
GTSDB and 97.43 geometric moments
al., 2016) SVM
TST
Speed of detection
and classification
(Shao et al., GTSDB and
SGW and SVM 99.43 improved which is
2018) CTSD
more than 6 frames
per second
(Shustanov CNN process
and described
CNN GTSRB 99.94
Yakimov,
2017)
The proposed
(Liu et al., Proposed model CapsNet is employed
TL_Dataset
2021) named CapsNet for traffic sign
recognition.
junctions. This section also covers methods for predicting and detecting
accidents.
detecting car accidents. The study consisted of two phases: In the first phase,
scenarios. In the second phase, a deep neural network model named YOLO-
49
CA, based on CAD-CVIS and deep learning algorithms, was created for
small objects, Multi-Scale Feature Fusion (MSFF) and a loss function with
dynamic weights were utilized. The results showed that the proposed method
detection. This framework introduces the use of Mask R-CNN for accurate
This framework proves to be superior and paves the way for real-time versatile
and validation of this framework were conducted using a dataset with diverse
weather conditions.
delineate the region of interest. Instead, the study advocates for a hybrid
50
traverse through an intersection, the system monitors the tracked direction for
any potential events. The research concludes that the proposed method exhibits
According to (Wenqi et al., 2017), the TAP-CNN model was introduced for
This model combines traffic state and CNN architecture to create a state matrix
that includes various accident factors like traffic flow, weather, and lighting.
accuracy through multiple iterations. They gathered accident data for training
are collected and simulated in the proposed system, which then sends traffic
learning techniques for accident detection on freeways within ITS. Position and
velocity values of each vehicle serve as crucial parameters for easy accident
analysis and detection. Moreover, the proposed method is evaluated using the
OOB dataset, with results indicating that the RF algorithm outperforms ANN
51
respectively.
accidents and normal traffic. The study also presents a two-point search
suggested approach, 30 traffic videos from the YouTube website are used for
testing and evaluation. The results indicate that the suggested technique
respect (Borisagar et al., 2018) state that the accelerometer values undergo
While image classification techniques are typically used for accident detection,
CNNs require significant time, data, and computational resources for training.
detection purposes. The efficiency of the proposed method was then compared
52
to traditional accelerometer-based techniques, resulting in an accuracy of
Accuracy
Reference(s) Algorithm(s) Dataset(s) Contribution(s)
%
CAD-CVIS dataset
Deep neural
(Tian et al., created and the
network model CAD-CVIS 90.02
2019) proposed method more
YOLO-CA
fast and accurate.
Developing vehicular
(Ijjina et al.,
Mask R-CNN Proposed 71 accident detection
2019)
algorithms in real-time.
Hybrid of feature Accident detection
(Saini et al., Real world
detection and N/A between two vehicles
2017) dataset
Region matching
(Wenqi et al., Accident data Accident predicted by
CNN 78.5
2017) collected using CNN
The proposed method
can provide estimated
ANN, SVM and
(Dogru and 91.56 (RF), geographical
Random
Subasi, OOB data set 88.71
2018) (ANN), location of the possible
Forests (RF)
90.02 accident
(SVM)
(i) Robust Fractures
87.4 ± 0.3 extraction proposed
(SVM), based on OF-DSIFT
ST-IHT, Spatio-
(Yu et al., Collected 94.3 ± 0.2 and ST-IHT
Temporal Features
2019) dataset (ELM),
and W-ELM
95.5 ± 0.3 ii) detect imbalance
(W-ELM) between traffic accident
and normal traffic
video presents a new efficient
(Ghahreman sequences framework for accident
nezhad et al., YOLOv4 collected detection
2022) from
YouTube N/A
53
2.3.4 Emergency Vehicles Detection
The success of law enforcement and public safety is the timely arrival of
This allows an RFID receiver to change the traffic signal from red to green,
thus clearing the lane for the emergency vehicle. To adapt to changes in traffic
and potentially saving lives. By utilizing RFID technology for accurate motion
traditional and deep neural networks are commonly used to classify regular and
emergency vehicles. In this respect, (bin Che Mansor et al., 2021) presented a
54
vehicles on city roads can help improve their prompt arrival. They employed
the VGG-16 model as a pre-trained base, adjusting the convolutional layer and
filter size to boost performance. The experimental results showed that the
YOLOv4 for initial object detection with the ROI strategy, then trained the
detected objects using CNN and VGG-16 by fine-tuning the model parameters.
used to identify and locate emergency vehicles. These methods include object
using Faster RCNN for object detection and Mask RCNN for instance
employed for emergency vehicle detection, carefully labeled using the LabeMe
tool.
emergency vehicles like ambulances and fire trucks in crowded road CCTV
footage. This model gives priority to these vehicles, ensuring the emergency
55
lane is cleared to help them pass through traffic intersections smoothly. When
elements. They also reduce the search space by using region of interest
techniques.
novel approach that utilizes machine learning techniques. Various features are
the accuracy of the proposed method was validated across different machine
56
machine learning application. This application involves data acquisition,
Specifically, they created a classifier for ambulance siren sounds, sorting them
into 'Ambulance Arrive' and 'No Ambulance Arrive' categories. This classifier
allows the traffic light system to detect and monitor ambulance arrivals during
using a Kaggle dataset comprising vehicle images that were enhanced through
using different classifiers, with the Cubic Support Vector Machine (CSVM)
confirm the model's superiority over similar approaches, not only in accuracy
(94.8%) but also in training duration (82.7 seconds) and speed in forecasting
57
(380 observations per second).
Varying degrees to
SVR, MLP, SCDF- the model training in
(Lin et al.,
RBFN, and Engineered- N/A LightGBM
2020)
LightGBM Socio
Effectively
(Suhaimy et distinguish audio
MFCC-SVM - 97
al., 2020) events from audio
signals
58
of emergency vehicle detection. Their main focus has been on models that
utilize deep learning techniques. Also, they use of transfer learning for traffic
signal systems and reducing traffic congestion. In this respect, some other
was trained using a Kaggle dataset that included vehicle images enhanced with
classification using different classifiers, with the Cubic support vector machine
that this model not only surpassed similar approaches in terms of accuracy
(94.8%) but also excelled in training duration (82.7 seconds) and speed
image using the YOLOv4 object detector. These identified vehicles are then
59
non-emergency vehicles. Finally, the research contributes by developing a
60
CHAPTER THREE:
61
3.1 Introduction
readers a practical guide for efficient research design and material utilization.
Moreover, this chapter provides detailed explanations of the methods used and
the chapter offers thorough explanations of the employed methods and the
each with its own objectives and tasks. Visual representations are utilized to
enhance the clarity and flow of each phase within the framework. Table 3.1
framework.
62
Figure 3.1 General Framework of Proposed System
Figure 3.2 specifically illustrates Phase 1, where the customized dataset is
created, highlighting the inclusion of various vehicle types such as police cars,
63
Phase 2 illustrates the development of the classification system. This system
detection system using YOLOv5. This system plays a vital role in the decision-
64
Figure 3.4 Phase 3 Detection of Vehicles
Figure 3.5 details Phase 4, where the simulation model is designed. This
65
Phase 5 is dedicated to showcasing the implementation of the optimized
traffic signal system. Its primary objective is to improve traffic flow and
for emergency vehicles like police cars, ambulances, and firefighters, a custom
dataset was created for this study. The vehicle images were gathered from
66
Rania traffic directorate in the Kurdistan region of Iraq. It is important to
mention that the vehicle images vary in dimension and have an unbalanced
distribution across different classes. For more information about the dataset for
the quality of images through specific operations. The initial steps include
128x128, and 224x224. After resizing, the images are categorized into
emergency and non-emergency vehicle classes. Often, the quality of the images
67
python data augmentation is used for balancing the dataset. Albumentations
classes and is shown in Table 3.3. The obtained dataset size after the
Ambulance, Firefighters, and Police Car is shown in Figures 3.7, 3.8, and 3.9,
balance the dataset collected for this study are presented in Table 3.3.
68
Total number of
Vehicle types Balancing Scale
Images
Ambulance 5.19844358 1610
Firefighters 3.165876777 1682
Police car 2.385714286 1260
Non-emergency 1 1670
Total 6222
(d) (e)
Figure 3.7 Augmented data (Ambulance): (a) Original Image, (b) Vertical
Flip, Sharpen, (c) Horizontal Flip, Sharpen, (d) Sharpen, Random Brightness
Contrast, (e) Random Brightness Contrast, Median Blur
Figure 3.8 Augmented data (Firefighters): (a) Original Image, (b) Vertical
Flip, Sharpen, (c) Horizontal Flip, Sharpen
69
(a) (b)
Figure 3.9 Augmented data (Police): (a) Original Image, (b) Horizontal Flip,
Sharpen
CVAT, LabelMe, VoTT, ImgLab, and some more. For this study, the
MakeSense online tool was used to label and annotate the images. The
annotated information is stored in both text and XML files, which can be used
with various object detection techniques like YOLO, R-CNN, SSD, and others.
70
Figure 3.10 Image Labeling
71
Figure 3.11 Vehicle Classification Process
72
Table 3.4 showcases the top results attained, along with the optimizers
Based on the results obtained from the tests and the selection of the best
modification.
model can be employed to further improve the results. This process involves
in Figure 3.13. The block diagram of DenseNet 201 modification comprises the
following stages:
73
3. Improvement of Image Quality: Preprocessing algorithms are applied to
enhance the quality of the images. This includes resizing, sharpening,
smoothing, and contrast enhancement.
4. Data Augmentation: Various image transformations are utilized to
address overfitting and balance the datasets.
5. Dataset Partitioning: The data is divided into training and
testing/validation sets for cross-validation. 80% of the data is allocated
for training, while 20% is reserved for testing and validation.
6. Proposed Transfer Model Training: The model is constructed and certain
parameters are adjusted for training.
7. Vehicles Classification: Vehicles are classified into emergency and non-
emergency categories.
8. Evaluation of Performance Metrics: Performance is assessed using loss-
accuracy curves, a confusion matrix, precision, recall, F1-score, and
average accuracy.
74
Figure 3.13 Steps of DenseNet201 Modification
3.3.1 DenseNet201
The proposed model uses the DenseNet201 for classification. The design
75
3.3.2 Modified DenseNet201 (Freezing Layers)
In the field of neural networks, freezing layers refers to the control of weight
updates. When a layer is frozen, its weights remain unchanged during further
The models are then simulated with different epoch numbers. Performance
metrics such as accuracy, precision, recall, and F1-score are calculated for each
model. Next, we sort the results to find the optimal values of accuracy and
precision. Our selection process is based on choosing the best optimizer when
76
Figure 3.16 Proposed Search Mechanism
widely used in recent studies on deep transfer learning. These techniques are
designed to reduce the loss function and modify the weights during back-
This study investigates how different optimizers affect the accuracy of deep
77
learning DenseNet201 models, both with and without freezing layers. Figure
Deep learning techniques can be employed for the purpose of detecting and
vehicles (EVs) such as police cars, ambulances, and firefighters from non-
emergency vehicles. This involves training a deep learning model to not only
detect vehicles, but also identify them accurately. Figure 3.18 displays a
78
Figure 3.18 Vehicle Types Detection Processes
The changes are made to the YOLOv5s backbone are intended to improve
the network's ability to learn and represent features more efficiently. In this
study, the original C3 layers are replaced with BottleneckCSP layers and
substituted the Spatial Pyramid Pooling - Fast (SPPF) module with the Spatial
79
architecture and named to YOLOv5sm. Modified version of YOLOv5 is
for video input, a PC with a GPU for training and executing the YOLO model,
an LED Traffic Light Signal Module, and an Arduino Uno for signal control.
As for the software component, it involves the use of the Python programming
language and its associated libraries. The working mechanism of the proposed
80
Figure 3.20 System Architecture
cars, ambulances and firefighters, within regular traffic, which in turn enables
81
flow is shown in the Figure 3.21.
the traffic flow. The proposed approach utilizes advanced algorithms and real-
𝐴𝑇𝑖 = 𝐺𝑖 + 𝑌𝑖 3.1
Where,
82
ATi : Allowed time for passing vehicles of Lane i (in seconds)
That means the total times for one cycle is equal to:
𝐶 = ∑𝑛𝑖=0 𝐺𝑖 + 𝑌𝑖 3.3
To incorporate the preemption (Pi) duration for emergency vehicles into the
equation for the total cycle length C, we need to add the preemption duration
+ 𝑃𝑖 𝑖𝑓 𝐸𝑉𝑠 𝑎𝑝𝑝𝑒𝑟𝑎𝑟𝑒𝑑
𝐶 = ∑𝑛𝑖=0 𝐺𝑖 ± 𝑃𝑖 + 𝑌𝑖 { 3.4
− 𝑃𝑖 𝑖𝑓 𝑟𝑜𝑎𝑑 𝐶𝑙𝑒𝑎𝑟𝑑 𝑎𝑛𝑑 𝑛𝑜 𝑣𝑒ℎ𝑐𝑖𝑙𝑒 𝑜𝑛 𝑡ℎ𝑒 𝐿𝑎𝑛𝑒
Then, the static signaling time is converted from static to dynamic value based
on factors including appearance EVs and not cars in the lane while still in green.
𝑛
+ 𝑃𝑖 𝑖𝑓 𝐸𝑉𝑠 𝑎𝑝𝑝𝑒𝑟𝑎𝑟𝑒𝑑
𝐶 = ∑ ∆(𝐺𝑖 ± 𝑃𝑖 + 𝑌𝑖 ) { 3. 5
− 𝑃𝑖 𝑖𝑓 𝑟𝑜𝑎𝑑 𝐶𝑙𝑒𝑎𝑟𝑑 𝑎𝑛𝑑 𝑛𝑜 𝑣𝑒ℎ𝑐𝑖𝑙𝑒 𝑜𝑛 𝑡ℎ𝑒 𝐿𝑎𝑛𝑒
𝑖=0
83
performance, as not all metrics are suitable for every type of problem. The
metrics used to evaluate the proposed models in this study are divided into two
Hamid, 2023).
𝑇𝑃
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = 3.6
𝑇𝑃+𝐹𝑃
2023).
Or
𝑇𝑃+𝑇𝑁
𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 3.9
𝑇𝑃+𝑇𝑁+𝐹𝑃+𝐹𝑁
84
F1 Score is a metric that combines precision and recall, providing a
assess the accuracy of correctly identifying negative data (Kamal and Hamid,
2023).
𝑇𝑁
𝑆𝑝𝑒𝑐𝑖𝑓𝑖𝑐𝑖𝑡𝑦 = 3.11
𝑇𝑃+𝐹𝑃
known true values (Padilla et al., 2020, Gong, 2021). This metric helps to assess
3.5 demonstrates a typical confusion matrix for binary classification, yet it can
85
Table 3.5 Standard tabular confusion matrix (Narkhede, 2018)
Actual
Negative
In the displayed table, columns represent the predicted values, while rows
indicate the actual values. The table distinguishes between two potential
implies the no changing signals. The table is divided into four categories:
86
result is irrelevant. This is due to the fact that there are numerous bounding
boxes in any given image that should not be detected (Padilla et al., 2020).
intersection over union (IOU), which is a metric derived from the Jaccard
In object detection, the IOU measures the overlap between the predicted
bounding box Bp and the ground-truth bounding box Bgt, defined as the ratio
𝑎𝑟𝑒𝑎(𝐵𝑝 ∩𝐵𝑔𝑡 )
𝐽(𝐵𝑝 , 𝐵𝑔𝑡 ) = 𝐼𝑂𝑈 = 3.12
𝑎𝑟𝑒𝑎(𝐵𝑝 ∪𝐵𝑔𝑡 )
IOU with a given threshold, t. If the IOU is greater than or equal to t, the
87
considered incorrect.
negatives (TN). Therefore, metrics such as true positive rate (TPR), false
positive rate (FPR), and ROC curves (Hanley and McNeil, 1982) are not used.
precision (P) and recall (R) (as previous mentioned). Precision is defined as the
other hand, gauges a model's ability to detect all relevant instances, including
accuracy of object detectors across all classes in a given database. The mAP is
essentially the average precision calculated for each class (Ren et al., 2015, Liu
with APi representing the average precision in the i-th class, and N being
88
CHAPTER FOUR:
89
4.1 Introduction
vehicle classification and detection. The main goal is to achieve high accuracy
of real traffic intersections are developed, which are crucial for the application
made. Finally, the results of this study are presented and discussed.
and the proposed model, which comprises three main elements, was introduced.
precisely, the deep learning model was improved using the efficiency of
DenseNet201, which achieved greater accuracy than other models. The purpose
part, YOLOv5 was employed for vehicle identification and detection tasks.
vehicle type at any given moment when they pass through the intersection,
achieving complete traffic analysis of the area. Finally, the system features an
90
average travel time by dynamically regulating traffic signals to match observed
congestion levels in order to maximize flow rate and prevent queue build-up.
pre-trained models are compiled using the customized dataset for different
are fixed for all methods, such as (filter size, dropout rate, batch size, and
learning rate). The description of value of the fixed hyper parameters are shown
from preliminary experiments. When the model was trained for fewer than 15
91
metrics. Figure 4.1. and 4.2. show the accuracy and precision results for the
different input image sizes when the best optimizer has been chosen. In this
Accuracy (%)
1.1
0.9
0.8
0.7
0.6
0.5
15 20 25 30
Accuracy Image Size 64 Accuracy Image Size 128 Accuracy Image Size 224
Precision (%)
1.1
0.9
0.8
0.7
0.6
0.5
15 20 25 30
Precision Image Size 64 Precision Image Size 128 Precision Image Size 224
Experimental results in Figures 4 and 5 reveal that the image size 224*224
gives better accuracy and precision values. Therefore, for further tests, merely
92
used this size with all techniques and optimizers in this research.
Table 4.2 and 4.3 present the accuracy and precision metrics results to select
the best optimizer using our new search strategy and other tests are detailed in
the Appendix A.
The highlighted rows in the above tables indicate that the more accurate
model is the DenseNet201 with 120 layers freezing and the best optimizer is
RMSprop for both accuracy and precision tests when the input image size is
93
Table 4.3 Precision Tests
Image Epoch Accuracy
Models Optimizers
Size No. (%)
15 VGG16 Adam 90.96
20 VGG19 Adam 91.01
64
25 VGG16 RMSprop 91.63
30 VGG19 Nadam 91.65
The matrix diagonal represents the proposed model performance accuracy for
94
Figure 4.3 Confusion matrix for the optimal model and optimizer
The model’s (DenseNet201 with 120 layers freezing) loss and accuracy for
the training and test validation are depicted in Figure 4.4 and Figure 4.5
respectively.
95
Figure 4.5 Model’s accuracy (DensNet201 – 120 layers freezing)
technique for detecting vehicle types. The hyperparameters, such as filter size,
dropout rate, batch size, and learning rate, are kept constant across all methods
using the YOLO model, except image size. The Table 4.4 displays the
Hyper-parameter Description
Batch Size 16
Learning Rate 0.01
Optimizer SGD
Figures 4.6 and 4.7 show examples for batch training and prediction,
respectively.
96
Figure 4.6 Batch Training
97
Figure 4.7 Batch Prediction
The results are obtained from evaluating different input image sizes using
performance metrics such as mAP, recall, and F1-Score are presented in Table
4.5. The highlighted rows in the tables indicate the superior performance of the
YOLOv5sm model.
98
Table 4.5 Object Detection Using YOLOv5 and Modified YOLOv5 Results
Model Image No. of F1 Score Precisio Recall [email protected]
75 87 100 99 90.2
Score, precision, recall, mAP, and confusion matrix are shown in Figures 4.9,
99
Figure 4.9 Precision
100
Figure 4.11 [email protected]
Figures 4.14 and 4.15 show the loss functions for the training and validation
sets. These figures depict both the unmodified (YOLOv5s) and modified
101
Figure 4.13 The loss functions for the training and validation sets of original
(YOLOv5s)
Figure 4.14 The loss functions for the training and validation sets for
modified (YOLOv5sm)
102
a real traffic environment was developed for this study. As previously
images and uploading them to the model, and an Arduino with LEDs for
and C (Crowded Lane) in relation to Lanes (L1, L2, L3, and L4), with the goal
of determining availability.
The factors, which can affect the traffic signals with respecting lanes have
103
Table 4.6 Lanes and Factors
Traffic Lanes
L1 L2 L3 L4
A 1 5 a A
Factors
F 2 6 b B
P 3 7 c C
C 4 8 d D
For testing the proposed traffic flow some scenario created which are detailed
below:
o Set the duration of one cycle = 140 Seconds (120 for Green
Signals with 30 Seconds for each Lane and 20 Seconds for Red
104
yellow for 5 seconds, which will enable the ambulance to pass
o After the yellow signal has finished, the green signal returns to
Traffic Lanes
L1 L2 L3 L4
A X ✓ X X
Factors
F X X X X
P X X X X
C X X X X
Where:
o Set the duration of one cycle = 140 Seconds (120 for Green
Signals with 30 Seconds for each Lane and 20 Seconds for Red
105
o The green signal turned on for Lane 3, indicating that it can
o After the yellow signal has finished, the green signal returns to
Traffic Lanes
L1 L2 L3 L4
A X X X X
Factors
F ✓ X X X
P X X X X
C X X X X
Where:
106
Case 3: Assume that:
o Set the duration of one cycle = 140 Seconds (120 for Green
Signals with 30 Seconds for each Lane and 20 Seconds for Red
o After the yellow signal has finished, the green signal returns to
107
Table 4.9 Case 3
Traffic Lanes
L1 L2 L3 L4
A X X X X
Factors
F X X X X
P ✓ X X X
C X X X X
Where:
1 105 5 100
2 70 5 65
3 35 5 30
108
4.3 Discussion
The analysis of the obtained results focuses on three key areas: classification
number of frozen layers during training and the quality of the training data. This
shown in Table 4.2, which achieved higher accuracy compared to others. The
the first 30 layers using an imbalanced dataset of 3218 images. Despite the
freezing the first 120 layers and using a balanced dataset of 6222 images. This
combined benefits of freezing more layers and using balanced data. A balanced
model generalization. It is worth noting that the same RMSProb optimizer was
109
shown in Table 4.11.
specifically 120 instead of just 30, allows the model to retain more of its pre-
trained features. This aids in better feature extraction and reduces the risk of
the diversity and representativeness of the training data, allowing the model to
In summary, the results clearly demonstrate the crucial roles played by layer
freezing and the quality of the training data in the performance of the
110
4.3.2 Discussion of Vehicle Detection Results
The performance of the YOLOv5s model and its proposed modified
YOLOv5sm, has been analyzed across different image sizes and training
epochs using key metrics such as F1 Score, Precision, Recall, and [email protected].
false positives. Recall slightly decreases from 99% to 98% as epochs increase,
while [email protected] improves from 91% at 50 epochs to 92.2% at 100 epochs. This
accuracy.
When the image size is reduced to 512*512 and the model is trained for 100
epochs, the F1 Score reaches 89%, Precision remains at 100%, Recall at 99%,
and [email protected] at 91.7%. This configuration suggests that a smaller image size
with sufficient training can yield high performance, but it does not surpass the
The proposed YOLOv5sm model, tested with an image size of 640* 640 for
111
at this smaller image size, achieving the highest [email protected] among all tested
configurations.
but the proposed YOLOv5sm with an image size of 416*at 100 epochs delivers
its superior capability in object detection tasks, making it a preferred choice for
diverse datasets and real-world conditions would ensure the robustness of these
findings.
In the first scenario, the initial time to complete the process is 105 seconds.
optimization technique.
The second scenario shows a similar trend. Initially, the process takes 70
112
In the third scenario, the process originally takes 35 seconds to complete.
on reducing process times across all scenarios. The optimized time consistently
approach.
indicates the effectiveness of the optimization process and its potential for
broad application.
scenario.
113
CHAPTER FIVE:
5. CONCLUSIONS AND FUTURE WORKS
114
5.1 Conclusions
critical due to the growing number of vehicles on the roads. This study presents
The first phase focused on classifying vehicle types using various deep
learning techniques. Among the models tested, the DenseNet201 model proved
enhancements such as freezing the first 120 layers and using a balanced dataset
The second phase involved vehicle detection using the YOLOv5s and
recall across different image sizes and training epochs. Specifically, the
YOLOv5sm model, trained with an image size of 416x416 for 100 epochs,
the YOLOv5sm model, particularly when using smaller image sizes, and
The final phase involved testing the proposed system in a simulated traffic
environment with the goal of optimizing traffic flow. Three scenarios were
115
showed significant reductions in process times. In the first scenario, the time
trained models.
signaling systems.
116
Finding the EVs car positions: Applying another technique for
117
REFERENCES
AGGARWAL, V. J. A. T. O. I. P. & VISION, C. 2018. A review: deep learning
technique for image classification. 4, 21.
ALHUDHAIF, A., SAEED, A., IMRAN, T., KAMRAN, M., ALGHAMDI, A.
S., ASEERI, A. O. & ALSUBAI, S. J. C. S. S. E. 2022. A Particle Swarm
Optimization Based Deep Learning Model for Vehicle Classification.
40, 223-235.
ARIFFIN, W. N. S. F. W., KEAT, C. S., PRASATH, T., SURIYAN, L., NORE,
N. A. M., HASHIM, N. B. M. & ZAIN, A. S. M. Real-time Dynamic
Traffic Light ControlSystem with Emergency Vehicle Priority. Journal
of Physics: Conference Series, 2021. IOP Publishing, 012063.
ASHA, C. & NARASIMHADHAN, A. Vehicle counting for traffic
management system using YOLO and correlation filter. 2018 IEEE
International Conference on Electronics, Computing and
Communication Technologies (CONECCT), 2018. IEEE, 1-6.
BIN CHE MANSOR, M. A. H., KAMAL, N. A. M., BIN BAHAROM, M. H.
& BIN ZAINOL, M. A. Emergency Vehicle Type Classification using
Convolutional Neural Network. 2021 IEEE International Conference on
Automatic Control & Intelligent Systems (I2CACIS), 2021. IEEE, 126-
129.
BISWAS, D., SU, H., WANG, C., BLANKENSHIP, J. & STEVANOVIC, A.
J. S. 2017. An automatic car counting system using OverFeat framework.
17, 1535.
BISWAS, D., SU, H., WANG, C., STEVANOVIC, A. & WANG, W. 2019.
An automatic traffic density estimation using Single Shot Detection
(SSD) and MobileNet-SSD. Physics and Chemistry of the Earth, Parts
A/B/C, 110, 176-184.
BORISAGAR, P., AGRAWAL, Y. & PAREKH, R. Efficient Vehicle Accident
Detection System using Tensorflow and Transfer Learning. 2018
118
International Conference on Networking, Embedded and Wireless
Systems (ICNEWS), 27-28 Dec. 2018 2018. 1-6.
BUI, K.-H. N., YI, H., JUNG, H. & CHO, J. Video-Based Traffic Flow
Analysis for Turning Volume Estimation at Signalized Intersections. In:
NGUYEN, N. T., JEARANAITANAKIJ, K., SELAMAT, A.,
TRAWIŃSKI, B. & CHITTAYASOTHORN, S., eds. Intelligent
Information and Database Systems, 2020// 2020 Cham. Springer
International Publishing, 152-162.
CAI, L., WANG, Z., KULATHINAL, R., KUMAR, S., JI, S. J. I. T. O. N. N.
& SYSTEMS, L. 2021. Deep low-shot learning for biological image
classification and visualization from limited training samples. 34, 2528-
2538.
CHAMIE, J. J. Y. G. O. 2020. World population: 2020 overview.
CHEN, L., LEI, C. J. D. L. & MINDSPORE, P. W. 2021. Deep learning basics.
17-28.
CHEN, Z., WU, R., LIN, Y., LI, C., CHEN, S., YUAN, Z., CHEN, S. & ZOU,
X. J. A. 2022. Plant disease recognition model based on improved
YOLOv5. 12, 365.
CHOUDEKAR, P., BANERJEE, S. & MUJU, M. Implementation of image
processing in real time traffic light control. 2011 3rd International
Conference on Electronics Computer Technology, 2011. IEEE, 94-98.
COELHO, M. C., FARIAS, T. L., ROUPHAIL, N. M. J. T. R. P. D. T. &
ENVIRONMENT 2005. Impact of speed control traffic signals on
pollutant emissions. 10, 323-340.
DAI, J., LI, Y., HE, K. & SUN, J. J. A. P. A. 2016. R-FCN: object detection
via regionbased fully convolutional networks, CoRR abs/1605.06409.
DOGRU, N. & SUBASI, A. Traffic accident detection using random forest
classifier. 2018 15th Learning and Technology Conference (L&T), 25-
26 Feb. 2018 2018. 40-45.
119
DONG, S., WANG, P. & ABBAS, K. J. C. S. R. 2021. A survey on deep
learning and its applications. 40, 100379.
DU, X., LI, Y., GUO, Y. & XIONG, H. Vision-Based Traffic Light Detection
for Intelligent Vehicles. 2017 4th International Conference on
Information Science and Control Engineering (ICISCE), 21-23 July
2017 2017. 1323-1326.
EAMTHANAKUL, B., KETCHAM, M. & CHUMUANG, N. The traffic
congestion investigating system by image processing from cctv camera.
2017 International Conference on Digital Arts, Media and Technology
(ICDAMT), 2017. IEEE, 240-245.
ELLAHYANI, A., ANSARI, M. E. & JAAFARI, I. E. 2016. Traffic sign
detection and recognition based on random forests. Applied Soft
Computing, 46, 805-815.
FARAJ, M. A., BOSKANY, N. W. J. U. J. O. S. & TECHNOLOGY 2020.
Intelligent Traffic Congestion Control System using Machine Learning
and Wireless Network. 4, 123-131.
FATIMA, N. J. A. A. I. D. C. & JOURNAL, A. I. 2020. Enhancing
performance of a deep neural network: A comparative analysis of
optimization algorithms. 9, 79-90.
GARG, K., LAM, S.-K., SRIKANTHAN, T. & AGARWAL, V. Real-time
road traffic density estimation using block variance. 2016 IEEE Winter
Conference on Applications of Computer Vision (WACV), 2016. IEEE,
1-9.
GHAHREMANNEZHAD, H., SHI, H. & LIU, C. Real-Time Accident
Detection in Traffic Surveillance Using Deep Learning. 2022 IEEE
International Conference on Imaging Systems and Techniques (IST), 21-
23 June 2022 2022. 1-6.
120
GHAZALI, W., ZULKIFLI, C. & PONRAHONO, Z. The effect of traffic
congestion on quality of community life. 4th International Conference
on Rebuilding Place, 2019.
GIRSHICK, R. 2015. Fast r-cnn. IEEE International Conference on Computer
Vision. IEEE.
GIRSHICK, R., DONAHUE, J., DARRELL, T. & MALIK, J. Rich feature
hierarchies for accurate object detection and semantic segmentation.
Proceedings of the IEEE conference on computer vision and pattern
recognition, 2014. 580-587.
GLUČINA, M., ANĐELIĆ, N., LORENCIN, I. & CAR, Z. J. E. 2023.
Detection and Classification of Printed Circuit Boards Using YOLO
Algorithm. 12, 667.
GONG, M. J. I. J. O. M. I. T. V. 2021. A novel performance measure for
machine learning classification. 13.
GOUTTE, C. & GAUSSIER, E. A probabilistic interpretation of precision,
recall and F-score, with implication for evaluation. European conference
on information retrieval, 2005. Springer, 345-359.
GUO, G. & ZHANG, Z. 2022. Road damage detection algorithm for improved
YOLOv5. Scientific Reports, 12, 15523.
GUO, Q., LI, L. & BAN, X. 2019. Urban traffic signal control with connected
and automated vehicles: A survey. Transportation Research Part C:
Emerging Technologies, 101, 313-334.
HANLEY, J. A. & MCNEIL, B. J. J. R. 1982. The meaning and use of the area
under a receiver operating characteristic (ROC) curve. 143, 29-36.
HAQUE, M. F., LIM, H.-Y. & KANG, D.-S. Object detection based on VGG
with ResNet network. 2019 International Conference on Electronics,
Information, and Communication (ICEIC), 2019. IEEE, 1-3.
HAQUE, S., SHARMIN, S. & DEB, K. Emergency vehicle detection using
deep convolutional neural network. Proceedings of International Joint
121
Conference on Advances in Computational Intelligence: IJCACI 2021,
2022. Springer, 535-547.
HE, K. & SUN, J. Convolutional neural networks at constrained time cost.
Proceedings of the IEEE conference on computer vision and pattern
recognition, 2015. 5353-5360.
HE, K., ZHANG, X., REN, S. & SUN, J. Deep residual learning for image
recognition. Proceedings of the IEEE conference on computer vision
and pattern recognition, 2016. 770-778.
HINTON, G. E., OSINDERO, S. & TEH, Y.-W. J. N. C. 2006. A fast learning
algorithm for deep belief nets. 18, 1527-1554.
HINTON, G. E. & SALAKHUTDINOV, R. R. J. S. 2006. Reducing the
dimensionality of data with neural networks. 313, 504-507.
HOWARD, A. G., ZHU, M., CHEN, B., KALENICHENKO, D., WANG, W.,
WEYAND, T., ANDREETTO, M. & ADAM, H. J. A. P. A. 2017.
Mobilenets: Efficient convolutional neural networks for mobile vision
applications.
HU, W., TAN, T., WANG, L., MAYBANK, S. J. I. T. O. S., MAN, &
CYBERNETICS, P. C. 2004. A survey on visual surveillance of object
motion and behaviors. 34, 334-352.
HUANG, Y.-S., CHUNG, T.-H. & CHEN, C.-T. Modeling traffic signal
control systems using timed colour Petri nets. 2005 IEEE International
Conference on Systems, Man and Cybernetics, 2005. IEEE, 1759-1764.
HUANG, Y. S. & CHUNG, T. H. 2009a. Modeling and analysis of urban traffic
light control systems. Journal of the Chinese Institute of Engineers, 32,
85-95.
HUANG, Y. S. & CHUNG, T. H. J. J. O. T. C. I. O. E. 2009b. Modeling and
analysis of urban traffic light control systems. 32, 85-95.
122
HUSSAIN, T. M., BAIG, A. M., SAADAWI, T. N. & AHMED, S. A. J. I. T.
O. V. T. 1995. Infrared pyroelectric sensor for detection of vehicular
traffic using digital signal processing techniques. 44, 683-689.
IJJINA, E. P., CHAND, D., GUPTA, S. & GOUTHAM, K. Computer Vision-
based Accident Detection in Traffic Surveillance. 2019 10th
International Conference on Computing, Communication and
Networking Technologies (ICCCNT), 6-8 July 2019 2019. 1-6.
IKIRIWATTE, A., PERERA, D., SAMARAKOON, S., DISSANAYAKE, D.
& RUPASIGNHE, P. Traffic density estimation and traffic control using
convolutional neural network. 2019 International Conference on
Advancements in Computing (ICAC), 2019. IEEE, 323-328.
ISMAILOV, A. S., JO‘RAYEV, Z. B. J. S. & EDUCATION 2022. Study of
arduino microcontroller board. 3, 172-179.
JACCARD, P. J. B. S. V. S. N. 1901. Étude comparative de la distribution
florale dans une portion des Alpes et des Jura. 37, 547-579.
JAIN, N. K., SAINI, R., MITTAL, P. J. S. C. T. & SOCTA, A. P. O. 2019. A
review on traffic monitoring system techniques. 569-577.
JAISWAL, A., GIANCHANDANI, N., SINGH, D., KUMAR, V., KAUR, M.
J. J. O. B. S. & DYNAMICS 2021. Classification of the COVID-19
infected patients using DenseNet201 based deep transfer learning. 39,
5682-5689.
JASWAL, D., VISHVANATHAN, S., KP, S. J. I. J. O. S. & RESEARCH, E.
2014. Image classification using convolutional neural networks. 5, 1661-
1668.
JEON, H., LEE, J. & SOHN, K. J. J. O. I. T. S. 2018. Artificial intelligence for
traffic signal control based solely on video images. 22, 433-445.
JING, P., HUANG, H. & CHEN, L. J. I. 2017. An adaptive traffic signal control
in a connected vehicle environment: A systematic review. 8, 101.
123
JONNADULA, E. P. & KHILAR, P. M. A New Hybrid Architecture for Real-
Time Detection of Emergency Vehicles. In: NAIN, N., VIPPARTHI, S.
K. & RAMAN, B., eds. Computer Vision and Image Processing, 2020//
2020a Singapore. Springer Singapore, 413-422.
JONNADULA, E. P. & KHILAR, P. M. A New Hybrid Architecture for Real-
Time Detection of Emergency Vehicles. Computer Vision and Image
Processing: 4th International Conference, CVIP 2019, Jaipur, India,
September 27–29, 2019, Revised Selected Papers, Part II 4, 2020b.
Springer, 413-422.
JOO, H., AHMED, S. H. & LIM, Y. J. C. C. 2020. Traffic signal control for
smart cities using reinforcement learning. 154, 324-330.
KAMAL, K. & HAMID, E.-Z. 2023. A comparison between the VGG16,
VGG19 and ResNet50 architecture frameworks for classification of
normal and CLAHE processed medical images.
KAPLAN BERKAYA, S., GUNDUZ, H., OZSEN, O., AKINLAR, C. &
GUNAL, S. 2016. On circular traffic sign detection and recognition.
Expert Systems with Applications, 48, 67-75.
KATEB, F. A., MONOWAR, M. M., HAMID, M. A., OHI, A. Q. & MRIDHA,
M. F. J. A. 2021. FruitDet: Attentive feature aggregation for real-time
fruit detection in orchards. 11, 2440.
KAUSHIK, S., RAMAN, A. & RAO, K. V. S. R. Leveraging Computer Vision
for Emergency Vehicle Detection-Implementation and Analysis. 2020
11th International Conference on Computing, Communication and
Networking Technologies (ICCCNT), 1-3 July 2020 2020. 1-6.
KE, X., SHI, L., GUO, W. & CHEN, D. J. I. T. O. I. T. S. 2018. Multi-
dimensional traffic congestion detection based on fusion of visual
features and convolutional neural network. 20, 2157-2170.
KELLEHER, J. D. 2019. Deep learning, MIT press.
124
KHAN, S. D. & ULLAH, H. 2019. A survey of advances in vision-based
vehicle re-identification. Computer Vision and Image Understanding,
182, 50-63.
KHASAWNEH, N., FRAIWAN, M. & FRAIWAN, L. J. C. C. 2023. Detection
of K-complexes in EEG signals using deep transfer learning and
YOLOv3. 26, 3985-3995.
KRIZHEVSKY, A., SUTSKEVER, I. & HINTON, G. E. J. A. I. N. I. P. S.
2012. Imagenet classification with deep convolutional neural networks.
25.
KUMARAN, S. K., MOHAPATRA, S., DOGRA, D. P., ROY, P. P. & KIM,
B.-G. 2019a. Computer vision-guided intelligent traffic signaling for
isolated intersections. Expert Systems with Applications, 134, 267-278.
KUMARAN, S. K., MOHAPATRA, S., DOGRA, D. P., ROY, P. P. & KIM,
B.-G. J. E. S. W. A. 2019b. Computer vision-guided intelligent traffic
signaling for isolated intersections. 134, 267-278.
KURNIAWAN, F., SAJATI, H., DINARYANTO, O. J. I. J. O. E. &
TECHNOLOGY 2017. Image processing technique for traffic density
estimation. 9, 1496-1503.
KUUTTI, S., BOWDEN, R., JIN, Y., BARBER, P. & FALLAH, S. J. I. T. O.
I. T. S. 2020. A survey of deep learning applications to autonomous
vehicle control. 22, 712-733.
LAKSHMI, C. J. & KALPANA, S. Intelligent traffic signaling system. 2017
International Conference on Inventive Communication and
Computational Technologies (ICICCT), 10-11 March 2017 2017. 247-
251.
LECUN, Y., BENGIO, Y. & HINTON, G. J. N. 2015. Deep learning. 521, 436-
444.
125
LECUN, Y., BOTTOU, L., BENGIO, Y. & HAFFNER, P. J. P. O. T. I. 1998.
Gradient-based learning applied to document recognition. 86, 2278-
2324.
LEE, W.-H. & CHIU, C.-Y. J. S. 2020. Design and implementation of a smart
traffic signal control system for smart city applications. 20, 508.
LILLESAND, T., KIEFER, R. W. & CHIPMAN, J. 2015. Remote sensing and
image interpretation, John Wiley & Sons.
LIN, A. X., HO, A. F. W., CHEONG, K. H., LI, Z., CAI, W., CHEE, M. L.,
NG, Y. Y., XIAO, X., ONG, M. E. H. J. I. J. O. E. R. & HEALTH, P.
2020. Leveraging Machine Learning Techniques and Engineering of
Multi-Nature Features for National Daily Regional Ambulance Demand
Prediction. 17, 4179.
LIU, P.-H., SU, S.-F., CHEN, M.-C. & HSIAO, C.-C. Deep learning and its
application to general image classification. 2015 international
conference on informative and cybernetics for computational social
systems (ICCSS), 2015. IEEE, 7-10.
LIU, W., ANGUELOV, D., ERHAN, D., SZEGEDY, C., REED, S., FU, C.-Y.
& BERG, A. C. Ssd: Single shot multibox detector. Computer Vision–
ECCV 2016: 14th European Conference, Amsterdam, The Netherlands,
October 11–14, 2016, Proceedings, Part I 14, 2016. Springer, 21-37.
LIU, X., YAN, W. Q. J. M. T. & APPLICATIONS 2021. Traffic-light sign
recognition using Capsule network. 80, 15161-15171.
MALHI, M. H., ASLAM, M. H., SAEED, F., JAVED, O. & FRAZ, M. Vision
based intelligent traffic management system. 2011 Frontiers of
Information Technology, 2011. IEEE, 137-141.
MANGURI, K. H. K. 2016. Traffıc Sıgnalıng Control At Hıghway
Intersectıons Usıng Morphologıcal Image Processıng Technıque. Hasan
Kalyoncu Üniversitesi.
126
MANGURI, K. H. K., MOHAMMED, A. A. J. U. J. O. S. & TECHNOLOGY
2023. A Review of Computer Vision–Based Traffic Controlling and
Monitoring. 7, 6-15.
MINH, T. N., SINN, M., LAM, H. T. & WISTUBA, M. J. A. P. A. 2018.
Automated image data preprocessing with deep reinforcement learning.
NARKHEDE, S. 2018. Understanding Confusion Matrix [Online]. Available:
https://towardsdatascience.com/understanding-confusion-matrix-
a9ad42dcfd62 [Accessed July 22 2024].
NIE, C., WEI, H., SHI, J. & ZHANG, M. J. T. R. I. P. 2021. Optimizing
actuated traffic signal control using license plate recognition data:
Methods for modeling and algorithm development. 9, 100319.
OHN-BAR, E. & TRIVEDI, M. M. To boost or not to boost? on the limits of
boosted trees for object detection. 2016 23rd international conference
on pattern recognition (ICPR), 2016. IEEE, 3350-3355.
OZTURK, S. & FTHENAKIS, V. J. E. 2020. Predicting frequency, time-to-
repair and costs of wind turbine failures. 13, 1149.
PADILLA, R., COSTA FILHO, C., COSTA, M. J. W. A. O. S.,
ENGINEERING & TECHNOLOGY 2012. Evaluation of haar cascade
classifiers designed for face detection. 64, 362-365.
PADILLA, R., NETTO, S. L. & DA SILVA, E. A. A survey on performance
metrics for object-detection algorithms. 2020 international conference
on systems, signals and image processing (IWSSIP), 2020. IEEE, 237-
242.
PON, M. Z. A., KK, K. P. J. S. T. O. A. I. & COMPUTING, Q. 2021.
Hyperparameter tuning of deep learning models in keras. 1, 36-40.
QADRI, S. S. S. M., GÖKÇE, M. A. & ÖNER, E. 2020. State-of-art review of
traffic signal control methods: challenges and opportunities. European
Transport Research Review, 12, 55.
127
RAJI, C., VP, F. F. & KT, S. S. Emergency Vehicles Detection during Traffic
Congestion. 2022 6th International Conference on Trends in Electronics
and Informatics (ICOEI), 2022. IEEE, 32-37.
REDMON, J., DIVVALA, S., GIRSHICK, R. & FARHADI, A. You only look
once: Unified, real-time object detection. Proceedings of the IEEE
conference on computer vision and pattern recognition, 2016. 779-788.
REN, S., HE, K., GIRSHICK, R. & SUN, J. J. A. I. N. I. P. S. 2015. Faster r-
cnn: Towards real-time object detection with region proposal networks.
28.
ROY, S. & RAHMAN, M. S. Emergency vehicle detection on heavy traffic
road from cctv footage using deep convolutional neural network. 2019
international conference on electrical, computer and communication
engineering (ECCE), 2019. IEEE, 1-6.
SAINI, A., SUREGAONKAR, S., GUPTA, N., KARAR, V. & PODDAR, S.
Region and feature matching based vehicle tracking for accident
detection. 2017 Tenth International Conference on Contemporary
Computing (IC3), 10-12 Aug. 2017 2017. 1-6.
SALTI, S., PETRELLI, A., TOMBARI, F., FIORAIO, N. & DI STEFANO, L.
2015. Traffic sign detection via interest region extraction. Pattern
Recognition, 48, 1039-1049.
SAMADI, S., RAD, A. P., KAZEMI, F. M. & JAFARIAN, H. J. J. O. T. T.
2012. Performance evaluation of intelligent adaptive traffic control
systems: A case study. 2, 248.
SERMANET, P., EIGEN, D., ZHANG, X., MATHIEU, M., FERGUS, R. &
LECUN, Y. J. A. P. A. 2013. Overfeat: Integrated recognition,
localization and detection using convolutional networks.
SHAO, F., WANG, X., MENG, F., RUI, T., WANG, D. & TANG, J. J. S. 2018.
Real-time traffic sign detection and recognition method based on
simplified Gabor wavelets and CNNs. 18, 3192.
128
SHARMA, M., BANSAL, A., KASHYAP, V., GOYAL, P. & SHEIKH, T. H.
Intelligent traffic light control system based on traffic environment using
deep learning. IOP Conference Series: Materials Science and
Engineering, 2021. IOP Publishing, 012122.
SHIRVANI SHIRI, M. & MALEKI, H. R. J. I. J. O. F. S. 2017. Maximum
green time settings for traffic-actuated signal control at isolated
intersections using fuzzy logic. 19, 247-256.
SHOBEIRI, S., AAJAMI, M. J. A. J. O. S. & ENGINEERING 2021. Shapley
value in convolutional neural networks (CNNs): A Comparative Study.
2, 9-14.
SHUSTANOV, A. & YAKIMOV, P. 2017. CNN Design for Real-Time Traffic
Sign Recognition. Procedia Engineering, 201, 718-725.
SIMONYAN, K. & ZISSERMAN, A. J. A. P. A. 2014. Very deep
convolutional networks for large-scale image recognition.
SUHAIMY, M. A., HALIM, I. S. A., HASSAN, S. L. M. & SAPARON, A.
Classification of ambulance siren sound with MFCC-SVM. AIP
Conference Proceedings, 2020. AIP Publishing LLC, 020032.
SUN, T., HUANG, Z., ZHU, H., HUANG, Y. & ZHENG, P. J. I. A. 2020.
Congestion pattern prediction for a busy traffic zone based on the Hidden
Markov Model. 9, 2390-2400.
SUN, Z., BEBIS, G., MILLER, R. J. I. T. O. P. A. & INTELLIGENCE, M.
2006. On-road vehicle detection: A review. 28, 694-711.
SZEGEDY, C., LIU, W., JIA, Y., SERMANET, P., REED, S., ANGUELOV,
D., ERHAN, D., VANHOUCKE, V. & RABINOVICH, A. Going
deeper with convolutions. Proceedings of the IEEE conference on
computer vision and pattern recognition, 2015. 1-9.
TAMMINA, S. J. I. J. O. S. & PUBLICATIONS, R. 2019. Transfer learning
using vgg-16 with deep convolutional neural network for classifying
images. 9, 143-150.
129
TARANTO, D. J. P., FACULTY OF TECHNICAL SCIENCES, BITOLA,
MACEDONIA 2012. UTOPIA Urban Traffic Control Overview.
TIAN, D., ZHANG, C., DUAN, X. & WANG, X. J. I. A. 2019. An automatic
car accident detection method based on cooperative vehicle
infrastructure systems. 7, 127453-127463.
VERES, M. & MOUSSA, M. J. I. T. O. I. T. S. 2019. Deep learning for
intelligent transportation systems: A survey of emerging trends. 21,
3152-3168.
VIOLA, P. & JONES, M. Rapid object detection using a boosted cascade of
simple features. Proceedings of the 2001 IEEE computer society
conference on computer vision and pattern recognition. CVPR 2001,
2001. Ieee, I-I.
VITI, F. & VAN ZUYLEN, H. J. J. T. R. P. C. E. T. 2010. A probabilistic
model for traffic at actuated control signals. 18, 299-310.
WAHLSTEDT, J. Evaluation of the two self-optimising traffic signal systems
Utopia/Spot and ImFlow, and comparison with existing signal control in
Stockholm, Sweden. 16th International IEEE Conference on Intelligent
Transportation Systems (ITSC 2013), 2013. IEEE, 1541-1546.
WANG, Y., YANG, X., LIANG, H. & LIU, Y. J. J. O. A. T. 2018. A review
of the self-adaptive traffic signal control system based on future traffic
environment. 2018.
WEI, H., ZHENG, G., GAYAH, V. & LI, Z. J. A. P. A. 2019. A survey on
traffic signal control methods.
WENQI, L., DONGYU, L. & MENGHUA, Y. A model of traffic accident
prediction based on convolutional neural network. 2017 2nd IEEE
International Conference on Intelligent Transportation Engineering
(ICITE), 1-3 Sept. 2017 2017. 198-202.
130
WU, T.-H., WANG, T.-W. & LIU, Y.-Q. Real-time vehicle and distance
detection based on improved yolo v5 network. 2021 3rd World
Symposium on Artificial Intelligence (WSAI), 2021. IEEE, 24-28.
YANG, Y., LUO, H., XU, H. & WU, F. 2016. Towards Real-Time Traffic Sign
Detection and Classification. IEEE Transactions on Intelligent
Transportation Systems, 17, 2022-2031.
YU, Y., XU, M. & GU, J. J. I. I. T. S. 2019. Vision-based traffic accident
detection using sparse spatio-temporal features and weighted extreme
learning machine. 13, 1417-1428.
YUAN, Y., XIONG, Z. & WANG, Q. ACM: Adaptive cross-modal graph
convolutional neural networks for RGB-D scene recognition.
Proceedings of the AAAI conference on artificial intelligence, 2019.
9176-9184.
ZHANG, G. & WANG, Y. J. I. T. O. I. T. S. 2010. Optimizing minimum and
maximum green time settings for traffic actuated control at isolated
intersections. 12, 164-173.
ZHANG, J., WANG, F.-Y., WANG, K., LIN, W.-H., XU, X. & CHEN, C. J. I.
T. O. I. T. S. 2011. Data-driven intelligent transportation systems: A
survey. 12, 1624-1639.
ZHENG, X., RECKER, W. & CHU, L. J. J. O. I. T. S. 2010. Optimization of
control parameters for adaptive traffic-actuated signal control. 14, 95-
108.
ZHONG, Z., YAN, J., WU, W., SHAO, J. & LIU, C.-L. Practical block-wise
neural network architecture generation. Proceedings of the IEEE
conference on computer vision and pattern recognition, 2018. 2423-
2432.
ZHOU, F., ZHAO, H. & NIE, Z. Safety helmet detection based on YOLOv5.
2021 IEEE International conference on power electronics, computer
applications (ICPECA), 2021. IEEE, 6-11.
131
APPENDIX A: RESULTS OF CLASSIFICATION PROCESS
Image Size: 64*64
No of epochs: 15
132
Nadam 0.804043546 0.8024 0.804 0.8026
RMSprop 0.808709176 0.8132 0.8087 0.809
133
Adam 0.84691358 0.8544 0.8469 0.8499
Adamax 0.786831276 0.7909 0.7868 0.7876
DenseNet201 Freeze 0-150
Nadam 0.855144033 0.8596 0.8551 0.8565
RMSprop 0.854320988 0.8601 0.8543 0.8562
134
RMSprop 0.856790123 0.8647 0.8568 0.8594
Adam 0.849382716 0.8581 0.8494 0.8521
Adamax 0.776954733 0.7913 0.777 0.7816
DenseNet201 Freeze 0-150
Nadam 0.860082305 0.8715 0.8601 0.8637
RMSprop 0.855967078 0.8646 0.856 0.8592
135
Nadam 0.857613169 0.8676 0.8576 0.8612
RMSprop 0.847736626 0.8681 0.8477 0.8542
Adam 0.864197531 0.8709 0.8642 0.8665
Adamax 0.788477366 0.8079 0.7885 0.7956
DenseNet201 Freeze 0-150
Nadam 0.84526749 0.8579 0.8453 0.8487
RMSprop 0.863374486 0.8634 0.8634 0.8632
136
Adamax 0.926748971 0.9289 0.9267 0.9276
Nadam 0.944855967 0.9468 0.9449 0.9454
RMSprop 0.943209877 0.9454 0.9432 0.9438
Adam 0.951440329 0.9524 0.9514 0.9517
Adamax 0.930041152 0.9295 0.93 0.9295
DenseNet201 Freeze 0-150
Nadam 0.939917695 0.942 0.9399 0.9404
RMSprop 0.949794239 0.9511 0.9498 0.9502
137
Adam 0.95308642 0.9538 0.9531 0.9533
Adamax 0.930864198 0.9353 0.9309 0.9324
DenseNet201 Freeze 0-120
Nadam 0.953909465 0.9569 0.9539 0.9548
RMSprop 0.955555556 0.9568 0.9556 0.956
Adam 0.948148148 0.9506 0.9481 0.9487
Adamax 0.938271605 0.9385 0.9383 0.9383
DenseNet201 Freeze 0-150
Nadam 0.953909465 0.9542 0.9539 0.9539
RMSprop 0.948148148 0.95 0.9481 0.9486
138
RMSprop 0.93744856 0.9386 0.9374 0.9378
Adam 0.949794239 0.9521 0.9498 0.9506
Adamax 0.936625514 0.9392 0.9366 0.9375
DenseNet201 Freeze 0-120
Nadam 0.953909465 0.955 0.9539 0.9543
RMSprop 0.941563786 0.9439 0.9416 0.9424
Adam 0.949794239 0.951 0.9498 0.9502
Adamax 0.942386831 0.9432 0.9424 0.9427
DenseNet201 Freeze 0-150
Nadam 0.95473251 0.9553 0.9547 0.9547
RMSprop 0.922633745 0.9292 0.9226 0.9248
139
Nadam 0.957201646 0.9577 0.9572 0.9574
RMSprop 0.949794239 0.952 0.9498 0.9504
Adam 0.95308642 0.9547 0.9531 0.9533
Adamax 0.93909465 0.9393 0.9391 0.9391
DenseNet201 Freeze 0-120
Nadam 0.947325103 0.9491 0.9473 0.9479
RMSprop 0.948971193 0.9517 0.949 0.9495
Adam 0.95308642 0.9541 0.9531 0.9534
Adamax 0.93909465 0.9413 0.9391 0.9398
DenseNet201 Freeze 0-150
Nadam 0.949794239 0.9505 0.9498 0.9499
RMSprop 0.95308642 0.953 0.9531 0.9529
140
Adamax 0.973662551 0.9738 0.9737 0.9737
Nadam 0.975308642 0.9752 0.9753 0.9752
RMSprop 0.976131687 0.9765 0.9761 0.9762
Adam 0.980246914 0.9802 0.9802 0.9802
Adamax 0.973662551 0.9741 0.9737 0.9738
DenseNet201 Freeze 0-120
Nadam 0.981069959 0.9811 0.9811 0.9811
RMSprop 0.977777778 0.978 0.9778 0.9777
Adam 0.977777778 0.9778 0.9778 0.9778
Adamax 0.96872428 0.9686 0.9687 0.9686
DenseNet201 Freeze 0-150
Nadam 0.980246914 0.9804 0.9802 0.9803
RMSprop 0.978600823 0.9789 0.9786 0.9787
141
Adam 0.982716049 0.9827 0.9827 0.9827
Adamax 0.97037037 0.9705 0.9704 0.9704
DenseNet201 Freeze 0-90
Nadam 0.980246914 0.9805 0.9802 0.9803
RMSprop 0.972839506 0.9743 0.9728 0.9732
Adam 0.975308642 0.9754 0.9753 0.975
Adamax 0.974485597 0.9746 0.9745 0.9745
DenseNet201 Freeze 0-120
Nadam 0.981069959 0.981 0.9811 0.981
RMSprop 0.974485597 0.9754 0.9745 0.9747
Adam 0.981069959 0.981 0.9811 0.981
Adamax 0.976131687 0.9762 0.9761 0.9762
DenseNet201 Freeze 0-150
Nadam 0.97037037 0.971 0.9704 0.9706
RMSprop 0.978600823 0.9787 0.9786 0.9786
142
RMSprop 0.983539095 0.9835 0.9835 0.9835
Adam 0.98436214 0.9844 0.9844 0.9843
Adamax 0.966255144 0.9665 0.9663 0.9663
DenseNet201 Freeze 0-90
Nadam 0.982716049 0.9828 0.9827 0.9828
RMSprop 0.982716049 0.9828 0.9827 0.9827
Adam 0.976131687 0.9763 0.9761 0.9762
Adamax 0.978600823 0.9787 0.9786 0.9786
DenseNet201 Freeze 0-120
Nadam 0.976954733 0.9773 0.977 0.9771
RMSprop 0.975308642 0.9753 0.9753 0.9752
Adam 0.975308642 0.9752 0.9753 0.9753
Adamax 0.976954733 0.977 0.977 0.9769
DenseNet201 Freeze 0-150
Nadam 0.981069959 0.981 0.9811 0.981
RMSprop 0.986831276 0.9871 0.9868 0.9869
143
Nadam 0.97037037 0.9713 0.9704 0.9707
RMSprop 0.982716049 0.9828 0.9827 0.9827
Adam 0.979423868 0.9795 0.9794 0.9794
Adamax 0.976954733 0.9769 0.977 0.9769
DenseNet201 Freeze 0-90
Nadam 0.980246914 0.9803 0.9802 0.9803
RMSprop 0.985185185 0.9852 0.9852 0.9851
Adam 0.982716049 0.9827 0.9827 0.9827
Adamax 0.972839506 0.9732 0.9728 0.973
DenseNet201 Freeze 0-120
Nadam 0.983539095 0.9837 0.9835 0.9836
RMSprop 0.988477366 0.9885 0.9885 0.9885
Adam 0.976954733 0.977 0.977 0.9769
Adamax 0.969547325 0.97 0.9695 0.9697
DenseNet201 Freeze 0-150
Nadam 0.976954733 0.977 0.977 0.9767
RMSprop 0.975308642 0.9751 0.9753 0.9752
144
پوختە
ژمارەی دانیشتوانی جیهان بە شێوەیەکی بەرچاو زیادی کردووە ،ئەمەش کاریگەری لەسەر
بەکارهێنانی ئۆتۆمبێل لەالیەن تاکەکانەوە هەیە و دەبێتە هۆی زیادبوونی ژمارەی ئۆتۆمبێل لە
شارەکاندا .بەهۆی هەبونی پەیوەندی ڕاستەوخۆی نێوان دانیشتووان و بەکارهێنانی ئۆتۆمبێل ،ئەمەش
وادەکات کە بەڕێوەبردنی هاتوچۆ بووەتە پرسێکی گرنگ کە پێویستە چارەسەر بکرێت .بۆ ئەم
مەبەستە ،ئاماژەدانی هاتوچۆی زیرەک بە ناو شارەکان خێرا پێویستە بۆ زاڵبوون بەسەر قەرەباڵغی
هاتوچۆ ،و کەمکردنەوەی تێچوون و کاتی گەشتکردن .بۆ زاڵبوون بەسەر ئەم کێشانەدا ،بینینی
کۆمپیوتەر ( )Computer Visionو فێربوونی قووڵ ( )Deep Learningبژاردەی گرنگن بۆ
مامەڵەکردن لەگەڵ ئەم پرسەدا چونکە ڕۆڵێکی گرنگ دەگێڕن بۆ بەڕێوەبردن و کۆنترۆڵکردنی
سیگناڵەکانی هاتوچۆ .سەرەڕای ئەوەش ،دۆزینەوە و جیاکردنەوەی نێوان شتەکان()Objects
یارمەتیدەرە بۆ ژماردنی ئۆتۆمبێلەکان و شتەکانی تر کە خۆیان لە قەرەباڵغی و کۆنترۆڵکردنی
سیگناڵەکان لە ناوچەکانی هاتوچۆدا بەدوور دەگرن .جگە لەوەش دۆزینەوەی ئۆتۆمبێلی فریاگوزاری
و پێدانی ئەولەویەت بۆیان کە پێویستە بۆ سیستەمی زیرەکی ئاماژەدانی هاتوچۆ .
ئامانجی سەرەکی ئەم توێژینەوەیە دیزاینکردن و جێبەجێکردنی سیستەمێکی کارامەیە بۆ سیستەمی
سیگناڵی هاتوچۆ لەسەر بنەمای دۆزینەوەی ئۆتۆمبێل لە ترافیکەکان .جگە لەوەش ،سیستەمی
پێشنیارکراوی چوار قۆناغ لەخۆدەگرێت؛ یەکەمیان گرتنی وێنە لە هەردوو کامێرای هاوشێوە و کاتی
ڕاستەقینە لە ڕێگاکانەوە .لە قۆناغی دووەمدا ئەلگۆریتمەکانی جیاوازی پێش پرۆسێسکردنی وێنە بۆ
وێنە گیراوەکان وەک هەنگاوێکی پێش پرۆسێسکردن ئەنجام دەدرێن .جگە لەوەش ،تەکنیکەکانی
فێربوونی قووڵ بەکاردەهێنرێن بۆ دیاریکردنی شتەکانی وەک ئۆتۆمبێلەکانی (ئاسایی ،پۆلیس،
فریاگوزاری ،و ئاگرکوژێنەوە و هتد )..لەکاتێکدا لە قۆناغی کۆتاییدا ،سیستەمی پێشنیارکراوی
تاقیدەکرێتەوە بۆ هەڵسەنگاندنی وردی کارایی ئۆتۆمبێلە دۆزراوەکان .
ڕێبازێکی فێربوونی گواستنەوەی دەستکاریکراو بۆ مۆدێلی DenseNet201بەکارهێنراوە بۆ
چەندین پۆلێنکردن ،لەوانەش ئۆتۆمبێلەکانی (ئاسایی ،فریاگوزاری ،ئەمبوالنس ،پۆلیس و
ئاگرکوژێنەوە) .ڕێبازەکە بریتییە لە بەستنی هەندێ لە چینەکانی مۆدێلەکە .ڕێژەی وردبینی بەرز بەم
مۆدێلە بەدەست دێت و دەگاتە .%98.6هەروەها ،شێوازە جیاوازەکانی باشکردن ،لەوانە ( Adam,
)Adamax, Nadam, and RMSprobبەکاردەهێنرێن بۆ باشترکردنی ئەدای دیاریکردن لەسەر
بنەمای باشترین هەڵبژاردنی باشترکەر و وردبینی %98.84ی بەدەستهێنا .سەرەڕای ئەوەش،
وەشانێکی دەستکاریکراوی YOLOv5پێشنیارکرا بۆ دۆزینەوەی ئۆتۆمبێل ،کە ئامانجی
بەرزکردنەوەی مامناوەندی وردبینی مامناوەندە ( )mAPبە ڕێژەی .%3لە کۆتاییدا ،سیستەمی
145
پێشنیارکراوی هاوشێوە کرا بۆ کەمکردنەوەی کاتی چاوەڕوانی لە سیگناڵی هاتوچۆ .ئەنجامی
تاقیکردنەوەکان کەمبوونەوەی بەرچاو لە کاتی چاوەڕوانیدا نیشان دەدەن ،کە لە نێوان ٣٠بۆ ١٠٠
چرکەدایە بەپێی دۆخەکان.
146