Skip to content
RoadGuard AI
Live Demo

Exploratory data analysis

What the footage actually contains

Before any model was built, the clips were measured: who uses this road, when, where they drive, and how the light changes. Each chart below ends with the decision it led to.

4 clips154 tracks

Demo data Every figure on this page is derived from synthetic sample files. The analysis, the charts and the conclusions are real code paths — swap in real exports and the same pages describe the real data.

Road users over time

Detections per class at each sampled second. Motorcycles and bicycles are merged into one series.

What this tells us

Cars dominate throughout, but pedestrian counts move independently of them — the two peaks do not coincide. Pedestrian events therefore cannot be inferred from overall traffic load, which is why the crossing geometry is evaluated separately.

Clip metadata

Busiest of the four clips and the only one containing a collision. Used to sanity-check that risk rises before impact rather than after it.

File
sample_01.mp4
Duration
01:32
Frame rate
25 fps
Resolution
1920 x 1080
Lighting
Daylight
Events
8
Risk samples
185
Tracks exported
52
Footage
Reconstruction only

Traffic density

Total road users in frame, the input to the congestion rule.

What this tells us

Density averages 15.6 road users and peaks at 23 around 25 s. The congestion threshold has to sit above ordinary peaks like this one, or every busy minute would be reported as congestion.

Class distribution

Mean number of each class in frame across the clip.

What this tells us

Cars are the most common class at 7.1 in frame on average. The rarer classes matter more than their share suggests: they are the ones a detector trained on class-imbalanced data will drop first.

Trajectory map

Each line is one tracked road user across the whole clip. Hover a path to see its ID.

52 tracks
What this tells us

The paths collapse onto two carriageway corridors and one pedestrian crossing. That is what the lane-direction rules are calibrated against — a track running against the arrow in its corridor is what wrong-way detection actually tests for.

Motion heatmap

Time spent in each part of the frame, binned from every tracked road user.

LowHigh dwell
What this tells us

62% of all tracked time falls in the busiest tenth of the frame. Concentration that high is what makes a fixed-camera calibration worth doing: the rules only have to be precise where the traffic actually is.

Lane occupancy

Mean share of each lane covered by road users, with the count that passed through.

A1 through
26
A2 through
24
B1 through
17
B2 through
13
What this tells us

Occupancy and throughput disagree by lane: the busiest lane by area is not the one that moves the most traffic. That gap is the signature of slow-moving traffic, and it is what separates congestion from a simply busy lane.

Calibration

From trajectories to a scene model

The corridors visible in the trajectory map are what the geometry below encodes. Everything the rule engine knows about this road is in this one picture.

Camera geometry

Calibrated once for this camera, then reused for every clip it produces.

A1A2B1B2INTERSECTIONCROSSWALKSIGNAL ROI
  • Carriageway

    Anything inside is on the road.

  • Carriageway A — eastbound

    Expected heading: east.

  • Carriageway B — westbound

    Expected heading: west.

  • Solid centre line

    Crossing it is a violation.

  • Stop lines

    Red-light and stop-line tests.

  • Crosswalk

    Pedestrian priority zone.

  • Intersection

    Turn legality is judged here.

  • Signal region

    Where light colour is read.

Lanes

Lane A1
expects east
Lane A2
expects east
Lane B1
expects west
Lane B2
expects west
What this tells us

Because the camera never moves, these polygons are measured once and hold for every clip. That single fact converts several classes from hard vision problems into geometry tests: wrong-way driving becomes a heading compared against a lane vector, and jaywalking becomes a point-in-polygon check.

What each region decides

Every geometric rule names the region it depends on, so a false positive points at a specific polygon.

  • Road polygon

    Jaywalking, stopped vehicle and road obstacle all begin with the question of whether something is on the carriageway at all.

  • Lane polygons and directions

    Wrong-way driving, illegal turn and lane-level congestion. The direction vector per lane is the comparison every heading is tested against.

  • Stop lines

    Red-light running and stop-line violation. Both reduce to a crossing timestamp compared against state at that moment.

  • Crosswalk

    Failure to yield, and the negative half of jaywalking — a pedestrian inside a crossing is not jaywalking.

  • Solid lines

    Solid-line crossing, as a plain intersection test against the trajectory.

  • Intersection box and signal region

    Illegal U-turn and illegal turn, plus the signal colour that red-light detection depends on.

Clips compared

One row per clip. Lighting varies on purpose — it is the condition the detector is most sensitive to.

ClipLightingLengthFPSEventsMean road usersPeak riskTracks
Four-way intersection, middayDaylight01:3225815.693%52
Arterial approach, duskDusk01:5830613.266%46
Night crossingNight01:0425411.06%30
Overcast, clear runOvercast00:4825010.36%26
What this tells us

The night clip carries the fewest tracks at a comparable density, which is the expected signature of a detector losing small, poorly-lit road users rather than of a genuinely quieter road. That is why it is kept in the set.