Soheil Fallahzadeh

How does a city get an ambulance through when its cameras can fail and its streets are full?

An open research program on seeing traffic, simplifying road networks, and controlling signals, with every result traceable to its data.

Soheil Fallahzadeh, M.Sc. student in computer vision and algorithms, Yazd University.

This work extends my M.Sc. thesis on machine vision, deep learning and fuzzy logic for intersection control toward network-level emergency navigation.

Seeing is the hard part

Every routing or signal decision downstream is only as good as what the camera reports. Most of my work sits at that boundary: measuring what a detector gets wrong, and passing that uncertainty on to the controller instead of hiding it.

Know when the camera is wrong

A reliability score computed without ground truth, from image quality and detector health.

0.938 AUC on held-out synthetic streams

Checked on 12 human-labelled UA-DETRAC clips (sunny, cloudy, rainy, night) with an unmodified YOLOv4-tiny: combined AUC 0.973 on a temporal split, median ECE 0.036 when a clip is held out (worst 0.116). Calibration did not transfer between two pseudo-labelled clips (ECE 0.12 to 0.23), and that is reported.

Reason about what it cannot see

Queue length behind a truck, with an uncertainty range, from an oblique camera.

−2.84 → −0.63 m bias under occlusion

Turn tracks into road events

Flashing-light cue, HMM map matching and heading, delivered as one event a signal controller can act on.

0.974 road matching (nearest-road: 0.900), 1.1 ms per frame

Recover travel times from few cameras

Graph-gated vehicle re-identification and network tomography on sparse cameras.

0.875 association precision (appearance only: 0.558)

Replicated on 10 seeds and a second grid with bootstrap intervals: the gain from graph gating holds, the gain on unobserved edges does not.

Same traffic seed in SUMO without and with preemption
One seed replayed in SUMO: the emergency vehicle waits 47.9 s without preemption and passes in 18.0 s with it.
Leave-one-clip-out results on UA-DETRAC
Reliability monitor on 12 human-labelled UA-DETRAC clips, each held out in turn.
Benefit of earlier detection by demand level
Benefit of earlier detection against demand: small at normal demand, large when the queue is long.

The graph work and the vision work are one program: the network has to be simple enough to reason about, and the sensors feeding it have to be honest about their own limits.

One question, three layers

An emergency vehicle needs three things from a city: eyes that know when they can’t be trusted, a road network simple enough to reason about quickly, and signals that react before a junction locks up. Each layer is its own repository, tested on its own terms.

The eyesThe arteriesThe reflexes

The eyes

Cameras see traffic, but they get fooled by rain, glare and parked trucks. These five repositories measure how much to trust what they report.

Can the camera be trusted right now?

Perception reliability monitor. Scores a camera’s health without ground truth and tells a controller when to fall back to a fixed plan.

0.938 AUC predicting when detection is reliable (image quality alone: 0.873)

Raises the alarm within 3 to 8 seconds when the detector actually fails, and stays quiet when it copes.

Inspect the data
FeaturesAUCCalibration error
Image quality only0.8730.070
Detector health only0.9010.078
Combined0.9380.049

14,901 test frames, 6 disjoint seeds, synthetic scenes.

RepositoryPythonSUMOMIT

How long is the queue behind the truck?

Occlusion-aware queue estimation. Reasons about what a roadside camera cannot see and reports queue length with an uncertainty range.

Bias cut from −2.84 m to −0.63 m under occlusion

Picks the busiest lane correctly more often: 77.7% of the time, up from 71.5%.

Inspect the data
VariantMAE (m)Bias (m)Lane top-1
Count the boxes5.22−1.160.778
Visible chain only4.48−2.840.715
Occlusion-aware4.63−0.630.777

18 scenarios, bootstrap intervals. Overall error is not significantly better; the gain is where occlusion is heavy. Interval coverage is about 0.74 against a nominal 0.95.

RepositoryKalman filterHomographyMIT

Is that an ambulance, and which road is it on?

Emergency-vehicle perception for preemption. Turns camera tracks into one event a signal controller can act on: road edge, distance, arrival time, confidence.

Road matching accuracy 97.4% (nearest-road baseline: 90.0%)

Median 1.1 ms per frame on one CPU core. In simulation, preemption cut ambulance passage from 34.4 s to about 20 s.

Inspect the data
CuesDetection rate (95% CI)False alarms per track
Detector only0.68 [0.58, 0.76]0.0133
Flashing light only0.65 [0.55, 0.74]0.0017
Fused0.77 [0.68, 0.84]0.0017

