0% found this document useful (0 votes)
8 views

Traffic Management System project report

Uploaded by

Arya Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Traffic Management System project report

Uploaded by

Arya Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

TRAFFIC MANAGEMENT SYSTEM

Project report submitted in partial fulfillment of the


requirement for the degree of Bachelor of Technology

in

ELECTRONICS AND COMMUNICATION ENGINEERING

By

AMAN KUMAR(03), AMAN SINGH(04), ARYA


SHARMA(07), RAVI RANJAN(L01)

Under the supervision of


MR. YOGESH
PILWAN
to

Department of Electronics & Communication Engineering

Echelon Institute Of Technology


Kheri-Manjhawali Road, Naharpar, Kabulpur Patti Mahtab, Faridabad, Haryana 12110
CANDIDATE’S DECLARATION

we hereby declare that the work presented in this report entitled “Traffic
Management System” in partial fulfillment of the requirements for the award of
the degree of Bachelor of Technology in ELECTRONICS AND
COMMUNICATION ENGINEERING submitted in the department of

ELECTRONICS AND COMMUNICATION ENGINEERING, ECHELON


INSTITUTE OF TECHNOLOGY is an authentic record of my own work carried
out over a period from 2024 under the supervision of MR. YOGESH PILWAN
The matter embodied in the report has not been submitted for the award of any other
degree or diploma.

This is to certify that the above statement made by the candidate is true to the best
of my knowledge.

Dated: 11th December ,2024

i
ACKNOWLEDGEMENT

Firstly, I express my heartiest thanks and gratefulness to almighty God for His
divine blessing makes it possible to complete the project work successfully. I am
really grateful and wish my profound indebtedness to ECHELON INSTITUTE
OF TECHNOLOGY Deep Knowledge & keen interest of my supervisor in the
field of Data Science to carry out this project. His endless patience, scholarly
guidance, continual encouragement, constant and energetic supervision,
constructive criticism, valuable advice, reading many inferior drafts and correcting
them at all stages have made it possible to complete this project.

I would also generously welcome each one of those individuals who have helped
me straight forwardly or in a roundabout way in making this project a win. In this
unique situation, I might want to thank the various staff individuals, both educating
and non-instructing, which have developed their convenient help and facilitated my
undertaking.
Finally, I must acknowledge with due respect the constant support and patience of
my parents.
Project Group No.:

Student Name: AMAN KUMAR


Rollno.: 21ece03

Student Name: AMAN SINGH


Rollno.: 21ECE04

Student Name: ARYA SHARMA


Rollno:21ECE07

Student Name:RAVI RANJAN


Rollno:22ECEL01

ii
TABLE OF CONTENT

Title Page
No.

Declaration i
Plagiarism Certificate ii
Acknowledgement iii
Table of Content iv
List of Abbreviations v
List of Figures vi
Abstract viii
Chapter-1 Introduction 1
Chapter-2 Literature 11
Survey
Chapter-3 System 16
Development
Chapter-4 Performance 37
Analysis
Chapter-5 Conclusions 43
References 47

iii
LIST OF FIGURES

1. Flowchart traffic management system 10


2. Visual Studio Code 17
3. Tensorflow 18
4. OpenCV 19
5. Arduino Nano 20
6. ArduinoMega 21
7. IR Sensor 22
8. 10k Resistor 23
9. 330 ohm Resistor 23
10. HC-SR04 Ultrasonic Sensor 24
11. Solderless Breadboard 24
12. Output 27
13. Output 28
14. Output 29
15. Code for Vehicle detection 31
16. Circuit Diagram 35
17. Vehicle tracking using CNN 36
18. Input Video 40
19. Output 41

iv
ABSTRACT
A traffic management system is a sophisticated, integrated system that strives to
promote safety, improve traffic flow, and boost overall transportation system
effectiveness. To gather and analyse real-time data regarding traffic conditions, it
depends on cutting-edge technology like sensors, cameras, and communication
networks. Using traffic lights, road signs, and other traffic control equipment, this
data is utilised to control traffic flow and to give drivers real-time information on
accidents, traffic congestion, and other problems.

Reducing traffic jams, boosting safety, and improving the performance of the
transportation system as a whole are the main objectives of a traffic management
system. The technology can assist in cutting commute times, lowering fuel
consumption and emissions, and improving general quality of life for city dwellers
by streamlining traffic and easing congestion. The device can also aid in lowering
the chance of accidents and other occurrences by giving drivers real-time traffic
information, hence improving safety and security on the roadways.

Overall, a traffic management system is an essential part of contemporary


transportation infrastructure, and as traffic volumes rise and urban populations rise,
so will the significance of this component. To maintain the security, effectiveness,
and sustainability of our transportation networks, traffic management system
development and deployment must be given top priority by transportation planners
and politicians.

v
CHAPTER 1
INTRODUCTION

