0% found this document useful (0 votes)
33 views9 pages

Smart Traffic Management

Research paper on traffic management

Uploaded by

gokul.b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views9 pages

Smart Traffic Management

Research paper on traffic management

Uploaded by

gokul.b
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

International Journal of

INTELLIGENT SYSTEMS AND APPLICATIONS IN


ENGINEERING
ISSN:2147-67992147-6799 www.ijisae.org Original Research Paper

Smart Traffic: Integrating Machine Learning, and YOLO for


Adaptive Traffic Management System
Nitin Sakhare1,*, Mrunal Hedau2, Gokul B.3, Omkar Malpure4, Trupti Shah5, Anup Ingle6
Submitted: 22/11/2023 Revised: 30/12/2023 Accepted: 10/01/2024
Abstract- The growing number of vehicles has made traffic control a vital concern, rendering traditional manual solutions
ineffective. This research proposes an innovative approach that makes use of the Internet of Things (IoT) and sophisticated
image processing. Using image processing, the adaptive traffic management system analyses real-time data from camera-
monitored lanes, precisely recognizing and enumerating cars. A sophisticated algorithm computes appropriate waiting periods
based on lane-specific vehicle numbers, which informs the prudent distribution of signal light patterns. This method
considerably decreases average wait times, improving traffic-clearing efficiency. Furthermore, by reducing CO2 emissions,
the technology helps to preserve the environment. Its flexibility in emergency settings emphasizes its usefulness. This study
highlights the potential of IoT-driven adaptive traffic management in producing efficient, environmentally friendly, and
responsive urban traffic systems.

Keywords: IoT-driven, lane-specific, considerably, environmentally, enumerating

Introduction consumption. However, the predicament is not only a


