Development of a Generalizable Exercise Monitoring System using Kinect Data for Binary Classification of Performance
- Note: If you don't want to generate the dataset files again, proceed to step 4
- Clone the repo
- Run all cells in the UI-PRMD20pre-processing.ipynb notebook to generate the preprocessed
.npyfiles of 3D skeletal data - Navigate to the
datasetsfolder and run2class-all/generate_splits.ipynband80-20-split/generate_splits/ipynb. This will generate the necessary PKL files for hyperparameter tuning and LOSO validation. - Open Anaconda Prompt and run the following commands to set up an environment for this project:
conda create --name mmactionenv python=3.8 -y conda activate openmmlab conda install pytorch torchvision -c pytorch pip install -U openmim mim install mmengine mim install mmcv==2.1.0 mim install mmdet==3.2.0 mim install mmpose pip install mmaction2 - Navigate to the
mmaction2directory and replace the tools/train.py file with thetrain.pyfile provided in theTesting_Codedirectory. This file has modified the code to run hyperparameter tuning and LOSO validation. - If you are doing hyperparameter tuning please uncomment the call for
hyperparam_grid_search(cfg)and comment out the code below it. If you are doing LOSO validation please leave the file as is. - Whether you are doing hyperparameter tuning or LOSO validation, the command to train and validate the model is the same. Navigate to the
Testing_Codedirectory and run:python ../mmaction2/tools/train.py stgcn_custom_exercise.py --seed 0 --deterministic - You will find the results from the process under its respective folders in the
Testing_Codedirectory. To examine the results per split for LOSO, please navigate toTesting_Code\loso_2class_all\loso_split_s10.pkl_lr_0.001_bs_16_repeat_3\loso_results.txtwhere the metrics will be listed for each split.