1.1) Introduction
A traffic management system (TMS) is a collection of technologies and practices
that aid in the monitoring and control of traffic flow on roads, highways, and other
transportation networks. The primary purpose of a TMS is to increase safety,
reduce congestion, and optimize infrastructure utilisation.Sensors, cameras, traffic
signals, communication systems, and data analysis tools are typical hardware and
software components of a TMS[1]. These elements collaborate to gather real-time
traffic data, assess it, and send feedback to traffic controllers, drivers, and other
stakeholders.One of the most important advantages of a TMS is its capacity to
allow traffic managers to make real-time choices based on the most recent traffic
data. A TMS, for example, can automatically modify traffic lights to improve
traffic flow or offer drivers with real-time information on alternate routes, delays,
or accidents.Overall, a well-designed and implemented TMS may considerably
enhance transportation network safety, efficiency, and dependability, resulting in a
better life for individuals and improved economic growth for
communities[2].Sure, here are some more specifics on traffic management
systems:

A Traffic Management System includes the following components: - Traffic


surveillance systems, such as cameras and sensors, to monitor traffic flow and
identify incidents and congestion.
● Tools for traffic data analysis and management to handle and understand
data acquired by surveillance systems.
● Intelligent transportation technologies, such as variable message signs
(VMS), radio broadcasts, or smartphone apps, are utilized to offer
real-time information to drivers. - Traffic control systems, such as traffic

1
lights and lane control signals, are used to govern traffic flow.
● Incident management systems, which allow for the rapid identification
and response to accidents, disabled cars, and other situations that may
create delays or congestion.
The Advantages of Traffic Management Systems:
● Increased safety: TMS can help minimize the incidence of accidents by
swiftly detecting and responding to problems, as well as by eliminating
errors.

TMS may assist detect and alleviating congestion hotspots, adjust traffic signals
and speed restrictions, and offer alternate routes to minimize traffic volumes by
monitoring and assessing traffic patterns.

● Improved efficiency: Using real-time traffic data, traffic managers may


make more educated traffic management choices, minimizing delays and
improving travel times. TMS can help reduce air pollution and greenhouse
gas emissions by decreasing congestion and smoothing traffic movements.

Overall, TMS can enhance transportation network performance by making it


safer, more efficient, and more sustainable. The effectiveness of a TMS, on the
other hand, is dependent on its design, implementation, and continuous
maintenance, as well as collaboration between traffic managers, government
agencies, and other parties involved in transportation planning and management.
Yes, here are some additional details on traffic management systems:
Traffic Management System Technologies:
● Vehicle detection sensors that detect the presence and speed of vehicles,
such as inductive loops or radar.
● Automatic Licence Plate Recognition cameras, which read licence plates
and identify the vehicle.

2
Closed Circuit Television (CCTV) cameras will be used to monitor traffic and
detect incidents and bottlenecks.
● Data transmission technologies, such as Wi-Fi or cellular networks, to
transport data between various components
● Data privacy: Collecting and analyzing traffic data might pose privacy
concerns, particularly when ANPR cameras or GPS monitoring are used.
● Integration: Integrating multiple components of a TMS can be difficult,
especially when the systems are owned by different government bodies or
private enterprises. - Human factors: Even with modern technologies,
traffic management still need human interaction and decision-making,
especially when responding to events or crises.

Despite these challenges, the benefits of TMS can outweigh the costs, especially
in densely populated areas where traffic congestion is a major issue.TMS can
therefore boost economic growth and improve individuals' quality of life by
decreasing congestion, enhancing safety, and increasing efficiency[3]. A Traffic
Management System includes the following components: - Traffic surveillance
systems, such as cameras and sensors, to monitor traffic flow and identify
incidents and congestion.
● Tools for traffic data analysis and management to handle and understand
data acquired by surveillance systems.
● Intelligent transportation technologies, like as variable message signs
(VMS), radio broadcasts, or smartphone apps, are useful in giving
real-time information to drivers. - Traffic control systems, such as traffic
lights and lane control signals, are used to govern traffic flow.
● Incident management systems, which allow for the rapid identification and
response to accidents, disabled cars, and other situations that may create
delays or congestion.- Improved safety: TMS may help reduce the
frequency of accidents by immediately recognising and responding to

3
events, as well as reducing congestion, which can help prevent accidents
caused by disgruntled drivers.

TMS may assist in detecting and alleviating congestion hotspots, adjust traffic
signals and speed restrictions, and offer alternate routes to minimize traffic
volumes by monitoring and assessing traffic patterns.
● Improved efficiency: Using real-time traffic data, traffic managers may
make more educated traffic management choices, minimizing delays and
improving travel times. TMS can help reduce air pollution and greenhouse
gas emissions by decreasing congestion and smoothing traffic movements.

Overall, TMS can enhance transportation network performance by making it


safer, more efficient, and more sustainable. The effectiveness of a TMS, on the
other hand, is dependent on its design, implementation, and continuous
maintenance, as well as collaboration between traffic managers, government
agencies, and other parties involved in transportation planning and
management[4].

Vehicle detection sensors, such as inductive loops or radar, are used in Traffic
Management Systems to detect the presence and speed of vehicles.
● Automatic Number Plate Recognition cameras aid in the reading of
number plate numbers and the identification of cars.
Closed Circuit Television (CCTV) cameras will be used to monitor traffic and
detect incidents and bottlenecks.
● Communication technologies, such as Wi-Fi or cellular networks, can send
data between TMS components and give drivers real-time information. -
Data analysis technologies, such as Geographic Information Systems
(GIS) or machine learning techniques, to analyze and understand
surveillance system data. Traffic Management System Difficulties:
● Cost: Developing and maintaining a TMS may be costly, especially in big,