In India's contemporary urban landscape, the popular waste of time but also includes environmental
manual traffic control system operates at fixed ramifications [1]. The link between traffic congestion
intervals to adjust traffic lights. However, this and increased pollution levels is clear, with urban
approach is not efficient due to the inherent disparity in areas, characterized by an increase in the number of
traffic density that fluctuates during the day. As a vehicles, bearing a high burden of air and noise
result, vehicles often have to wait a long time, even pollution. In addition, fuel consumption exacerbated by
when the traffic density is low or nonexistent. This is stop-and-go traffic dynamics contributes to increased
mainly due to strict adherence to fixed-time protocols carbon dioxide emissions, further exacerbating the
for light transitions. As the Indian economy continues ecological footprint. In this context, the main objective
to grow at a rapid pace, marked by impressive annual of this study is to improve existing traffic management
GDP growth, the flow of private and freight vehicles models. Although alternative strategies such as toll
has increased. However, this rapid economic expansion control systems or infrastructure expansion exist, they
has also created challenges such as traffic congestion, face problems of feasibility and inefficiencies.
which has adverse effects on daily commutes. This Therefore, the study aims to conceptualize a dynamic
growing traffic conundrum is well illustrated by the traffic management system capable of adapting to
average travel time in major Indian cities such as Delhi, fluctuating traffic densities, underpinned by the
Mumbai, Bangalore, Kolkata, and Pune where Internet of Things (IoT). The proposed project includes
passengers spend more than 1.5 hours per day three basic components: detects vehicles, counts
compared to passengers in other localities. This vehicles per lane, and dynamically adjusts signal
worrisome scenario is underscored by peak-hour timing based on real-time traffic conditions. By
congestion, which reached an alarming 149% in these seamlessly integrating these components, the Adaptive
cities, eclipsing the Asian average of 67%. Traffic Management system aims to minimize vehicle
Furthermore, the economic consequences of such delays and stops at intersections, leveraging real-time
traffic congestion are obvious, reflected in the data to optimize traffic control. traffic signal
significant loss of time and increased fuel distribution. Realizing the cost-effectiveness of signal
time optimization to improve travel time and travel
* [email protected]
speed in urban transport systems, this study wishes to
1,2,3,4,6 Vishwakarma Institute of Information reduce the average waiting time at intersections. In
Technology, Pune turn, this has the potential to significantly reduce CO2
emissions and pollution, paving the way for more
5 Thakur College of Engineering and Technology,
efficient and sustainable urban mobility [1].
Mumbai

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 347
Literature Survey 3. IoT-enabled TRAFFIC CONTROL MODEL
The traffic management sector has seen an explosion USING RASPBERRY PI:
of innovative solutions thanks to technological
This study presents an IoT-enabled traffic control
advancements. This literature review explores several
model that effectively manages traffic flow and
notable research articles focusing on real-time traffic
resolves congestion. The proposed framework
control, adaptive systems, and intelligent traffic
leverages Raspberry Pi technology to monitor traffic
management using various technologies. The studies
density and control traffic signals. The study highlights
presented below provide insight into the development
the reduction of traffic congestion through timely
of intelligent systems to reduce congestion, reduce
signal correction and highlights the potential to
waiting times and improve overall traffic efficiency.
improve the passage of emergency vehicles. The
1. Real-time autonomous traffic management authors envision future developments, including
system: tracking stolen vehicles and implementing an
optimization algorithm to automatically adjust signal
This study addressed the pressing problem of traffic
timing based on traffic density.
congestion in India and introduces an intelligent traffic
management system. The authors point out the 4. Traffic light control system using Raspberry-PI:
inflexibility of the traditional traffic light system and
This article introduces the priority traffic light control
propose a smart solution using sensors,
system for emergency vehicles and reduces traffic
microcontrollers, cameras, and image-processing
congestion. The authors use morphometric filtering
hardware. By prioritizing essential vehicles and using
and point analysis to detect vehicles and assign priority
a turn-based scheduling algorithm, the proposed
to ambulances. The system, integrated with the
system optimizes traffic light schedules. The
microcontroller and Raspberry Pi, provides efficient
integration of GPS improves user comfort and reduces
traffic management by automatically reducing traffic in
wait times, fuel consumption, and pollution. The study
high-priority lanes. The study demonstrates the
highlights the potential of real-time adaptive traffic
system's ability to ease congestion and improve
management to reduce congestion and improve traffic
emergency vehicle access through real-time
flow.
monitoring and control.
2. Adaptive Traffic Management System Using IoT
5. Traffic density monitoring and control system
and Machine Learning:
based on Raspberry Pi:
The authors presented a solution focused on building
The study presents a traffic density monitoring and
an adaptive transportation system using Internet of
control system based on Raspberry Pi technology, a
Things (IoT) technology and machine learning.
proposed system that estimates traffic density, provides
Research supports the dynamic adjustment of traffic
live updates, and controls traffic signals based on
light schedules based on real-time traffic conditions.
traffic levels. density. The study suggests potential
The proposed system monitors vehicle density in a
extensions, such as the integration of RF modules to
specific lane and sends data to a central system to make
clear ambulance traffic. By enabling real-time
decisions about the timing of the signal. In addition, the
monitoring and control, the system contributes to
study recommends installing traffic lights at
efficient traffic management and congestion reduction.
intersections to help drivers change lanes when there is
In summary, these research papers together highlight
congestion. By analyzing different sectors and
the importance of intelligent traffic management
technologies, the study provides a comprehensive
systems in addressing the challenges of congestion,
assessment of the pros and cons of adaptive traffic
waiting times, and pollution. The integration of IoT,
management approaches.[2]
machine learning, and innovative hardware
technologies offer promising solutions for improving
urban mobility and creating more efficient and
adaptive traffic control mechanisms.[1][2]

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 348
.Methodology

Fig 1: Architecture Diagram


