Baseline Machine Learning models for the Human Activity Recognition Trondheim (HARTH) dataset, proposed and used in our papers: HARTH: A Human Activity Recognition Dataset for Machine Learning and A Machine Learning Classifier for Detection of Physical Activity Types and Postures During Free-Living.
The folder harth contains the Human Activity Recognition Trondheim Dataset (HARTH). It consists of acceleration data of 22 subjects, which wore two three-axial Axivity AX3 (Axivity Ltd., Newcastle, UK) accelerometers on the thigh and lower back.
- Acceleration signals
- 2 three-axial Axivity AX3 accelerometers
- Attached to: thigh and lower back
Label | Activity | Notes |
---|---|---|
1 | walking | |
2 | running | |
3 | shuffling | standing with leg movement |
4 | stairs (ascending) | |
5 | stairs (descending) | |
6 | standing | |
7 | sitting | |
8 | lying | |
13 | cycling (sit) | |
14 | cycling (stand) | |
130 | cycling (sit, inactive) | cycling (sit) without leg movement |
140 | cycling (stand, inactive) | cycling (stand) without leg movement |
The folder experiments contains all our experiments. It is possible to train a K-Nearest Neighbors, a Support Vector Machine, a Random Forest, an Extreme Gradient Boost, a Convolutional Neural Network, a Bidirectional Long Short-term Memory, and a CNN with multi-resolution blocks.
- Python 3.8.10+
cd experiments
pip install -r requirements.txt
Start a model training using HARTH
cd experiments
./run_training.sh -c <path/to/model/config.yml> -d <path/to/dataset>
# Example: ./run_training.sh -c traditional_machine_learning/params/xgb_50hz/config.yml -d ../harth/
Each model can be configured using the corresponding config.yml file: xgb, svm, rf, knn, cnn, multi_resolution_cnn, lstm
If you use the HARTH dataset for your research, please cite the following papers:
@article{logacjovHARTHHumanActivity2021,
title = {{{HARTH}}: {{A Human Activity Recognition Dataset}} for {{Machine Learning}}},
shorttitle = {{{HARTH}}},
author = {Logacjov, Aleksej and Bach, Kerstin and Kongsvold, Atle and B{\aa}rdstu, Hilde Bremseth and Mork, Paul Jarle},
year = {2021},
month = nov,
journal = {Sensors},
volume = {21},
number = {23},
pages = {7853},
publisher = {{Multidisciplinary Digital Publishing Institute}},
doi = {10.3390/s21237853}
}
@article{bachMachineLearningClassifier2021,
title = {A {{Machine Learning Classifier}} for {{Detection}} of {{Physical Activity Types}} and {{Postures During Free-Living}}},
author = {Bach, Kerstin and Kongsvold, Atle and B{\aa}rdstu, Hilde and Bardal, Ellen Marie and Kj{\ae}rnli, H{\aa}kon S. and Herland, Sverre and Logacjov, Aleksej and Mork, Paul Jarle},
year = {2021},
month = dec,
journal = {Journal for the Measurement of Physical Behaviour},
pages = {1--8},
publisher = {{Human Kinetics}},
doi = {10.1123/jmpb.2021-0015},
}
Our dataset is subject to changes in future releases. Therefore, consider version v1.0 for reproducibility purposes. It contains the dataset and experiments used in our article, HARTH: A Human Activity Recognition Dataset for Machine Learning