4
complicated urban regions with significant traffic volumes.
● Data privacy: Collecting and analyzing traffic data might pose privacy
concerns, particularly when ANPR cameras or GPS monitoring are used.
Integration: Integrating multiple components of a TMS can be difficult,
especially when the systems are owned by different government bodies or
private enterprises.

Despite these challenges, the benefits of TMS can outweigh the costs, especially
in densely populated areas where traffic congestion is a major issue[4].TMS can
therefore boost economic growth and improve individuals' quality of life by
decreasing congestion, enhancing safety, and increasing efficiency.
● Improved public transport: By lowering traffic congestion and improving
traffic flow, TMS may also improve the operation of public transport
systems, such as buses or trains, by reducing delays and enhancing
dependability.

TMS can assist in making better use of existing transportation infrastructure, such
as roads and highways, by optimizing traffic flow and decreasing congestion,
which can help defer the need for costly expansions or new infrastructure.
● Improved accessibility: TMS can increase accessibility for all road users,
including pedestrians, cyclists, and drivers with impairments, by giving
real-time information regarding traffic conditions and alternative routes.

5
1.2) Problem statement
The problem of traffic congestion in numerous cities has grown dramatically
during the last several years. The advancement of civilization, as well as the
widespread use of vehicles, has resulted in an increasing transportation
requirement for infrastructure, which is notably connected with network
congestion[5]. However, the availability of various transport infrastructure has
slowed mobility expansion. Congestion difficulties are connected with increased
late issues, vehicle operation costs, including fuel consumption, pollution
emissions, and stress caused by cars interfering with traffic flow on the road,
particularly when traffic numbers reach a certain level. The majority of people are
stuck in traffic in cities, and congestion occurs when demand exceeds road
capacity.Several factors have contributed to the traffic congestion. The majority of
them were designed to limit road capacity at a certain place or over a specific
distance, such as when parking is done on a specific lane of road or when the
number of cars is raised[6].Traffic signals have also dominated traffic congestion,
and even when there is little or no traffic on the road, the traffic light still displays
the same sort of traffic time, forcing traffic in the other lanes to rise and
congestion to worsen. As a result, ambulances, police cars, and fire trucks may
arrive late at their destinations.

6
1.3) Objective
The solution we suggested intends to improve the efficacy of the current
autonomous traffic signal system and to offer the optimum traffic network with
the least amount of delay. The system will utilise an adaptive signal for regular
maintenance, as well as sensors for the lane and the maximum number of cars and
image processing for all types of emergency vehicles. Following the successful
completion of our project on road traffic volume, the time will be automatically
computed as the time changes[7]. The method presented in our proposal will be
integrated with automated signaling using a typical operational paradigm. The
system will have superb artificial vision with the help of digital cameras installed
on the motor that will spin our system to face network lanes for checking for
emergency cars and perceiving traffic on the road. The method for our project for
traffic signals programme is to deliver good services that will meet the objectives
of regional partners involved in the management and operation of transportation
systems, abbreviated as TSMO, and the ultrasonic sensors we are using in our
project are to detect the number of traffic signals[6]. We are using in our project to
detect the number of vehicles in a specific lane and then give the best time for
vehicles to continue following traffic without much delay, and thus we have given
a specific lane a priority in timing of the green light while reducing the time for
green light for the other lanes.

7
1.4) Methodology
The different As previously stated, the various components of this project were
completed using the following approaches:
Vehicle Classification Histogram Oriented Gradient-Support Vector Machine

1. Support Vector Machine:


This type of approach is completely based on the supervised machine learning
algorithm.This method is entirely based on the supervised machine learning
algorithm.This method is mostly used for picture classification as well as pattern
recognition.This SVM model may be visualized as a point space with hyperplanes
dividing distinct classes. (Support Vector Machines are simply hyperplanes that
excel in separating and classifying a wide range of classes. SVM is a well-known
object-based classification method.

2. What exactly is a Histogram of Oriented Gradients (HOG)?

The histogram of directed gradients is a useful feature indicator in image


processing, notably for detecting things based on their shapes. How does it work?

1. Break the image up into "Cells," or smaller images.

2. Identify the gradients in the cells that require explanation.

3. Fill in the data in each cell's histogram.

4. Arrange the cells in substantial blocks.

5. Make each block normal.

6. Develop a classifier to find things. The HOG SVM-based vehicle categorisation


procedure is divided into three stages:

8
The first is data collecting, the second is feature extraction, and the final is
training for our project.

Dataset Collection
The first and most critical step in categorizing automobiles is gathering data. To
collect data for the aforementioned application, free datasets that are easily
accessible online are employed. The collection contains examples of car images
taken at various sizes, locations, and lighting settings[2]. The dataset should
support any detection circumstances that must be used for recognition or
classification. The accuracy is determined by the example photographs from the
dataset that were used to train various automobiles. We initially acquired three
distinct sorts of sample footage of automobiles in case of emergency detection,
according to the programme. We have gathered front, back, and side view movies
for the automobile vehicle type. All other categories follow the same procedures.
The used automobile dataset contains the bulk of vehicle pictures taken on Indian
roadways.

Extraction of features
Feature extraction techniques are used to tackle the most prevalent types of
computer vision issues, such as object identification and recognition. The oriented
gradient histogram (HOG) is one of the most prominent feature extraction
approaches utilized in the case of object recognition. According to current vehicle
classification and application count, HOG is the most often used approach for
feature extraction from a tagged training set of photos.

Training
According to the data obtained, training provides the foundation for vehicle
categorization. If necessary, some picture sequences are added to the photographs
from the Internet utilized for the current application's training. The HOG method
is used to train the Support Vector Machine model with the aid of a training set of

9
feature vectors.

Classification of Vehicles
Vehicles are divided into one of three types: passenger cars, HMVs, or
two-wheelers. To classify the acquired vehicle, a characteristic of the vehicle
HOG is extracted. This vector is used by the SVM model to compute the
matching score for the input vector to each label. When using trained vehicle data,
the SVM will return the highest confidence score in the case of a best match.

Figure : Flowchart of Traffic Management System

10
CHAPTER 2
LITERATURE SURVEY

2.1) Introduction

