This project aims to classify climber motions based on sensor data. The script provides functionality to train a model, pretrain a model, or finetune a model using pretraining.
- Python 3.7 or later
- PyTorch
- pandas
- numpy
- Clone the repository
gh repo clone LucVermeer/gru-d
- Navigate to the directory
cd gru-d
- Install the requirements
pip install -r requirements.txt
This script accepts a variety of command line arguments:
--mode
: Specifies whether totrain
,pretrain
,coarse_pretrain
orfinetune
the model (default istrain
)--seed
: The seed for reproducibility (default is42
)--batch_size
: Batch size for training (default is32
)--num_workers
: Number of workers for the DataLoader (default is0
)--data_path
: Path to the preprocessed data (default isgrud/data.csv
)--seq_len
: Sequence length for training (default is10
)--step_size
: Step size for training (default is1
)--model_name
: Name of the pretrained model (default iscoarse_model_42
)--freeze_gru
: Whether to freeze the weights of the GRU layers (default isFalse
)
Run script from the parent directory:
cd ..
To run the script with the default parameters, use:
python -m grud.train
Example:
python -m grud.train --mode=finetune --seed=0 --batch_size=64
Evaluation in experiments.ipynb experiments.ipynb primarily focuses on the evaluation of our model's performance.
Luc Vermeer