Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Dr. R. Bhargav Ram, K. Mano Venkat, P. Laxmi Narayana Adithya, M. Sai Kumar
DOI Link: https://doi.org/10.22214/ijraset.2024.63152
Certificate: View Certificate
Urban areas are increasingly grappling with the issue of traffic congestion, a problem exacerbated by growing populations and the proliferation of motor vehicles. This not only leads to delays and increased stress for commuters, but also contributes to greater fuel usage and environmental pollution. This issue is particularly pronounced in large metropolitan areas. The escalating nature of this problem underscores the necessity for real-time assessments of road traffic density, which can lead to more effective traffic management strategies and signal control. The role of the traffic man controller is pivotal in influencing the flow of traffic, necessitating the optimization of traffic management system to cater to this burgeoning demand. Our proposed solution leverages live footage from intersection cameras to estimate traffic density through image processing and AI techniques. The system also incorporates a traffic signal switching algorithm based on vehicle density, aiming to alleviate traffic congestion. This, in turn, facilitates smoother movement for commuters and helps to mitigate pollution.
I. INTRODUCTION
With the increasing no of vehicles on the roads, urban areas are facing challenges in maintaining their road network capacity due to rising traffic volume and service demands. A significant factor contributing to these traffic issues is the use of fixed-timer traffic lights at intersections, which operate on a repetitive sequence without adjusting to real-time traffic conditions. This growing demand for road capacity calls for innovative solutions in traffic control, particularly in the domain of intelligent traffic systems. For example, cities like Mumbai and Bangalore are grappling with severe traffic problems, with Bangalore ranked as having the worst traffic globally and Mumbai closely following in fourth place. In Bangalore, rush hour journeys are 71% longer than average, while in Mumbai, they are 65% longer.
Traditionally, traffic control has relied on three main methods:
Despite their widespread use, these traditional methods have limitations, highlighting the need for more efficient traffic control systems. Modern solutions integrate video surveillance systems, which serve multiple purposes such as security and real-time traffic updates. These systems can estimate traffic density and classify vehicles to optimize signal timings, reducing congestion and improving traffic flow. Our proposed solution utilizes computer vision-based traffic signal control, adjusting green light durations based on real-time images from CCTV cameras. By categorizing vehicles and using YOLO for detection, the system minimizes delays, traffic buildup, and pollution, improving overall traffic efficiency.
This approach represents a step towards more adaptive and responsive traffic management, aligning with the evolving needs of urban areas to handle increasing traffic demands effectively.
II. LITERATURE SURVEY
Second reference suggests an innovative traffic light management system incorporating Artificial Neural Networks (ANN) and a fuzzy control system. This solution system utilizes camera images from traffic locations. Initially, the images undergo grayscale transformation and normalization. A sliding window approach is then applied for segmentation to count cars, regardless of their size. The segmented images are processed by the ANN, with the output informing the fuzzy control to set light timers using precise outputs. Results from testing showed an average error of only 2% with a swift processing time of 1.5 seconds.
In a different approach, Reference [3] suggests a traffic light controlled by fuzzy logic system adaptable to varying traffic conditions. This system employs dual fuzzy controllers, each with inputs and outputs tailored for the main and secondary entrances. Simulation using VISSIM and MATLAB showcased improved traffic flow in low-density scenarios.
Reference [4] introduces a traffic congestion mitigation system based on Arduino-UNO. The system captures and processes images using MATLAB, transforming them into threshold images by eliminating certain color components to compute traffic density. However, challenges arise with vehicle overlap and object detection, affecting accuracy.
Reference five proposes a video processing method where live feed undergoes C++ algorithm-based processing before transmission. A comparison between Dynamic coded and hard code methodologies showed a 35% enhancement with the dynamic algorithm.
Now, let's explore various approaches to traffic control:
III. PROPOSED METHODOLOGY
A. Synopsis of the Suggested Concept
Our envisioned traffic regulation system harnesses the power of CCTV cams installed at strategic points within traffic intersections. These cameras act as the eyes of the system, capturing live traffic images at these critical junctions. These images serve as the foundation for our system's intelligent processing capabilities, enabling us to derive valuable insights into traffic density and dynamics. The process begins with sophisticated methods for processing images applied to the captured images. Through this process, we extract and isolate the vehicles available in the scene, utilizing advanced object detection methodologies.
Central to this stage is the utilization of the you only look once (YOLO) algorithm, renowned for its accuracy and efficiency in detecting and categorizing objects within images. Once the automobiles are identified and categorized into classes such as cars, bikes, buses, and trucks, we proceed to compute the density of traffic in individual lanes and overall intersection. This computation considers not only the sheer no of vehicles but also factors in their respective sizes and speeds, providing a comprehensive understanding of traffic conditions. The volume of traffic data, along with other pertinent variables such as historical traffic patterns, time of day, and special events, is then fed into our intelligent signal switching algorithm. This algorithm dynamically adjusts the time duration of the green light for individual lane based on the current traffic situation. Simultaneously, it intelligently manages the red signal timings to ensure smooth and efficient traffic flow throughout the intersection.
To prevent any lane from being unfairly neglected, we have implemented safeguards within the system. Specifically, we have defined maximum and minimum limits for the time of the green signal for each lane, ensuring a balanced and equitable distribution of signal time allocation. To validate the effectiveness of our system and showcase its superiority over traditional static signal systems, we have conducted extensive simulations. These simulations allow us to illustrate how our dynamic signal control approach outperforms static systems in terms of reducing congestion, minimizing wait times, and optimizing overall traffic flow.
B. Module for Detecting Vehicles
Our envisioned system leverages YOLO, a robust vehicle detection tool known for its precision and swift processing capabilities. Specifically trained to discern various vehicle types such as cars, motorcycles, heavy vehicles like buses and trucks, and rickshaws, YOLO operates as a sophisticated convolutional neural network tailored for real-time object detection.
The YOLO algorithm employs a unique approach, applying a single neural network to process the entire image. It segments the image into sections and forecasts bounding boxes and probabilities for each segment, subsequently weighing these predictions to refine accuracy. This method, coupled with non-max suppression techniques to avoid duplicate detections, allows YOLO to generate precise object recognitions and bounding box outputs efficiently. To enhance processing speed, our system integrates YOLO with Darknet, an optimized neural network framework compatible with GPU and CPU computing. Darknet's architecture, featuring 1 × 1 filters for output channel minimization and 3 × 3 filters for feature extraction, complements YOLO's functionalities. We trained our YOLO model using a meticulously curated dataset compiled from Google images, annotated manually using LabelIMG.
During training, we adjusted the configuration parameters, such as the no of neurons and filters, to align with our model's specifications. These adjustments, along with fine-tuning pre-defined weights obtained from the yolo website, optimized our model for vehicle classification across four classes: Car, motorcycles, Trucks, and autorickshaw. Once trained, our model's performance was validated by inputting test images and evaluating its detection accuracy and speed. The model outputs detections in JSON structure, including confidence scores and bounding box coordinates, facilitating easy integration with OpenCV for visual representation.
Fig. 1 showcases the efficiency of model in real-time vehicle detection scenarios. The original images on the left demonstrate our system's ability to accurately detect and classify vehicles, as evidenced by the annotated bounding boxes and labels on the right, illustrating the practical utility of our approach in traffic light management applications.
C. Signal Transition Module
The proposed system incorporates a Signal Transition Algorithm that relies on data from the vehicle detection module to dynamically adjust green signal timings and synchronize red signal timers across the remaining lights. This algorithm operates in a sequential manner, iterating through signals based on their preset timers and utilizing vehicle detection information in JSON structure, where object labels serve as keys and confidence scores with coordinates as values. The algorithm processes this data to determine vehicle counts for each class, enabling the calculation of green signal durations and adjustments to red signal timings for other lights accordingly. Importantly, this algorithm is scalable and can accommodate varying numbers of signals at an junction.
At the algorithm's initiation, default timings are set for the initial signal of the 1st cycle, followed by subsequent timings for all signals in the 1st cycle and subsequent cycles. Concurrently, separate threads manage vehicle detection for every individual direction while the primary thread manages the timer for the present traffic light signal.. As the current green light timer (or the next green signal's red light timer) approaches 5 seconds, detection threads capture snapshots of the upcoming direction, and the resulting data is parsed to set the next green signal's timer. This background processing ensures smooth timer transitions without any delay. When the current signal's green timer reaches 0 , the next signal transitions to green as per the algorithm's calculated duration.
Additionally, the system captures a photograph while the signal is five seconds from turning green again, allowing for a 10-second processing window to count vehicles, determine optimal green light times, and adjust timings for subsequent signals. This optimization considers average vehicle speeds and acceleration rates, aiding in determining the time required for vehicles of every type to move through an intersection. For enhanced traffic management, modifications can be made to average crossing times based on specific area characteristics, such as region, city, or intersection features, by utilizing data from relevant transport authorities.
Notably, the signal sequence follows a cyclical pattern rather than switching based on density, maintaining consistency with existing signal systems and avoiding confusion. Yellow signals are also integrated into the sequence, ensuring alignment with standard signal protocols.
D. Simulation
Our system introduces a tailored simulation crafted using Pygame, aimed at replicating real-world traffic dynamics for comparative analysis between our proposed dynamic system and the existing fixed configuration. This simulation is designed around a four-way intersection featuring four traffic signals, each equipped with timers indicating the transition time between green, yellow, and red phases, along with a vehicle count display.
Various types of vehicles, example like cars, motorcycles, buses, trucks, and rickshaws, are simulated to approach from all directions. Notably, automobiles in the rightmost lane are programmed to potentially turn, adding a realistic element to intersection scenarios. The decision-making process for vehicle turns is randomized during vehicle generation, contributing to the simulation's authenticity. Additionally, a timer tracks the elapsed time since the simulation's initiation, aiding in performance evaluation and monitoring. Fig. 2 provides a glimpse of the simulation's final output, showcasing the intersection dynamics and vehicle movements. Pygame, a comprehensive Python module collection primarily used for game development, forms the backbone of our simulation. Leveraging Pygame's sound and graphic libraries, specifically designed for Python, enhances the simulation's visual and interactive elements. Furthermore, Pygame's compatibility across various platforms and operating systems, coupled with its open-source nature under an LGPL license, ensures accessibility and flexibility in application development.
C. Adapting Green Signal Timing According to Traffic Density
Utilizing information about traffic density, traffic signal controllers can dynamically alter the length of green signals. In situations with heavy traffic, the controller can extend the green signal duration to accommodate the increased flow. Conversely, during periods of low traffic density, reducing the green signal duration optimizes traffic movement and reduces congestion. This flexible adjustment improves traffic efficiency and reduces wait times for drivers.
D. Timing Management of signal with Python
The AI-driven traffic control system utilizes Python for real-time scheduling of traffic signals, offering efficient and data-informed management. Python's adaptability enables dynamic scheduling, allowing the system to optimize signal timings using data inputs, leading to enhanced traffic flow & decreased congestion.
The proposed system employs a dynamic signal duration adjustment mechanism based on real-time traffic density at intersections. This approach optimizes green signal durations for directions with higher traffic volumes, thereby reducing delays, congestion, and idling times. Consequently, there is a notable reduction in fuel consumption and pollution levels. Our simulations indicate a substantial 23% enhancement in vehicle throughput compared to the current system, showcasing significant improvements. By integrating real-world CCTV data for model training, the system\'s performance can be further refined. Notably, the system leverages existing CCTV infrastructure at traffic signals, minimizing implementation costs and hardware requirements. This is advantageous compared to traditional systems like Pressure Mats and Infrared Sensors, which often incur higher maintenance costs due to wear and tear. The proposed system\'s integration with existing CCTV networks in urban areas offers a cost-effective solution for efficient traffic management. A. Future Expansions of the Solution Could Include 1) Accident and Breakdown Detection: Swift and accurate detection of incidents at intersections can mitigate traffic disruptions and improve safety. 2) Emergency Vehicle Prioritization: Adapting signal timings to prioritize emergency vehicles enhances response times during emergencies. 3) Signal Synchronization across Intersections: Coordinated signal timings along routes reduce stops and improve traffic flow. 4) Traffic rule Violation Detection: Using image processing methods, the system could identify red-light runners and lane violators, aiding in enforcement and safety measures. These enhancements collectively contribute to a more intelligent and efficient traffic signal management system, with potential applications in city areas to alleviate congestion and improve overall road safety.
[1] TomTom.com,” tom tom world index”2019. https://www.tomtom.com/engb/trafficindex/ranking/ [2] “traffic light control & violation detection using image processing”, Renjith Soman, IOSRJEN (IOSR Journal of Engineering), vol 08, no 4,2018 [3] ”smart controlling for traffic light time” Y. suhweil , A. A. zaid and M.A. Yaman, AEECT( Applied Electrical Engineering and computing Technologies ) Aqaba, 2017, doi: 10.1109/AEECT.2017.8257768. https://ieeexplore.ieee.org/abstract/document/8257768 [4] \"Improving traffic light control by means of fuzzy logic,\" IEEE 2018 International Symposium ELMAR, 2018, zadar, A.vogel,R. Simic, E, Ivanjko and I. oremovic, pp. 51-56, doi: 10.23919/ELMAR.2018.8534692. https://ieeexplore.ieee.org/abstract/document/8534692 [5] \"Smart Control of Traffic Light System using Image Processing,\" 2017 International Conference on Current Trends in Computer, Electrical, Electronics and Communication, Khushi, 2017, mysore, pp. 99-103, doi: 10.1109/CTCEEC.2017.8454966.IEEE 2017 https://ieeexplore.ieee.org/abstract/document/8454966 [6] \"Smart traffic lights switching & traffic density calculation using video processing\" A. Sharma C. Singla and A. Kanungo, 2014 IEEE Recent Advances in Engineering and Computational Sciences, Chandigarh, 2014, https://ieeexplore.ieee.org/abstract/document/6799542 [7] “Adaptive traffic light timer controller”,IIT Kanpur, nerd magazine, Minocha, Rahil, Subhadeep Chakraborty, Siddharth Srivastava, Raj Kamal. [8] Intelligent traffic management system: a Review ,Saili Shinde, Sheetal Jagtap, vishwakarma Institute Of Technology,2016 IJIRST [9] ‘Overview of yolo Object Detection Algorithm’, Open Data Science,2018 https://medium.com/@ODSC/ overview-of-the-yolo-object-detection-algorithm-7b52a745d3e0 [10] ‘Real-time object detection with yolo, yolov3 and YOLOv2’, 2018. J.HUI https://medium.com/ @jonathan _hui/ real-time-object-detection-with-yolo-yolov2-28b1b93e2088. [11] “Traffic Signal Synchronization”. Available: https://www.cityofirvine.org/signaloperations-maintenance/trafficsignal-synchronization
Copyright © 2024 Dr. R. Bhargav Ram, K. Mano Venkat, P. Laxmi Narayana Adithya, M. Sai Kumar. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET63152
Publish Date : 2024-06-06
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here