This repo is the implementation of the paper for "Uncertainty-aware calibration of neural networks for gesture detection"
To install the repo, use uv in the terminal:
$ uv syncshould be all you need to do.
For in distribution scenarios try the UAC model with uac/script/train_cnn/train_eval_cnn_uncertainty_mix.py.
For out of distribution scenarios use uac/script/train_cnn/train_eval_cnn_uncertainty_subjectwise.py.
The experiments were run on the datasets:
- wisdm
- samosa_dataset
- uschad
The datasets were translated to Samosa format using the scripts in uac/scripts/preprocess_datasets.
- Train random forrest with
uac/baselines/scripts/rf_evaluate.py - Train svm with
uac/baselines/scripts/svm_evaluation.py - Train temperature scaling with
uac/script/train_cnn/train_eval_subjectwise_temp_scaling.pyanduac/script/train_cnn/train_eval_mix_temp_scaling.py - Train EM with
uac/script/train_cnn/train_eval_mix_cnn_mme.py.pyanduac/script/train_cnn/train_eval_mix_cnn_mme.py.py - Train Laplacian by running
train_LA_uncertainty.pyand giving a CNN model as input. The CNN model should be trained withtrain_cnn/train_eval_cnn_mix.py.
We welcome contributions!
The code in this repo is formatted and linted using RUFF. The code should follow the PEP8 and be type annotated.
@misc{haddad2025uacuncertaintyawarecalibrationneural,
title={UAC: Uncertainty-Aware Calibration of Neural Networks for Gesture Detection},
author={Farida Al Haddad and Yuxin Wang and Malcolm Mielle},
year={2025},
eprint={2504.02895},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2504.02895},
}