Traffic Digital Twin
A city-scale traffic digital twin: computer vision, graph neural networks, and reinforcement learning that watch real intersections, predict congestion, and optimize signal timings.
- YOLOv8
- PyTorch Geometric
- Reinforcement learning
- Streamlit
- SQLAlchemy
An exploratory project that builds a digital twin of urban traffic, a live, data-driven model of real intersections you can run experiments on. It’s an end-to-end pipeline, from camera feed to signal recommendation, focused on the Varanasi Lanka corridor (Lanka Chowk → BHU Gate → Assi → Sigra).
The pipeline, four stages
- Vehicle detection. YOLOv8 processes traffic-camera feeds to detect vehicles and measure density; a Kalman tracker stitches detections across frames.
- Traffic graph. Intersections and roads are modeled as a directed graph (NetworkX → PyTorch Geometric).
- Congestion prediction. A custom Spatial-Temporal GCN (STGCN) forecasts flow across the network.
- Signal optimization. A PPO reinforcement-learning agent recommends signal-timing adjustments to reduce congestion.
Everything is persisted through SQLAlchemy and surfaced in a Streamlit + Plotly dashboard. It’s the project where computer vision, graph learning, and control all have to work together, exactly the kind of systems problem I like.