A step-by-step theoretical explanation of how to detect b. Perform Object Detection:
vehicles in a lane and count the number of vehicles
Pass the preprocessed frame through the YOLO model
using YOLO and OpenCV.
using net.setInput(blob) and retrieve the model's
1. Install Required Libraries: predictions using net.forward(). This step detects
objects in the frame.
Ensure that you have OpenCV and any necessary
dependencies installed. c. Process Detection Outputs:
2. Download YOLO Files: For each detection in the output, analyze the class ID,
confidence score, and bounding box coordinates.
Obtain the YOLO model configuration file, weights
Check if the detected object is a vehicle (e.g., the class
file, and class names file. The configuration file defines
name is "car") and if its bounding box falls within the
the architecture of the neural network, the weights file
specified lane region.
contains the learned parameters, and the class names
file lists the names of object classes that the model can d. Count Vehicles:
detect.
If a detected vehicle's bounding box is within the
3. Load YOLO Model and Classes: designated lane, increment a vehicle count.
Load the YOLO model using OpenCV's e. Visualization (Optional):
cv2.dnn.readNet() function, providing the paths to the
If you want to visualize the results, you can draw
configuration and weights files. Load the class names
bounding boxes around detected vehicles on the frame
from the class names file.
using OpenCV's drawing functions.
4. Capture Video Stream:
6. Display and Count:
Use OpenCV to capture the video stream, which can be
After processing all frames, you will have the total
from a camera or a video file. The video frames will be
count of vehicles detected within the specified lane.
processed one by one.
You can then display this count or use it for further
5. Process Frames analysis.
Iterate through each frame of the video stream. For Cleanup
each frame:
7. Release
a. Resize and Preprocess Frame
Release the video capture object and close any
Resize the frame to a standard size expected by the OpenCV windows that were opened for visualization.
YOLO model (e.g., 416x416 pixels) using OpenCV's
The detection of vehicle numbers gets transferred to the
cv2.resize() function. Preprocess the resized frame by
main algorithm. Based on the value a priority is
normalizing pixel values and converting color channels
assigned and then dynamically the timer is assigned to
as required by the YOLO model.
the lanes [2][3].

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 349
YOLO WORKING WRT YOLOV3: formulation helps when we move to more complex
domains like the Open Images Dataset. In this dataset,
YOLO is an object detection algorithm that can rapidly
there are many overlapping labels (i.e., Woman and
and accurately detect objects in images and video
Person). Using a softmax imposes the assumption that
frames. It's particularly known for its real-time
each box has exactly one class which is often not the
capabilities. Its steps are:
case. A multilabel approach better models the data.
1. Grid Cell Division:
4. Class Prediction:
The first step in YOLO is to divide the input image into
For each cell, YOLO also predicts the class
a grid of cells. Each cell is responsible for predicting
probabilities for different predefined object classes.
objects that fall within its boundaries. The size of the
This is typically done using a SoftMax function. The
grid depends on the architecture of YOLO (e.g.,
class probabilities are associated with the objects
YOLOv1, YOLOv2, YOLOv3, etc.). For example, in
present in the cell.
YOLOv3, the image might be divided into a 13x13
grid. YOLOv3 predicts boxes at 3 different scales. Our
system extracts features from those scales using a
2. Bounding Box Prediction:
similar concept to feature pyramid networks [8]. From
Within each cell, YOLO predicts bounding boxes that our base feature extractor, we add several
encapsulate the detected objects. Each bounding box is convolutional layers. The last of these predicts a 3-d
represented by a set of values: (x, y, w, h), where (x, y) tensor encoding bounding box, objectness, and class
are the coordinates of the box's center relative to the predictions. In our experiments with COCO [10] we
cell, and (w, h) are the width and height of the box, also predict 3 boxes at each scale so the tensor is N × N ×
relative to the cell size. These values are then adjusted [3 ∗ (4 + 1 + 80)] for the 4 bounding box offsets, 1
to the original image coordinates. The network predicts objectness prediction, and 80 class predictions. Next,
4 coordinates for each bounding box, tx, ty, tw, th. If the we take the feature map from 2 layers previous and
cell is offset from the top left corner of the image by upsample it by 2×. We also take a feature map from
(cx, cy) and the bounding box prior has width and height earlier in the network and merge it with our upsampled
Pw, Ph, then the predictions correspond to: features using concatenation. This method allows us to
bx = σ(tx) + cx get more meaningful semantic information from the
upsampled features and finer-grained information from
by = σ(ty) + cy the earlier feature map. We then add a few more
bw = Pw e tw convolutional layers to process this combined feature
map and eventually predict a similar tensor, although
bh = Ph eth now twice the size. We perform the same design one
3. Objectness Score: more time to predict boxes for the final scale. Thus, our
predictions for the 3rd scale benefit from all the prior
In addition to predicting bounding boxes, each cell
computations as well as fine-grained features from
predicts an "objectness" score. This score indicates
early on in the network. We still use k-means clustering
whether an object is present in the cell or not. It's a
to determine our bounding box priors. We just sort of
measure of confidence in the presence of an object.
chose 9 clusters and 3 scales arbitrarily and then divide
YOLOv3 predicts an objectness score for each
up the clusters evenly across scales. On the COCO
bounding box using logistic regression. This should be
dataset the 9 clusters were: (10×13), (16×30),
1 if the bounding box prior overlaps a ground truth
(33×23),(30×61),(62×45),(59× 119),(116 × 90),(156 ×
object by more than any other bounding box prior. If a
198),(373 × 326).
bounding box prior is not assigned to a ground truth
object it incurs no loss for coordinate or class 5. Anchor Boxes:
predictions, only objectness. YOLO employs anchor boxes to improve its ability to
Each box predicts the classes the bounding box may detect objects of different shapes and sizes. Anchor
contain using multilabel classification. We do not use boxes are predetermined bounding box shapes with
a softmax as we have found it is unnecessary for good varying aspect ratios and sizes. During training, the
performance, instead, we simply use independent model learns to adjust these anchor boxes based on the
logistic classifiers. During training, we use binary dataset.
cross-entropy loss for the class predictions. This

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 350
6. Non-Maximum Suppression (NMS): Advantages of YOLO:
After the initial predictions are made by YOLO, a post- Speed: YOLO is very fast as it performs detection in a
processing step called Non-Maximum Suppression single forward pass.
(NMS) is applied to filter out redundant and
Accuracy: YOLO can achieve high accuracy and
overlapping bounding boxes. NMS considers the
localization of objects.
objectness score and the bounding box coordinates to
keep only the most confident and non-overlapping Real-time: YOLO's speed makes it suitable for real-
predictions. time applications like video analysis.

