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).
- 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 matplotlibPlease download the dataset from:
👉 https://100-driver.github.io/
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.shPretrained 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).
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.shIf 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}
}