Companies are working to create technology that increases the accuracy of current
models as AI is used in more common goods. The suggestion mechanisms seen in
virtually every product we use serve as a common illustration. Recommendations
are also used by search engines to enhance search results, as well as by
e-commerce websites and movie recommendation systems. Additionally, the AI
and knowledge graphs used in our voice assistants, like Siri or Alexa, give them
an advantage. To learn more about knowledge graphs, we have encountered
several research articles, books, journals, and websites.

2.2 Related Work

[1] Applications for video-based traffic surveillance analysis, which is a hot


research field, are abundant in intelligent transport systems. Urban landscapes are
more difficult to photograph than highways, in part because of camera placement,
background clutter, and changes in vehicle attitude or orientation. The most
contemporary video processing techniques for vehicle recognition, identification,
and tracking are thoroughly examined in this paper[1]. In this study, we categorize
vehicle recognition techniques into groups based on motion and appearance.
These techniques vary from simple probabilistic to adaptive median filtering and
frame differencing.

[2] Applications for video-based traffic surveillance analysis, which is a hot


research field, are abundant in intelligent transport systems. Urban landscapes are
more difficult to photograph than highways, in part because of camera placement,

11
background clutter, and changes in vehicle attitude or orientation. The most
contemporary video processing techniques for vehicle recognition, identification,
and tracking are thoroughly examined in this paper[2]. In this study, we categorize
vehicle recognition techniques into groups based on motion and appearance.
These techniques vary from simple probabilistic to adaptive median filtering and
frame differencing.

[3] The properties of moving objects, such as their high speed degradation and
uncharted pathways, make it difficult to identify and track them. Detecting
moving targets may be done in a variety of ways, however the noise of detection
greatly affects the accuracy of detection[3]. The three-frame method is used in
this work to extract the target, and the extracted image is then processed using the
mathematical morphology methodology. While successfully detecting moving
targets, this method significantly reduces noise. According to the testing results,
this method operates better in real-time, is appropriate for outdoor use, and is
more accurate at recognising moving things.

[4] Tracking vehicles is an integral part of intelligent transportation monitoring.


However, there are currently problems with vehicle tracking, such as scale
change, interference from too similar colors, low resolution video data, and
others. The optical flow MCMC (OF-MCMC) tracking method for tracking
moving objects is suggested in this paper as an improved Markov chain Monte
Carlo (MCMC) tracking method[4]. We first estimate the vehicle's traveling
direction in initial frames using the optical flow approach, and then address the
scale change problem and replace the second-order autoregressive motion model
with the ability to calculate the vehicle's speed.

[5] Parking on the street can cause major traffic problems, like accidents and
congestion in urban areas. A trustworthy and practical method for locating

12
parking violations is given. The method is predicated on frame difference
detection of abrupt changes in vehicle motion. In addition to the temporal
information, vehicle traits from a static image are employed to reduce the false
alarm and missing rate[5]. The proposed method generates a detection accuracy of
94.7% and can precisely estimate parking duration, according to testing results on
24-hour streets. Comparing our method to previous solutions based on EPI image
processing, it is evident that ours employs a video camera in a fixed place without
operating the measurement vehicle.

[6] Recognition and counting of intelligent vehicles are becoming more and more
important in the field of highway management. It might be challenging to see
automobiles due to their wide range in size, which affects how precisely counts of
vehicles are performed[6]. An identifying and counting system for vehicles based
on vision is suggested by this research to solve this issue. In total, there are 57,290
annotated occurrences in 11,129 images from a brand-new high definition
highway vehicle dataset presented in this work. As contrast to the currently
available datasets, the recommended dataset includes annotated microscopic
elements in the image and provides the whole data foundation for vehicle
detection based on deep learning. For counting and detecting automobiles, the
proposed system.

[7] The description of a brand-new technique for categorizing autos from videos.
Two novel concepts are presented: first, probes composed of local 3D curve
groups which, when projected onto video frames, serve as characteristics for
distinguishing distinct vehicle classes in video clips[7]. The second method uses
class probability densities to identify groupings of 3D distances between pairs of
3D probes. The picture curves connected to the 3D ridges on the surface of the
vehicle appear to be the most trustworthy image features for categorising cars.
The bulk of these ridges are located at metal/glass interfaces, two-surface

13
intersections, such as the back and sides, and self-occluding forms, such as wheel
wells or apparent curves of the vehicle body, or silhouettes.

2.3 Summary of Literature Review


