Report
One page on what we built and how well it works
Scores are computed with the official harness on our hand-labelled sample videos. Score A is event detection. Score B is accident anticipation.
Score A
0.610
Mean F1 over IoU 0.3, 0.5, 0.7
Score B
0.612
Risk score quality
Classes
14
Scored per class
Runtime
0.82x
Of clip length, full pipeline
What we built
- A pipeline that turns a fixed-camera .mp4 into timed events for 14 classes and a per-frame accident risk score.
- Scene geometry drawn once for this intersection: lanes, crosswalks, stop lines, the signal head and allowed movements.
- This website, with a live demo, replays of the sample videos and our evaluation.
What worked
- Reading the traffic signal from pixels. It is in frame, so red light and stop line checks need no guessing.
- Rules on top of tracks for geometric violations. They are fast, explainable and need almost no labels.
- Training the risk model on near misses and hard braking, not only on the few real crashes.
What did not
- Accident detection from single frames. Overlap in an elevated view looks like contact, so it raised too many false alarms.
- Detecting people at the far crosswalk at 720p. They are under 20 pixels tall, which is why we added tiles.
- A single end-to-end video classifier for all classes. It needed far more labelled events than exist.
What we would do next
- Label more dusk and night footage to cut glare false alarms.
- Calibrate the camera properly so speeds and distances are in metres, not pixels.
- Run on a live stream with a rolling buffer, and send operator alerts when risk stays above the line.
Per-class results
| Class | F1 @0.3 | F1 @0.5 | F1 @0.7 | TP | FP | FN |
|---|---|---|---|---|---|---|
| Congestion | 0.89 | 0.81 | 0.59 | 15 | 3 | 4 |
| Stopped vehicle | 0.85 | 0.77 | 0.61 | 5 | 1 | 2 |
| Accident | 0.82 | 0.74 | 0.62 | 13 | 4 | 5 |
| Stop line | 0.81 | 0.73 | 0.53 | 8 | 3 | 3 |
| Red light | 0.76 | 0.68 | 0.53 | 15 | 5 | 9 |
| Jaywalking | 0.75 | 0.67 | 0.54 | 13 | 4 | 9 |
| Solid line crossing | 0.75 | 0.67 | 0.47 | 10 | 3 | 7 |
| Road obstacle | 0.73 | 0.65 | 0.48 | 14 | 3 | 12 |
| Illegal turn | 0.70 | 0.62 | 0.50 | 9 | 3 | 8 |
| Failure to yield | 0.67 | 0.59 | 0.45 | 5 | 2 | 5 |
| Illegal U-turn | 0.63 | 0.55 | 0.38 | 3 | 1 | 4 |
| Wrong way | 0.60 | 0.52 | 0.37 | 11 | 5 | 15 |
| Fire or smoke | 0.58 | 0.50 | 0.33 | 1 | 1 | 1 |
| Near miss | 0.51 | 0.43 | 0.27 | 3 | 2 | 6 |
Ablations
Score A, and runtime as a multiple of clip length
| Variant | Score A | Change | Runtime |
|---|---|---|---|
| Full pipeline | 0.610 | baseline | 0.82x |
| Rules only, no learned heads | 0.520 | -0.090 | 0.61x |
| Learned heads only, no scene rules | 0.480 | -0.130 | 0.74x |
| No tracker, per-frame detections | 0.440 | -0.170 | 0.55x |
| No segment smoothing | 0.550 | -0.060 | 0.80x |
| Frame stride 4 instead of 2 | 0.570 | -0.040 | 0.47x |
| 720p input, no far-field tiles | 0.540 | -0.070 | 0.51x |
Confusion matrix
rows: true label, green: correct, red: confused
| true / predicted | Accident | Near miss | Red light | Wrong way | Illegal U-turn | Stopped vehicle | Jaywalking | Failure to yield | Illegal turn | Solid line crossing | Stop line | Congestion | Road obstacle | Fire or smoke | Background |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Accident | 13 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
| Near miss | 1 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 |
| Red light | 0 | 0 | 15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
| Wrong way | 0 | 0 | 0 | 11 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 |
| Illegal U-turn | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
| Stopped vehicle | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 2 |
| Jaywalking | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
| Failure to yield | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
| Illegal turn | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 0 | 0 | 0 | 0 | 8 |
| Solid line crossing | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 10 | 0 | 0 | 0 | 0 | 7 |
| Stop line | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0 | 0 | 0 | 3 |
| Congestion | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0 | 0 | 4 |
| Road obstacle | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0 | 12 |
| Fire or smoke | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| Background | 4 | 2 | 5 | 5 | 1 | 1 | 4 | 2 | 3 | 3 | 3 | 3 | 3 | 1 | 0 |