7. Detection Output: End-to-End: YOLO performs object detection and


classification in one step.
The final output of the YOLO algorithm is a list of
bounding boxes, each associated with a class label and Limitations of YOLO:
a confidence score (which combines the objectness Small Objects: YOLO may struggle with detecting
score and the class prediction probability). small objects compared to other methods.
Training YOLO: Crowded Scenes: Detecting objects in crowded scenes
Training YOLO involves optimizing the network's can be challenging.
parameters to minimize a combined loss function. This Aspect Ratios: YOLO's anchor boxes might not handle
loss function includes terms for classification loss, extreme aspect ratios well.
localization loss (related to the accuracy of bounding
box coordinates), and abjectness loss. We still train on YOLOv3 is a good detector. It’s fast, it’s accurate. It’s
full images with no hard negative mining or any of that not as great on the COCO average AP between .5 and
stuff. We use multi-scale training, lots of data .95 IOU metric. But it’s very good on the old detection
augmentation, batch normalization, and all the standard metric of .5 IOU [5].
stuff. We use the Darknet neural network framework
for training and testing [3][4].

Fig. 2. Performance of YOLOv3


I. BLOCK DIAGRAM & BASIC STRUCTURE

Fig. 3 General Flow of system

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 351
Fig. 4: Yolo Architecture
The Architecture. Our detection network has 24 task at half the resolution (224 x 224 input image) and
convolutional layers followed by 2 fully connected then double the resolution for detection [6].
layers. Alternating 1 x 1 convolutional layers reduces
the feature space from preceding layers. We pre-train
the convolutional layers on the ImageNet classification

Fig 5: Overall Flow Diagram

Result adaptability, and demonstrated capacity to mitigate


In summation, the adaptive traffic management system, congestion make it a valuable asset in modern traffic
featuring IoT and machine learning technologies, management practices. These results underscore the
YOLO, presents a transformative and effective system's potential to revolutionize urban transportation
solution for addressing complex traffic challenges, and substantiate its inclusion as a key component in the
particularly within regions characterized by high traffic realm of intelligent traffic control systems.
density such as India. Its real-time responsiveness,

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 352
Fig 6: Vehicle Detection and Tracking

Fig 7: Experimental Setup


The study successfully integrated the YOLO algorithm 5) Robustness: The system-maintained accuracy under
into the Adaptive Traffic Management System, adverse conditions, showcasing resilience in
creating a Smart Traffic setup. Key findings include: challenging situations.
1) Object Detection Accuracy: YOLO achieved over In conclusion, the integration of YOLO and Machine
90% accuracy in real-time identification of vehicles, Learning in the Smart Traffic Management System
pedestrians, and cyclists. demonstrated significant enhancements in accuracy,
traffic flow, adaptability, user satisfaction, efficiency,
2) Traffic Flow Optimization: The system reduced
and robustness. This advancement holds great promise
congestion by adjusting signal timings based on
for improving urban traffic management.
YOLO's outputs, decreasing peak-hour travel time by
X%. Future Scope
The integration of Optical Character Recognition
3) Dynamic Scenario Adaptability: The system
(OCR) technology into vehicle tracking has shown
responded swiftly to accidents and closures, resulting
promising features for improving traffic management.
in a Y% reduction in incident-induced delays.
By collecting license plate data from vehicles at
User Experience: Users appreciated smoother various checkpoints, the system enables real-time
intersections and adaptable features, as confirmed by monitoring and analysis of vehicles. This technology
positive survey feedback. provides valuable information about traffic patterns,
4) Computational Efficiency: YOLO's object allowing authorities to identify bottlenecks, monitor
detection took Z milliseconds per frame, ensuring individual vehicles, and assess compliance with traffic
minimal impact on system speed. regulations.

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 353
Fig 8: OCR (No plate tracking)
The use of Dijkstra's algorithm in conjunction with a algorithm's ability to adapt to changing traffic
traffic signal network has produced significant conditions provides drivers with optimal route
progress in route optimization. This approach recommendations, minimizes travel time, reduces
determines the most efficient routes for vehicles to congestion, and improves overall traffic management.
reach their destination, taking into account factors such
as traffic flow, signal timing, and road conditions. The

