Skip to content
/ DBMNet Public

Code for the paper "Cross-Camera Distracted Driver Classification through Feature Disentanglement and Contrastive Learning"

License

Notifications You must be signed in to change notification settings

CeLuigi/DBMNet

Repository files navigation

Driver Behavior Monitoring Network (DBMNet)

This repository contains the official PyTorch implementation of the method proposed in the paper:

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

The project focuses on robust distracted driver recognition using a multi-view, multi-task learning framework. The proposed approach jointly learns:

  • Driver action classification (22 classes)
  • Camera view classification (3 views)

and leverages triplet-based metric learning to improve generalization across drivers, viewpoints, and illumination conditions (day/night).

image


Requirements

  • Python 3.8+
  • PyTorch 1.10.1
  • torchvision 0.11.2
  • numpy, pandas, scikit-learn, matplotlib
pip install torch==1.10.1 torchvision==0.11.2 numpy pandas scikit-learn matplotlib

Dataset: 100-Driver

Please download the dataset from:

👉 https://100-driver.github.io/


Training

Edit the DATAPATH variable inside the run_train.sh bash script and set it to the absolute path of the root directory of the 100-Driver dataset:

bash run_train.sh

Testing

Pretrained model weights are available at the following GDrive link.

Download the pretrained weights and place them in the following directory:

ckpts/

Each checkpoint file should be named consistently with the dataset split it was trained on (e.g., pic-day-cam123.pth).

Run testing

Edit the DATAPATH variable inside the run_test.sh bash script and set it to the absolute path of the root directory of the 100-Driver dataset:

bash run_test.sh

Reference

If you use this repository in your research or build upon it, please consider citing our work:

@article{celona2026cross,
  author    = {Celona, Luigi and Bianco, Simone and Napoletano, Paolo},
  title     = {Cross-Camera Distracted Driver Classification through Feature Disentanglement and Contrastive Learning},
  journal   = {Under Review},
  year      = {2024}
}

Contact

📧 luigi.celona@unimib.it

About

Code for the paper "Cross-Camera Distracted Driver Classification through Feature Disentanglement and Contrastive Learning"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published