Researchers have built an AI system that watches for signs a driver is getting dangerously tired — and, crucially, can explain why it thinks so.
Falling asleep or just zoning out at the wheel for a few seconds is enough to cause a serious crash, especially on long highway drives. The trouble with most existing drowsiness detectors is that they're finicky: they falter in bad lighting, when the camera angle shifts, or simply because every driver's face is different.
The new system, described in a paper in Scientific Reports, tries to address that. It pairs a Vision Transformer with hierarchical Swin Transformer encoding—essentially a way to read facial patterns at multiple scales—to pick up fatigue cues. The team trained and tested it on more than 167,000 labeled facial images pulled from several different datasets, which is part of why they're confident it holds up outside a lab setting.
What sets it apart from typical fatigue-warning systems isn't just the detection itself — it's that the model shows its work. Using explainable AI methods, it can point to the specific facial regions that led to a given prediction, rather than just flashing an alert with no context.
"Our objective was to develop an AI system that is not only accurate but also reliable and understandable," said Md Najmul Gony, one of the study's authors. "By combining efficient deep learning with explainable AI, we aim to create technology that supports drivers and helps prevent accidents before they happen."
It also runs light enough to work on modest hardware, not just in the cloud—meaning it could feasibly sit inside a car's onboard system rather than relying on a remote server, cutting down the delay between detecting fatigue and warning the driver.