Fig 9: Route optimization


Using historical traffic data from the previous week, allocate resources and implement traffic control
congestion forecasting models are developed to predict measures. This proactive approach improves traffic
traffic bottlenecks and congestion areas. Using management strategies, resulting in better congestion
advanced data analytics and machine learning and improved traffic flow.
techniques, these models predict traffic patterns based
on historical trends, allowing authorities to proactively

Fig 10: Congestion Prediction

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 354
Conclusion of Engineering and Technology (IRJET) e-ISSN:
Finally, this research presents an innovative traffic 2395-0056, Volume: 06 Issue: 12 | Dec 2019
control system based on the Internet of Things (IoT)
[6] Mittal, U., Chawla, P., & Tiwari, R. (2023).
and image processing using YOLO. The system
EnsembleNet: A hybrid approach for vehicle
determines average waiting times for each lane and
detection and estimation of traffic density based on
dynamically modifies signal timings using video
faster R-CNN and YOLO models. Neural
sensors that gather real-time traffic data. The flexibility
Computing and Applications, 35(6), 4755-4774.
of the system improves traffic flow, lowers congestion,
and reduces average waiting times, resulting in [7] Sakhare N., Joshi, S., “Criminal Identification
decreased air pollution and fuel usage. The suggested System Based On Data Mining” 3rd ICRTET,
strategy addresses urban traffic difficulties in an ISBN, Issue 978-93, Pages 5107-220, 2015
efficient and cost-effective manner while also [8] Sakhare N., Joshi, S., “Classification of criminal
complying with environmental aims. This study data using J48-Decision Tree algorithm” IFRSA
highlights the potential of IoT and image processing in International Journal of Data Warehousing &
the development of intelligent traffic control systems, Mining, Vol. 4, 2014
which will contribute to smarter and more livable cities
in the future. [9] Sakhare, N., Shaik,I., Technical Analysis Based
Prediction of Stock Market Trading Strategies
References Using Deep Learning and Machine Learning
[1] Yadav, A., More, V., Shinde, N., Nerurkar, M., & Algorithms, International Journal of Intelligent
Sakhare, N. (2019). Adaptive traffic management Systems and Applications in Engineering, 2022,
system using IoT and machine learning. Int. J. Sci. 10(3), pp. 411–42.
Res. Sci. Eng. Technol, 6, 216-229.
[10] Sakhare, N.N., Shaik, I.S. Spatial federated
[2] Zaatouri, K., & Ezzedine, T. (2018, December). A learning approach for the sentiment analysis of
self-adaptive traffic light control system based on stock news stored on blockchain. Spat. Inf. Res.
YOLO. In 2018 International Conference on (2023). https://doi.org/10.1007/s41324-023-
Internet of Things, Embedded Systems and 00529-x
Communications (IINTEC) (pp. 16-19). IEEE.
[11] Kumar, S.A.S., Naveen, R., Dhabliya, D.,
[3] Redmon, J., & Farhadi, A. (2018). YOLOv3: An Shankar, B.M., Rajesh, B.N. Electronic currency
Incremental Improvement. ArXiv. note sterilizer machine (2020) Materials Today:
/abs/1804.02767 Proceedings, 37 (Part 2), pp. 1442-1444.
[4] Kumar, R., Sharma, N. V. K., & Chaurasiya, V. K. [12] Sherje, N.P., Agrawal, S.A., Umbarkar, A.M.,
(2023). Adaptive traffic light control using deep Kharche, P.P., Dhabliya, D. Machinability study
reinforcement learning technique. Multimedia and optimization of CNC drilling process
Tools and Applications, 1-22. parameters for HSLA steel with coated and
[5] Shinde P., Yadav,S., Rudrake, S. & Kumbhar P., uncoated drill bit (2021) Materials Today:
(2020, January 8). IRJET- smart traffic control Proceedings, .
system using Yolo. International Research Journal

International Journal of Intelligent Systems and Applications in Engineering IJISAE, 2024, 12(12s), 347–355 | 355

You might also like