Logo Lanfrica

anika-alamgir/Dhaka-Road-AI

Domain:

mobility

Record type:

project
Creator:
ani
Host:
# 🚦 Adaptive Traffic Control System for Dhaka City 🚦 *An end-to-end AI-driven approach to solving urban gridlock using Computer Vision (YOLOv9) and Reinforcement Learning (Deep Q-Networks).* --- ## πŸ›‘ The Problem: Static Timers vs. Dynamic Traffic Traffic gridlock in Dhaka city is a compounding crisis, largely exacerbated by an outdated, static traffic management system. Currently, intersections rely on **fixed-time traffic lights**. A light may stay green for 60 seconds for the North lane, even if that lane is completely empty, while 100 vehicles idle at a red light in the crossing street. This blind, mathematical inefficiency causes: * πŸš— **Cascading Gridlock:** Artificial traffic jams created purely by bad timing rather than actual road capacity. * πŸš‘ **Emergency Delays:** Ambulances and fire trucks are forced to wait in static queues, leading to potentially fatal delays. * πŸ“‰ **Economic Loss:** Millions of working hours and fuel are burned daily due to vehicles idling at empty intersections. --- ## πŸ’‘ The Solution (Project Overview) This project replaces static, blind timers with an intelligent, dynamic agent capable of "seeing" the intersection and optimizing traffic flow mathematically. The system is split into two primary modules: 1. πŸ‘οΈ **The Perception Module (Eyes):** A YOLOv9 Convolutional Neural Network trained to detect and count local vehicles in real-time. 2. 🧠 **The Decision Module (Brain):** A PyTorch-based Deep Q-Network (DQN) that takes vehicle counts as a state vector and calculates the optimal traffic light switches to minimize wait times and prioritize emergency vehicles. --- ## πŸ› οΈ Tech Stack & Libraries * πŸ“· **Computer Vision:** YOLOv9, OpenCV, Bounding Box Mathematics * πŸ€– **Reinforcement Learning:** Deep Q-Networks (DQN), PyTorch, Gymnasium * πŸ’» **Data Processing:** Python, NumPy, Matplotlib, Custom XML Parsing --- ## πŸ”¬ Methodology ### πŸ“Έ Phase 1: Computer Vision (YOLOv9) * πŸ—‚οΈ **Dataset:** Utilized the Dhaka-AI dataset featuring 21 unique …