ViT-DD: Multi-Task Vision Transformer for Semi-Supervised Driver Distraction Detection

Yunsheng Ma, Ziran Wang

Abstract

Distracted driving remains a significant contributor to road fatalities, accounting for thousands of deaths annually. Traditional detection systems often rely on single-task Convolutional Neural Networks (CNNs) that struggle with complex visual cues and lack contextual understanding. This paper introduces ViT-DD, a multi-modal Vision Transformer (ViT) framework that enhances distraction detection by incorporating driver emotion recognition as an auxiliary task. By utilizing a semi-supervised teacher-student approach to generate emotion pseudo-labels for unlabeled datasets, ViT-DD achieves state-of-the-art results, outperforming existing methods by up to 6.5% on benchmark datasets.

Introduction

Distracted driving is a leading cause of traffic fatalities, with over 3,000 deaths reported in the U.S. in 2020 alone. While Advanced Driver-Assistance Systems (ADAS) have been developed to mitigate this risk, many existing solutions fail to accurately identify the underlying cause of distraction or struggle with the nuances of human behavior in a cabin environment.

Most current systems treat distraction detection as a localized image classification problem using CNNs. However, the authors of ViT-DD argue that a driver’s emotional state—such as being happy while talking to a passenger versus being neutral while driving safely—provides a critical "inductive bias" that can significantly improve detection accuracy. The primary challenge in implementing this multi-task approach is that popular distraction datasets lack the necessary emotion labels. ViT-DD addresses this through a novel semi-supervised learning pipeline.

Methodology

Multi-Modal Architecture

Unlike traditional CNN-based approaches, ViT-DD utilizes a pure Transformer-based architecture. The model processes two distinct inputs: a full-frame image of the driver in the cabin and a cropped image of the driver’s face, detected via the RetinaFace algorithm. This dual-input strategy allows the model to capture both global context (e.g., hand positions) and local facial cues.

Overview of the ViT-DD architecture and the pseudo-labeled multi-task learning pipeline.

Multi-Task and Semi-Supervised Learning

The framework features two specialized "heads": one for identifying distraction categories (e.g., texting, drinking, talking) and another for recognizing driver emotions. To overcome the lack of emotion labels in standard distraction datasets, the authors employed a "Teacher-Student" training paradigm:

  1. Teacher Model: A ViT-B model was pre-trained on the AffectNet-7 dataset to become an expert in facial expression recognition (FER).
  2. Pseudo-Labeling: This teacher model generated "pseudo-labels" for the emotions of drivers within the distraction datasets (SFDDD and AUCDD).
  3. Student Model (ViT-DD): The final model was trained to simultaneously predict the ground-truth distraction labels and the teacher-generated emotion labels.

Self-Attention Mechanism

By leveraging the self-attention mechanism of Transformers, ViT-DD can model long-range dependencies across the entire image. This allows the network to understand the relationship between disparate elements, such as the driver's hand and the steering wheel, which is often difficult for the local filters of a CNN to capture effectively.

Experimental Results

Performance Benchmarks

ViT-DD was evaluated on two major benchmarks: the State Farm Distracted Driver Detection (SFDDD) dataset and the American University in Cairo Distracted Driver Dataset (AUCDD). The model set new performance standards:

  • SFDDD (Split-by-Driver): Achieved 92.51% accuracy, representing a 6.5% improvement over the previous state-of-the-art (DD-RCNN).
  • AUCDD: Achieved 93.59% accuracy, outperforming the best existing method (C-SLSTM) by 0.9%.

Ablation Studies and Insights

Ablation tests confirmed the value of the multi-task approach. The version of the model incorporating emotion recognition performed 2.2% to 2.7% better than a standard ViT trained solely on distraction labels. This suggests that emotional cues act as a powerful disambiguator for physically similar postures.

Evolution of attention maps across Transformer layers for various distraction and emotion classes.

Visualization of the attention maps reveals that as the network depth increases, the model successfully shifts its focus from the general cabin environment to specific critical areas, such as a mobile phone or the steering wheel. This hierarchical focus is key to its high accuracy.

Discussion and Conclusion

While ViT-DD demonstrates significant gains, some limitations remain. Certain distractions, such as "reaching behind," do not have consistent emotional signatures, which can occasionally introduce noise into the multi-task learning process. Additionally, camera placement (e.g., passenger-side mounting in SFDDD) can obscure certain actions like "phone left."

Despite these challenges, ViT-DD offers a viable path for real-time automotive safety, running at approximately 15.56 FPS on modern hardware. Future work will explore incorporating additional modalities, such as gaze tracking and head pose estimation, to further refine the model's understanding of driver attention.

Summary updated

BibTeX
@inproceedings{ma2022vit,
  author = {Yunsheng Ma and Ziran Wang},
  title = {{ViT-DD: Multi-Task Vision Transformer for Semi-Supervised Driver Distraction Detection}},
  booktitle = {IV},
  year = {2022},
}
Figure