Skip to content

s1mhadri/Human-Activity-Recognition

Repository files navigation

Human Acitivity Recognition

How to run the code

Before running the script, make sure the requirements are met by installing from requirements.txt using
pip install -r requirements.txt

  1. Configure the config.gin file in /configs

  2. Use one of the following commands to perform training/evaluation/visualization. Make sure training is performed before evaluation or visualization. The experiment name which is used for training should be used for evaluation and visualization.

Note: Information on using checkpoints for evaluation and visualization can be found in the config file.

Train

python main.py --train True --dir_name "Experiment-name"

Evaluate

python main.py --eval True --dir_name "Experiment-name"

Visualize (Only for Diabetic Retinopathy)

python main.py --visualize True --dir_name "Experiment-name"

  1. The files related to the experiment can be found under /experiments/Experiment-name/version_0

Directory structure

dl-lab-21w-team11
|-- architecture/
|   |-- base_model.py
|   |-- models.py
|-- configs/
|   |-- config.gin
|-- datasets/
|-- experiments/
|-- input_pipeline/
|   |-- data_loader.py
|-- utils/
|   |-- utils_misc.py
|   |-- utils_params.py
|-- .gitignore
|-- README.md
|-- requirements.txt
|-- har_batch.sh
|-- main.py
|-- train.py
|-- wandb-tune.py

Results

  • Hyperparameter Tuning:

Best Parameters for each model based on hyperparameter tuning

Hyperparameters Simple LSTM Bidirectional LSTM MaxPool LSTM MaxPool Bidirectional LSTM
Batch size 128 64 32 64
Window size 200 256 200 256
Window shift 125 128 125 128
Dropout rate 0.3 0.16 0.3 0.1
Learning rate 0.004 0.003 0.001 0.003
Regularization rate 0.001 0.001 0.00045 0.001
Number of LSTM layers 2 2 3 3
Hidden size 26 60 42 50
Epochs 49 52 25 5
  • Evaluation Accuracy:

    Model Evaluation accuracy
    Simple LSTM 92.7
    Bidirectional LSTM 93.79
    MaxPool LSTM 93.86
    MaxPool Bidirectional LSTM 94.3
  • Confusion Matrix: Maxpool Bidirectional LSTM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors