Adaptive Traffic Manager is a real-time traffic control system designed to optimize traffic light durations based on live traffic density at intersections. The system uses the YOLO object detection algorithm to detect vehicles in real-time, allowing for dynamic control of traffic signals, which reduces congestion and improves traffic flow.
- Real-time vehicle detection using YOLO.
- Dynamic traffic light control based on traffic density.
- Configurable green light durations based on detected vehicle counts.
- Integration with traffic signal hardware (e.g., Raspberry Pi, GPIO control).
Traditional traffic management systems operate on fixed timers or manual control, which often leads to inefficient traffic flow, increased waiting times, and higher fuel consumption. This project aims to solve these issues by utilizing real-time vehicle detection to adapt signal timings dynamically, resulting in:
- Reduced waiting times.
- Lower fuel consumption and pollution.
- Decreased accident frequency by optimizing traffic flow.
- YOLO: A powerful object detection model that uses a single forward pass of a convolutional neural network to detect vehicles in real-time. YOLO's efficiency makes it ideal for traffic management applications where real-time processing is essential.
- Clone the repository:
git clone https://github.com/Lalwaniamisha789/Adaptive-Traffic-Manager.git cd AdaptiveTrafficManager
- Install dependencies
pip install -r requirements.txt
- Ensure you have YOLO installed:
git clone https://github.com/ultralytics/yolo.git cd yolo pip install -r requirements.txt
- Start the system with live video feed
python main.py --source <path_to_video_or_camera_feed>
- Adjust the settings in configuration files.
- The camera feed captures videos from intersection
- YOLO detects vehicles in the video feed and counts the number of vehicles in each lane.
- I used the SORT model to ID vehicles crossing a threshold.
- Based on the traffic density, the traffic signal controller adjusts the green light duration for each lane dynamically, optimizing traffic flow and reducing congestion.