The literature study for these systems covers in detail the design, implementation,
and application of traffic management systems. One of the primary implications is
that:

Real-time data collection and analysis: To effectively regulate traffic flow,


real-time data must be acquired and analyzed from a variety of sources, such as
traffic sensors, cameras, and GPS devices. Complex algorithms and software tools
are required to analyze this data and provide real-time traffic forecasts and
reports.

Intelligent transportation systems (ITS): ITS use state-of-the-art tools and


methods to improve the efficiency, security, and general functionality of
transportation networks. In addition to other technological advancements that
enhance traffic management, these systems may incorporate connected and
driverless cars.

Communication networks are crucial components of traffic management systems


because they provide reliable and efficient data transfer between the system's
many components, such as traffic management centres, traffic control devices, and
drivers.

Safety and security: Traffic management systems employ strategies including the
use of traffic signals, street signs, and other traffic control devices to alert drivers
to possible risks and regulate traffic flow in regions with a high accident rate.
These methods are meant to increase road security and safety.

14
CHAPTER 3
SYSTEM DEVELOPMENT

1) A data set

There are street surveillance cameras all over the world, but traffic photographs
are rarely made public owing to copyright and security issues. Looking at the
traffic photo dataset from the standpoint of image capture, we may divide it into
three groups: automobile camera photographs, surveillance camera images, and
non-surveillance camera images. The dataset utilized in our work comprises
photographs of roads and typical streetscapes, which can be used to automatically
recognise and count automobiles and will aid in the solution of issues such as 3D
object identification and tracking. Here are some of the most widely used dataset
lists around the world:

1) The dataset utilized in Tsinghua-Tencent Traffic-Sign contains around 100,000


photos obtained from automobile cameras and covers diverse lighting and weather
situations, however no cars are indicated in that case.

2). Stanford Cars dataset is essentially a vehicle dataset obtained from


non-monitoring cameras using a bright car appearance. This dataset will comprise
a total of 19,000 estimated car categories encompassing the brands, models, and
manufacturing years of the various vehicles.

2) Hardware and Software Requirements

The Following are the software requirements for this project:

1. 4.2 GB RAM

2. MS Window 7 and above Software Requirements

3. Visual Studio Code

15
Microsoft has successfully developed Visual Studio Code, also known as VS
Code, which is essentially a free open-source text editor. VS Code works with
Windows, Linux, and macOS. VS Code has effectively become one of the most
popular programming tools in recent years, despite the fact that the editor is quite
tiny and provides some complex capabilities. VS Code supports a wide range of
programming languages, from Java, C++, and Python to CSS. Furthermore, VS
Code allows users to add and create new extensions such as code linters,
debuggers, and cloud and web development support. In comparison to other text
editors, VS Code's user interface allows for a great deal of interaction.

VISUAL STUDIO CODE

Figure : Visual Studio Code

16
HARDWARE REQUIREMENTS:

The Following mentioned above are hardware requirements for this project:

1. Arduino Nano [A000005]

The Arduino Nano is a compact, breadboard-friendly board that is entirely based


on the ATmega328. It offers nearly the same capabilities as the Arduino
Duemilanove, but in a different packaging. It just lacks a DC power connector and
can function using a Mini-B USB cable rather than a conventional one.

Figure : Arduino Nano

17
2. ArduinoMega2560

Figure : ArduinoMega2560

It's simply a small microcontroller board that's totally based on the ATmega2560.
It features 54 digital I/O pins in total, including 16 analogue inputs, 4 UARTs for
the hardware serial ports, and a 16 MHz crystal oscillator, as well as a USB
connection, a tiny power connector, an ICSP header, and a small reset button. It
has everything needed to support the microcontroller, and it is usually used for
connecting to a computer through a USB cable, or we may power it using an
AC-to-DC converter.The Mega 2560 board is compatible with the vast majority of
shields designed specifically for it and previous boards.

18
3. IR Sensor:

Figure : IR Sensor

An infrared, abbreviated as IR, is a type of sensor circuit that is one of the most
fundamental and widely used sensors in products on the market.Although this
device is very similar to the human visionary senses, which are primarily used for
obstacle detection, it is also one of the most common applications in the real
world. The transmitter component is primarily an infrared sensor that can send
continuous IR rays that are utilized by the IR reception module. The output
terminal of an infrared receiver alters continually depending on how the IR
photons are received. Although this type of variation is not beneficial,

19
4. 10k Resistor:

Figure : 10k Resistor

5. 330-ohm resistor

Figure : 330-ohm resistor

The RC522 RFID module is entirely based on the NXP MFRC522 IC and is one
of the best RFID alternatives available at a reasonable cost. It essentially comes
with the RFID card tag and the key fob tag, and the greatest part is that it can be
written as a tag, which means we can store any type of message in it.

20
7. HC SR04 Ultrasonic sensor 4 Nos

Figure : HC SR04 Ultrasonic sensor

The HC-SR04 offers the finest value for money, is simple to use, and is ideal for
measuring distance sensors ranging from 2cm to 400cm.The sensor is mostly
made up of transducers. One end is the transmitter, which emits ultrasonic sound
pulses, while the other end is the receiver, which listens to the reflected waves. It
is essentially a sound navigation and ranging system, or SONAR, that is used in
submarines to identify underwater objects.

8. Solderless Breadboard

