This repo is the official implementation for An Unsupervised User Adaptation Model for Multiple Wearable Sensors Based Human Activity Recognition
- Python 3.6.12
- PyTorch 1.2.0
- math, sklearn, tensorboardX
- PAMAP2: https://archive.ics.uci.edu/ml/datasets/PAMAP2+Physical+Activity+Monitoring
- OPPORTUNITY: https://archive.ics.uci.edu/ml/datasets/OPPORTUNITY+Activity+Recognition
Put downloaded data into the following directory structure
- data/
- pamap/
- Protocol/
... # raw data of PAMAP2(e.g,subject101.dat)
- opp/
- OpportunityUCIDataset/
- dataset/
... # raw data of OPPORTUNITY(e.g,S1-ADL1.dat)
- Generate PAMAP2 dataset
cd data
# pre-precess for PAMAP2
python pre_process.py --dataset pamap
- Generate OPPORTUNITY dataset
cd data
# pre-precess for OPPORTUNITY
python pre_process.py --dataset opp
- Change the config depending on what you want
cd ..
# run on the PAMAP2
python main.py --dataset pamap
# run on the OPPORTUNITY
python main.py --dataset opp
# change the learning rate
python main.py --lr 0.0001
# change the batch size
python main.py --batch_size 64
This repo is based on MCD_DA. Great thanks to the original authors for their work!
Please cite this work if you find it useful.
If you have any question, feel free to contact: shmiao@zju.edu.cn