← Quang Nhat Duong
Guardian Co-Pilot · driver monitoring

Can Guardian see a sleepy driver?

The engine watches eyelids, not pixels: PERCLOS over a rolling ten-second window, the longest unbroken closure, and jaw opening. Here is what it did on 6 labelled drives at 20 fps — 3,600 frames where somebody had already written down what the driver was really doing.

Impairment caught
99.2%
2,083 of 2,100 frames where the driver was drowsy, yawning or micro-sleeping.
False alarms
9.8%
147 of 1,500 clear frames flagged anyway — 6.2% once the 10s PERCLOS window has filled.
Lag after a real change
1.05s
Median time to follow the driver into a new state. The 2.05s majority vote is the floor.

How to read these numbers. This is an in-sample demo on six people, not a population rate: the thresholds were not tuned on held-out drivers, and neighbouring frames at 20 fps are not independent samples. The false-alarm figure is a share of frames, not how often a driver would be warned by mistake per hour — that has not been measured. On 60 drivers it never saw, the drowsiness decision scores a macro-F1 of only about 0.5 (report).

Every drive, frame by frame

The top strip is the truth, the strip under it is what Guardian said, and the ticks above mark where they disagree. The trace underneath is measured eyelid closure; the dashed line is the level above which an eye counts as shut.

alertdistracteddrowsy (impaired)yawning (impaired)microsleep (impaired)

T01-Sample

Eyes open throughout; the driver looks away and then back.

distractedalert
T01-Samplerecall - · false alarms 4% · 30sGround truthdistractedalertGuardiandrowsydistractedalertdisagreementdisagreementEye closure0.4 closed0s5s10s15s20s25s30s

distracted → alert at 15s, followed 1.05s later

T02-Sample

Drowsy for the whole drive - eyes partly closed, head down.

drowsy
T02-Samplerecall 97% · false alarms - · 30sGround truthdrowsyGuardiandrowsyalertdrowsydisagreementEye closure0.4 closed0s5s10s15s20s25s30s

T03-Sample

Yawning for the whole drive, eyes partly closed.

yawning
T03-Samplerecall 100% · false alarms - · 30sGround truthyawningGuardianyawningEye closure0.4 closed0s5s10s15s20s25s30s

T04-Sample

Same pattern as T01, a different person - and the case that breaks.

distractedalert
T04-Samplerecall - · false alarms 14% · 30sGround truthdistractedalertGuardiandrowsydistractedyawningdistractedyawningdistractedalertdistracteddisagreementdisagreementdisagreementdisagreementdisagreementEye closure0.4 closed0s5s10s15s20s25s30s

distracted → alert at 15s, followed 1.05s later

T05-Sample

Micro-sleep: eyes closed, head down, for thirty seconds.

microsleep
T05-Samplerecall 100% · false alarms - · 30sGround truthmicrosleepGuardianmicrosleepEye closure0.4 closed0s5s10s15s20s25s30s

T06-Sample

Starts drowsy, becomes distracted halfway through.

drowsydistracted
T06-Samplerecall 100% · false alarms 14% · 30sGround truthdrowsydistractedGuardiandrowsydistracteddisagreementEye closure0.4 closed0s5s10s15s20s25s30s

drowsy → distracted at 15s, followed 2.10s later

The numbers behind the picture

TripImpairedCaught RecallClearFalse RateComposite
T01-Sample00—600244.0%93.5
T02-Sample60058397.2%00—97.9
T03-Sample600600100.0%00—100.0
T04-Sample00—6008113.5%71.4
T05-Sample600600100.0%00—100.0
T06-Sample300300100.0%3004214.0%93.0

What this run actually shows

Sustained closure is the easy case, and it is the dangerous one

The micro-sleep and yawning drives are called correctly on every single frame. Physiology does the work: eyes shut for more than 1.2 seconds means micro-sleep whether the driver is twenty or sixty, so there is nothing to train and nothing to overfit.

The lag is bought, not accidental

Raw per-frame decisions flicker, so the output is a majority vote over about two seconds. That is exactly why the drowsy → distracted change on T06-Sample takes 2.10 s to appear. Steadier warnings cost response time, and that trade should be visible rather than buried.

T04-Sample is where it breaks

On one driver whose eyes never close, the jaw threshold fires anyway and produces stretches of phantom yawning — 81 false alarms across 600 clear frames, and the lowest composite here at 71.4. A resting mouth posture that reads as an open jaw is a real failure mode, not noise, and a fixed global threshold has no answer to it. This is the case the per-driver learning loop exists for.

Six drivers is six samples

Every number here comes from six people. It is enough to show the thresholds fire on real physiology; it is nowhere near enough to claim they hold for a population. The open-data evaluation in the repository exists to test the same thresholds against strangers, and it is where the weaknesses show up.