Cross-Camera Distracted Driver Classification through Feature Disentanglement and Contrastive Learning

Luigi Celona, Simone Bianco, Paolo NapoletanoarXiv 2024 · DOI

TL;DR

The authors introduce DBMNet, a lightweight Driver Behavior Monitoring Network designed to maintain high accuracy across different in-vehicle camera positions. By combining a feature disentanglement module with a dual-triplet contrastive learning strategy, DBMNet discards camera-view noise to focus purely on driver actions, achieving a 7% improvement in Top-1 accuracy over existing efficient models and demonstrating seamless deployment on edge hardware like the Coral Dev Board.

What Problem Does This Paper Address?

Automatic Driver Monitoring Systems (DMS) are rapidly shifting from luxury features to mandated safety technologies (e.g., European Union regulations mandating drowsiness and distraction monitoring in new vehicles). However, most existing deep learning models for DMS are trained on data captured from fixed, controlled camera angles.

When these models are deployed in the real world across different car models, varying seat adjustments, and distinct camera placements, their accuracy drops significantly due to domain shift. To make matters worse, automotive embedded systems operate under strict computational and memory constraints, meaning we cannot simply throw massive, power-hungry vision transformers at the problem. The challenge lies in building a model that is both robust to viewpoint changes (cross-camera generalization) and highly resource-efficient.

Methods

The authors propose the Driver Behavior Monitoring Network (DBMNet), which splits the task of understanding what the driver is doing from where the camera is looking.

Fig. 1. The DBMNet pipeline. At inference time (a), the backbone encodes an RGB image into a feature vector f. The feature disentanglement module then refines these features to discard view-related information while retaining action-related details using view queries, Q, together with the probability distribution over the views. The resulting features ˆf are mapped into a driver action by the action classifier. During training (b), alongside the cross-entropy loss for action and view prediction (respectively, Lace and Lvce), we employ the triplet loss (Lac and Lvc). This triplet loss helps to learn distinct action and view representations by processing three input images: an anchor image a, an image sv depicting the same view but different action as a, and an image sa with the same action but from a different view as a.

The architecture consists of three main components:

  1. Lightweight Backbone: A pre-trained GhostNet-v1.0 architecture extracts initial feature vectors ($f$) from input RGB images efficiently.
  2. Feature Disentanglement Module: This module acts as a hyper-network. It utilizes a set of learnable "view queries" ($Q$) and weights them based on the probability distribution of the camera viewpoint ($p_v$) predicted by a dedicated view classifier. This process dynamically filters out viewpoint-dependent features, producing a clean, action-relevant feature vector ($\hat{f}$).
  3. Dual-Triplet Contrastive Learning: To explicitly force the network to separate action from viewpoint during training, the authors employ two opposing triplet losses alongside standard cross-entropy losses:
  4. Action Triplet Loss ($L_{ac}$): Minimizes the distance between identical actions captured from different camera views while maximizing the distance between different actions from the same view.
  5. View Triplet Loss ($L_{vc}$): Pushes the backbone to group features from the same camera view together, ensuring the view classifier remains highly accurate.

Datasets

The model was rigorously evaluated using a leave-one-camera-out protocol across several key benchmarks:

  • 100-Driver Dataset: A large-scale dataset containing 470,000 images of 100 drivers performing 22 distinct actions across day and night conditions, captured simultaneously from 4 different camera angles.
  • AUCDD-V1, EZZ2021, and SFD (State Farm Distracted Driver): Three popular benchmark datasets used for cross-dataset and cross-camera validation to test the model's true out-of-distribution generalization capabilities.

Key Insights and Ideas

  • Cross-Entropy Alone Isn't Enough: Standard classification losses penalize errors but don't explicitly enforce feature space compactness. The dual-triplet loss structure forces the network to structure its embedding space logically based on independent semantic concepts (action vs. view).
  • Visualizing Disentanglement: The impact of the disentanglement module is clearly visible via t-SNE analysis. Before the module, features naturally cluster by camera angle rather than driver behavior. After the module, the features reorganize into large, distinct clusters based purely on the driver's action, regardless of which camera captured the image.
t-SNE visualization of features before (a) and after (b) the feature disentanglement module.

Key Results

  • Accuracy Boost: DBMNet achieved a 7% overall improvement in Top-1 accuracy compared to existing efficient state-of-the-art approaches.
  • Efficiency vs. Performance: While heavy models like Swin Transformers or DGCCL (85.8M parameters) achieve strong results on specific views, DBMNet (4.0M parameters) delivers comparable or superior cross-camera generalization while being over 20x more efficient in FLOPS and 21x smaller in parameter count.
  • Edge Deployment Success: The authors successfully quantized DBMNet to 8-bit fixed-point precision and deployed it on a Coral Dev Board (Edge TPU). In this hardware environment, DBMNet outperformed all deployable alternatives, maintaining a low memory footprint, minimal power consumption, and the lowest average classification error.

Limitations and Future Work

Despite its strong generalization, the authors note that the overall accuracy on highly complex tasks remains modest, particularly because the model occasionally misclassifies "Normal driving" as a form of distraction. Furthermore, while the inference time on the Coral Dev Board is fast ($1.15 \times 10^{-2}$ seconds), it may still be a bottleneck for ultra-low-latency, safety-critical automotive systems.

Future work will focus on exploring even lighter backbones to minimize latency and integrating few-shot learning strategies to calibrate the model quickly when introduced to entirely new vehicle interiors.

Summary updated

BibTeX
@misc{celona2024cross,
  author = {Luigi Celona and Simone Bianco and Paolo Napoletano},
  title = {{Cross-Camera Distracted Driver Classification through Feature Disentanglement and Contrastive Learning}},
  year = {2024},
  eprint = {2411.13181},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.13181},
}
Figure