Figure : Solderless Breadboard

21
3) Concepts Requirements

1. Machine Learning Algorithms

Machine learning algorithms, or ML algorithms, are the methods that turn a data
set into a model. The right method is determined by the type of issue you are
attempting to answer, the processing power available, and the type of data you
have (supervised, unsupervised, etc.).

2. Data Pre-processing Functions and tools

The process of preparing raw data for the machine learning model is known as
data preparation. This is the initial and most essential stage of the machine
learning model's development.We don't always come across clear, well-formatted
data when working on a machine learning project. Data must be cleansed and
formatted before it can be processed. As a consequence, we employ the data
pre-processing task.

3. Knowledge of Image Pre-processing

Data preprocessing or cleaning is a common step in machine learning research. As


a machine learning engineer, you will spend a significant amount of time cleaning
and preparing the data before building your learning model.

4. Knowledge of Artificial Neural Network

The artificial neural network, which is a network of interconnected nodes, is built


on a simplification of the brain's neurons. In this picture, the link between the
output of one artificial neuron and the input of another neuron is represented by
an arrow with circular nodes for each artificial neuron.

22
5. Knowledge of Convolution Neural Network
Deep learning neural networks are used to process organized data series, such as
Deep learning neural networks, commonly known as convolutional neural
networks (CNN), are used to analyze ordered data sets such as images.
Convolutional neural networks are widely employed in computer vision and have
successfully become state-of-the-art in many visual applications, including the
most typical example, picture categorization. They have also proved beneficial in
text categorization via natural language processing.

6. matplotlib
Matplotlib is one of the most well-known and established Python plot libraries
and is used in machine learning. Through various visualizations, machine learning
facilitates the understanding of enormous amounts of data. 7.64bit processors are
required.

4. Libraries and Conversion Required in Project

4.1 Importing the required libraries:


from PIL import Image

import cv2

import numpy as np

import requests

4.2 Reading image from the url:


image =
Image.open(requests.get('https://a57.foxnews.com/media.foxbusines
s.com/BrightCove/854081161001/201805/2879/931/524/854081161001_57
82482890001_5782477388001-vs.jpg', stream=True).raw)

23
image = image.resize((450,250))

image_arr = np.array(image)

image

Output:

Figure : Output

We conducted several changes on an image from our video collection to achieve


the best possible outcome. The picture has been converted to grayscale in this
example.

4.3 Grayscale
grey = cv2.cvtColor(image_arr,cv2.COLOR_BGR2GRAY)

Image.fromarray(grey)

24
Output:

Figure : Output

4.4) Gaussian Blur:


In the following stage, we used the GaussianBlur to blur out the image's noise.
One of the most used image processing methods is Gaussian blur. In addition to
image processing, it is often used in graphics design to remove noise from
pictures and smooth them out so that subsequent preprocessing can offer better
results. We utilized the GaussianBlur function () after using this pre-processing
approach.

25
4.5) Application of dilation:
dilated = cv2.dilate(blur,np.ones((3,3)))

Image.fromarray(dilated)

Output:

Figure : Output

After completion of dilation, the nucleus underwent morphological


transformation. Here The nucleus underwent morphological alteration when
dilatation was completed. The morphology ex-approach is used here, which
instructs the function on which operations to do during image processing. The
second argument is about the methods that must be followed, and you may
demand kernels with an elliptical or circular form. To build the morphology ex
technique, we shall utilize OpenCV's obtained structural element function.

Morphology-Ex, structuring element


kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (2, 2)) closing =
cv2.morphologyEx(dilated, cv2.MORPH_CLOSE, kernel)

26
Image.fromarray(closing)

Output:

Detection of the cars with the help of car cascade

We need to detect multiple objects.


car_cascade_src = 'cars.xml'

car_cascade = cv2.CascadeClassifier(car_cascade_src) cars =


car_cascade.detectMultiScale(closing, 1.1, 1) cars

Output: Using the contours returned above, we will create a rectangle around the
observed automobiles. We can see here that it will draw a rectangle with a red
border around every automobile it detects.

cnt = 0

for (x,y,w,h) in cars:

cv2.rectangle(image_arr,(x,y),(x+w,y+h),(255,0,0),2) cnt+= 1
print(cnt, " cars found")

Image.fromarray(image_arr)

27
3.1) Code for the Vehicle Detection in our Project:

Figure : Code for vehicle detection

Figure : Code for vehicle detection

28
Figure : Code for vehicle detection

Figure : Code for vehicle detection

29
3.2) Code for arduino sensor

Figure : Code for vehicle detection

Figure : Code for vehicle detection

30
Figure : Code for vehicle detection

Figure : Code for vehicle detection

31
Figure : Code for vehicle detection

3.3) Circuit Diagram for Traffic Light Control:

Figure : Circuit diagram

32
3.4) Algorithms Used for Emergency vehicle detection:

Vehicle detection is carried out using TensorFlow. A vehicle's corner points are
discovered as soon as it is found. The identified corner points help in identifying
whether the found object is a vehicle or not. Following vehicle detection, the relevant
points from the vehicle zone are provided to the CNN algorithm to help with tracking.

Figure : Vehicle tracking using CNN

33
CHAPTER 4
PERFORMANCE ANALYSIS

1) Accuracy of Different Machine Learning Models:

1.1) Random Forest

Random forests, also known as random decision forests, are a collaborative


learning method that works by training a collection of different decision trees and
outputting the class that is the mode of the classes classification or the mean
prediction regression of the different trees. It explains why decision trees
frequently outperform their training set.

1.2) Artificial neural network

Artificial neural networks are basically the computational systems that are
inaccurately triggered by the biological neural networks that make up the brains
of animals:

The integers p and q represent the number of input and hidden nodes.

The connection weights are j() j = 0, 1, ", q and I p j q) ij = 0, 1, ", ; = 0, 1, ", and
the bias terms are 0 j. The logistic sigmoid function () x e g x + = 1 1 is commonly
used as a nonlinear activation function. Other activation functions can also be
used, e.g., linear, hyperbolic tangent, Gaussian, etc.

34
1.3) Support Vector Machine

Support Vector Machines are supervised learning models that are linked to
learning algorithms that are used in machine learning for data analysis in
classification and regression analysis. SVM is a strong machine learning
technique that relies primarily on mapping learning instances from the input space
to a new high-dimensional, possibly enormous feature space with linearly
separable cases.

The method then finds the best hyperplane where w is a coefficient matrix, φ(x) is
a mapping function, and b here defined as a constant. The approach then
determines the optimum hyperplane, where w is a coefficient matrix, (x) is a
mapping function, and b is a constant. This type of hypersurface divides the
learning instances by the greatest possible margin. Support vectors are essentially
a limited number of crucial boundary instances from each class that are best
separated by this hyperplane. An iterative approach is utilized to produce the ideal
hyperplane by decreasing the function's error estimation.

2.) Analysis:

We would "test" our machine learning model in the "training phase" by utilizing
different libraries in the system to check for analysis and obtain a sense of how
our machine learning model may be generalized to independent data (test dataset).

35
3.) Other Approach:

This recognition system can also be done using YOLOv3. YOLO is an acronym
and here stands for You Only Look Once. This identification method is also
possible with YOLOv3. You Only Look Once is an acronym that stands for You
Only Look Once. It is essentially a real-time object recognition method. Multiple
objects in a single image can be classified and localized. YOLO is a highly quick
and accurate algorithm due to its simplified network structure.

YOLO's key strategies are as follows:

1. Residual blocks - Use this function to divide pictures into NxN grids.

2. Bounding Box Regression -In this step, each grid cell is fed into the model.
YOLO is then used to determine the chance that the cell belongs to a specific
class, and the class with the highest probability is picked.

3. Intersection Over Union (IOU) - Intersection Over Union is a measure that


examines the intersection of the expected and actual bounding boxes. By
executing the intersection over union with the class and largest probability, the no
maximum suppression approach is utilized to reduce very tight bounding boxes.

4.) Comparisons and Results


In this particular section, we will be performing the performance tests of methods
presented here above. We experimented with a video dataset containing 4 streets
without cars. In this section, we will do the performance tests on the approaches
described previously. We tested using a video dataset that had four streets devoid
of automobiles. Our experiment used CNN and OpenCV for image detection for
checking any emergency vehicle and thus making the lane free of use by
removing the green light, as well as making the lane free when there is a large
amount of traffic present in any particular site and adjusting the time of the other
lanes' green lights accordingly.

36
Before the detection from our dataset the following input is taken:

Figure : Input video

After the detection of the cars from our video dataset the following output is
produced:

Figure : Output

37
Figure : Output

Here are the result from Traffic Signal Management and Control System based
on density of vehicles:

Figure : Circuit diagram

After the detection of the cars from our video dataset the following output is
produced
Following are the findings from the traffic signal management and control system
based on vehicle density:
In theWithin one minute, the yellow light at signal 1 will illuminate to indicate
that the red light at signal 1 is approaching, as well as to indicate to vehicles at

38
signal 2 that the green light is about to blink.

After a specific period of time, ultrasonic sensor (US) pins were attached to the
Arduino board for the installation of dynamic light control as shown below:
According to the table above, ultrasonic sensors (US) are in charge of providing
information about the crowd to controllers so that they may decide whether or not
to run the traffic lights on the various sides.

The number and location of sensors totally depends on the length of the street
mentioned in the project and increasing the sensors in the project also gives more
accuracy in determining the amount of crowd, but the cost will be also increasing
due to this.

39
CHAPTER 5
CONCLUSION

Expanding on the importance of careful planning, investment, and collaboration


for the successful implementation of a traffic management system, Before
designing and deploying such a system, it is critical to have a thorough
understanding of the local traffic conditions, needs, and challenges. Population
density, road infrastructure, traffic volume and patterns, as well as the availability
of data sources and communication networks, must all be
considered.Furthermore, a traffic management system should be designed to be
adaptable and flexible in response to changing traffic conditions and evolving
technologies. This necessitates continual performance monitoring and assessment
of the system, as well as continuing research and development to increase its
capabilities and efficacy.Involving the public in the development sector and, in the
case of the deployment of a traffic management system, may also assist boost
awareness and support for the programme. By offering real-time.Finally, while a
traffic management system can provide significant benefits, it is not a panacea for
all traffic problems. It should be viewed as part of a wider strategy to sustainable
urban mobility that includes encouraging public transit, active forms of
transportation, and land use design that prioritizes walkability and
accessibility.Finally, a well-designed and executed traffic management system has
the potential to improve urban mobility, safety, and sustainability.