100 emergency and 600 ordinary tracks. Intervals overlap, so the fusion gain is not established at this sample size. Perception is emulated, not real footage.

RepositoryHMM map matchingMIT

The arteries

A real road network has tens of thousands of segments. A spanner keeps a small subset that still guarantees no trip gets much longer.

What is the smallest network that still works?

Geometric spanners lab. A clean, reproducible baseline for the classical greedy t-spanner.

990 streets reduced to 77, 92.22% pruned, detours capped at 1.4×

Inspect the data
PropertyComplete graphGreedy spanner
Edges (45 points)99077
Stretch1.00at most 1.40
DensityO(n²)O(n)
RepositoryComputational geometryMIT

Can learning build it faster?

Geo-SmartSpanner. A graph neural network predicts which roads to drop, and a repair step restores the guarantee on directed city graphs.

Up to 42.5× faster than greedy on Rome (42,788 nodes)

Held-out cities showed no zero-shot loss in quality.

Inspect the data
CityNodesGreedy (s)Learned (s)Speedup
Manhattan4,5400.7420.1106.74×
Eindhoven7,8811.9480.2069.45×
Paris8,2363.2560.19316.89×
Rome42,78846.6261.09742.51×

Mean of 5 seeds, stretch bound 1.5. A small violation rate (0.011%) remains in Eindhoven. The guarantee is per removed edge, not per pair.

RepositoryPyTorchOpenStreetMapMIT

Does the shortcut still hold at rush hour?

Delay-bounded spanner networks. One road backbone certified to keep travel-time detours bounded at every hour of the day.

A proof that local checks give an all-pairs, all-24-hours guarantee

Tested on 12 cities across six countries, with an independent verifier that is itself tested against planted errors.

Inspect the data
EvidenceWhere
Theorem 1 and algorithmREADME, sections 1 and 2
Eight independent result checksverify_results.py
Raw per-pair dilationresults/per_pair_dilation.csv

Congestion is a parametric model, not fitted to telemetry. The 12-city result supports a directional, not definitive, claim.

RepositoryCertifiedCIMIT

The reflexes

At the junction, a controller has seconds to decide. It must move traffic without blocking the intersection itself.

How do you keep a junction from locking up?

Anti-gridlock signal control. Max-pressure control with a fuzzy throttle that backs off when the road ahead is filling.

Ambulance delay 143.3 s to 125.0 s with preemption (p = 0.049)

Under chronic overload, 342.6 s average delay against 380.3 s for plain max-pressure, and about 10% less CO₂.

Inspect the data
Policy, chronic overloadDelay (s)Throughput
Fixed time (Webster)306.21374
Vanilla max-pressure380.31374
Fuzzy anti-spillback342.61373

10 paired seeds, Holm–Bonferroni corrected. When the bottleneck is loose, the controller is worse than both baselines. A silent unit-scaling bug found mid-project is disclosed in full in the repository.

RepositorySUMOFuzzy controlMIT

The layers are designed to meet at a single intersection. How they compose is the next study.

Where the data said no

A result that fails is still a result. These are reported in the repositories, not buried.

Knowing the camera failed did not help the signals.

The monitor detects failures reliably, but in simulation the controller stayed within 0.3 s of the oracle anyway.

perception-reliability-monitor
Earlier detection of the ambulance did not buy more time on a moderate queue.

The benefit was flat from 30 m to 150 m at normal demand. It grows once demand doubles.

ev-perception-for-preemption
The learned spanner stopped pruning at Tokyo scale.

On 437,623 nodes it stayed correct but removed only 0.09% of edges.

Research_Geometric_ML_Optimization
The fuzzy controller loses when there is nothing to guard against.

At loose bottlenecks it is slower than both baselines. The cost shifts congestion to the arterial, it doesn’t remove it.

anti-gridlock-signal-control

Open questions

The nine repositories each answer a narrow question. These are the questions they leave open, and where I want to go next.

Can a controller use the camera’s confidence, not just its count?

Reliability and queue-uncertainty scores already exist as outputs. No controller consumes them yet.

Does a certified backbone survive noisy travel times?

The certificate assumes known edge costs. Real costs are estimated, and the estimates can be wrong.

Can local preemption compose into a corridor?

Preemption is tested on one approach and one signal. A corridor needs many intersections to agree.

Check it yourself

All nine repositories are MIT-licensed. The perception and control repositories use fixed seeds, no external datasets, and list the exact commands to regenerate every table. Most carry a claims-and-evidence table that marks each claim as supported, partial or not supported.

Questions, critiques and collaboration are welcome.