The detection itself — find the face, track the eyes, measure how long they stay closed — is the part that sounds hard and is largely solved. The hard part is being right often enough, in the conditions a cab actually presents, that the system earns its place. A driver who is warned wrongly a few times learns to ignore or disable the alarm, at which point the system is worse than nothing, so the entire design is governed by the cost of a false alarm as much as by the cost of a miss.
That pushes the whole thing onto the edge, inside the cab. A fatigue alert that depends on a cloud round trip is useless when the vehicle is in a tunnel or a dead zone, and streaming a driver’s face to a server is a privacy problem that operators and regulators will not accept. So inference runs on the device, the video never leaves it, and only events — not footage — reach the fleet. Working in the dark is not optional either: fatigue happens most at night, so the camera sees by infrared and the models have to hold up through darkness, glare, sunglasses and a mask.
Finally, drivers differ. A fixed threshold for “eyes closed too long” will nag one driver and miss another, so the system calibrates a baseline per driver and watches for deviation from it rather than from a global number. Fatigue and distraction are then kept separate, because they need different responses — a rest break versus an immediate re-focus — and treating them as one alarm is how a system loses the driver’s trust.