One AI signal brain
for every chowk.
ChowkPilot decides, every few seconds, which approach of a junction gets green, using only what a roadside camera can count. It was trained on synthetic junctions and two real Hyderabad areas and runs zero-shot on real Hyderabad junctions it has never seen, with Indian mixed traffic, lane-less two-wheelers, left-hand driving and an ambulance green corridor.
Digital twin: same vehicles, two signal brains
Recorded SUMO simulations of the same peak-hour demand (same vehicles, same departure times). Left: a baseline controller. Right: ChowkPilot. Scroll to zoom, drag to pan; both views stay in sync.
Vehicles stopped at the junction approaches
Why this phase? (ChowkPilot)
Benchmark on unseen real junctions
Mean delay per vehicle (lower is better). The real Hyderabad areas were never used for training or model selection.
Robustness: delay reduction vs the standard fixed-time plan
Averaged over the three unseen junctions, 5 seeds each. Longer bar = bigger reduction.
All metrics
Stress-test it
Load recorded runs of the unseen junctions under other conditions: off-peak, heavy demand, a sudden surge (match or event ending) and noisy camera counts. Every run is a real SUMO simulation of the same vehicles under both controllers.
Result of this run
uvicorn app.server:app, see the README).How it works
A learned generalisation of max-pressure control, the classical rule with a proven throughput-optimality guarantee.
Sense like a camera
Only what a roadside camera can measure: vehicles, stopped vehicles, occupancy and waiting time in the last 150 m of each lane, arrivals in the last 50 m, seconds since a vehicle last crossed the stop line, how full the exit roads are, and whether an ambulance is approaching.
Score every phase
Max-pressure scores a phase as Σ(in − out) over the movements it releases. ChowkPilot keeps that sum structure, takes the max-pressure score as a prior and learns a correction with deep reinforcement learning (Double DQN, semi-Markov rewards on true vehicle delay).
Stay safe and fair
A fixed safety layer enforces minimum and maximum green, a 120 s max-red guarantee, yellow and all-red clearance, whatever the policy outputs. An ambulance approaching within 150 m gets a green corridor.
Generalise
Trained on 11 synthetic layouts and 2 real areas with randomised demand, time-of-day profiles and camera noise. Tested on 3 real Hyderabad areas it never saw.
From simulation to a Hyderabad junction
What already fits a real deployment, and the staged pilot we propose. Nothing here is controlled without an operator.
Runs on an edge box
About 0.16 ms per decision on a laptop CPU. No GPU at inference.
Camera counts are enough
With 20% counting error and 10% of vehicles missed, delay still fell 54% vs fixed-time.
Safety stays outside the network
Min/max green, max red and clearance are enforced separately. If the cameras fail, the junction reverts to its fixed plan.
- 1
Calibrated twin
One corridor from OpenStreetMap plus a site survey, with demand from real counts. Re-run this benchmark on it (2–4 weeks).
- 2
Shadow mode
Reads live counts and logs what it would do next to what the signal did. Engineers review the explanations (about 4 weeks).
- 3
Supervised pilot
3–5 junctions, for example the Secunderabad corridor modelled here. An operator can switch back to the fixed plan at any time.
- 4
Scale by corridor
Add each new area's twin to training. Still to build: camera counting, pedestrian phases, the controller interface and approvals.