DavideBuffelli / TrASenD

Code for the paper "Attention-Based Deep Learning Framework for Human Activity Recognition with User Adaptation", Buffelli D., Vandin F., IEEE Sensors Journal, 2021.
Other
15 stars 6 forks source link

Attention-Based Deep Learning Framework for Human Activity Recognition with User Adaptation

Reference code for the models presented in the paper:

@ARTICLE{9382331,
  author={Buffelli, Davide and Vandin, Fabio},
  journal={IEEE Sensors Journal}, 
  title={Attention-Based Deep Learning Framework for Human Activity Recognition With User Adaptation}, 
  year={2021},
  volume={21},
  number={12},
  pages={13474-13483},
  doi={10.1109/JSEN.2021.3067690}}

Refer to the paper for a proper presentation of all the models, the preprocessing procedure, details about the datasets, and the training procedure. Please cite the above paper if you use this code in your own work.

Instructions

You can train and cross-validate TrASenD, by first inserting the paths to the preprocessed dataset, and the path where the model directories will be saved in the file test_trasend.py. Then you can run the script with:

python test_trasend.py

Links to datasets, and requirements can be found below.

In the file usage_example.py you'll find a simple example showing how to train, evaluate, and make predictions with the presented models.

Datasets

Scripts to preprocess data can be found in the Data Preprocessing folder.

The original (not preprocessed) datasets can be found at the following links:

Requirements

This code has been developed and tested using TensorFlow 1.10. You can install it on your python environment as follows:

pip install tensorflow==1.10

Additional Material

License

Refer to the file LICENSE