However, in order to realize its full potential and contribute to the creation of
more livable and sustainable cities, it requires careful planning, investment,
collaboration, and continuous monitoring and improvement.A well-designed
traffic management system may also be beneficial to the economy. It can boost
production and efficiency by decreasing congestion and improving travel times. It
can also bring more visitors and tourists to a city, which can help the local

40
economy.One of the most difficult aspects of designing a traffic management
system is making it accessible and helpful to all parts of society. Pedestrians,
bikers, public transportation users, and drivers of various sorts of vehicles are all
included. It is critical to ensure that the system is constructed with equality and
inclusion in mind, so that all people of the community benefit.In addition, the
introduction of a traffic management system can also provide opportunities for
innovation and job creation. As technology continues to evolve, there is a need for
skilled professionals to develop, implement, and maintain these systems.This has
the potential to offer new job possibilities as well as encourage an environment of
creativity and technical growth in the transportation industry.

To summarize, a well-designed traffic management system may provide various


advantages to society, including enhanced safety, decreased congestion and travel
time, lower emissions, and an overall improvement in the quality of life for
individuals living in metropolitan areas. While developing and implementing
these systems presents challenges, it is critical to invest in their development and
implementation in order to create a sustainable and liveable urban environment
for all.

41
FUTURE WORK

Some potential areas of future work for traffic management systems include:
1. Integration with self-driving cars: As self-driving cars become more common,
traffic management systems will need to be able to communicate with them in
order to optimize traffic flow and maintain road safety.
2. Application of machine learning and artificial intelligence (AI): Machine
learning algorithms may assist traffic management systems in predicting traffic
patterns, identifying possible concerns, and adjusting traffic flow accordingly.
Individual drivers can also benefit from more customized and effective route
planning thanks to AI.
3. Expansion to non-road modes of transportation: Traffic management systems
may be expanded to control forms of transportation other than roads, such as
public transportation, bike lanes, and pedestrian walkways. This can aid in the
development of a more connected and efficient transportation network.
4. Incorporation of environmental factors: To improve traffic flow and minimize
emissions, traffic management systems may be developed to include real-time
data on air quality and meteorological conditions.
5. Increased public engagement: By engaging with the public and receiving
feedback on their needs and preferences, traffic management systems may be
made more successful. This can aid in the development of confidence in the
system and guarantee that it meets the demands of all users. 6. Integration with
smart city efforts: To create a more efficient and sustainable urban environment,
traffic management systems may be combined with other smart city projects such
as energy management, trash management, and public safety.
7. Emergency response management: Traffic management systems may be
utilized to help with emergency response management, allowing emergency
personnel to respond more quickly.
8. Smart parking: Smart parking solutions might be connected with traffic
management systems to reduce traffic congestion caused by cars looking for

42
parking spots. This could include directing drivers to available parking spaces and
providing them with information about parking rates and availability using
real-time data.
9. Public participation: Involving the general public in traffic management can aid
in the development of more effective solutions that suit the demands of all
stakeholders. Crowdsourcing and citizen science might be used to collect data and
insights on traffic conditions, as well as involving the public in decision-making
processes.
10. Cybersecurity: As traffic management systems become more linked and
data-driven, cybersecurity will become more crucial. Traffic control systems

43
CHAPTER 6
REFERENCES

(1) Al-Smadi, M., Abdulrahim, K., and Salam, R.A. Review of vision-based
vehicle identification, recognition, and tracking for traffic surveillance.

(2) Han, D., M. J. Leotta, D. B. Cooper, and J. L. Mundy (2006). Recognition of


vehicle classes from videos using 3D curve probes. International IEEE Workshop
on Visual Surveillance and Performance Evaluation of Tracking and Surveillance
in 2005. IEEE.

(3)(2012) Radhakrishnan, M. For sports applications, video object extraction uses


backdrop removal algorithms.

(4)L.I. Qiu-Lin, H.E. Jia-Feng, & Co. Using the cross-entropy threshold approach
and the three-frame difference method, vehicles may be detected. 172-174 in
Computer Engineering.

(5)(2014) Liu, Y., Yao, L., Shi, Q., and Ding. tracking of vehicles on urban roads
using optical flow. 9th International Conference on Computational Intelligence
and Security in 2013.

(6)(2005) Park, K., Lee, D., and Park, Y. detection of illegal street parking using
video. International Image Processing Conference. Video-based detection of street
parking violations.

(7)(2006) Ferryman, J.M., Worrall, A.D., Sullivan, G.D., and Baker, K.D. a
general-purpose deformable vehicle identification model. 1995 British Machine
Vision Conference Proceedings.British Association for Machine Vision.

44
(8)(2019) Zhao, Z.Q., Zheng, P., Xu, S.T., and Wu. Review of object
identification using deep learning.

(9)(2009) Girshick, R., Donahue, J., Darrell, T., Malik, J. Rich feature hierarchies
for precise segmentation and object detection. IEEE Conference on Computer
Vision and Pattern Recognition, 2014.

(10)J.R.R. Uijlings, K.E.A. van de Sande, T. Gevers, and A.W.M. Smeulders


(2013). Searching specifically for objects.International Journal of Computer
Vision.

45

You might also like