Skip to content

This is Deep Learning based Human Activity Recognition Model. The model is trained over WISDM dataset, using the acceleration values over time to classify the activity of the human into 6 categories. The model is further Quantized for the making it compatible for IoT application

License

Notifications You must be signed in to change notification settings

Arshdeep-Singh-01/Human-Activity-Recognition-using-MutliHead-Convolutional-Attention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human-Activity-Recognition-using-MutliHead-Convolutional-Attention

Table of Contents

Introduction

This repository implements a multi-head convolutional attention-based model for human activity recognition. The model employs attention mechanisms to improve recognition accuracy by focusing on informative regions in the input data. Further, the obtained model is Quantized for supporting IoT-based devices.

Installation

  1. Clone the repository:

    git clone https://github.com/Arshdeep-Singh-01/Human-Activity-Recogonition-using-MutliHead-Convolutional-Attention.git
  2. Navigate to the project directory:

    cd Human-Activity-Recogonition-using-MutliHead-Convolutional-Attention
  3. Install the required dependencies:

    pip install -r requirements.txt

Dataset

This task use the WISDM dataset which contains the acceleration values (x,y,z) and the corresponding activity, along with the temporal components Dataset is freely avaliable at WISDM Train Data: 80% Test Data: 20%

Model Architecture

The overview of the model architecture is as follows:

  • 3-Head Convolutional Neural Network
  • Concatination followed by Maxpooling
  • 30-Head Convolutional Attention
  • Fully connected dense layers

Model Architecture

Training

The model was trained over 200 epochs (20+ hours of computation)

  • Optimizer: SGD(lr = 0.001)
  • Loss: Cross Entropy Loss

Quantization

The trained model was then Quantized using Post Training Dynamic Quantization

Model Size (MB)
Original Model 373.094
Quantized Model 0.009

Results:

Activity Accuracy (Original Model) Accuracy (Quantized Model)
Walking 98.06% 97.86%
Jogging 99.82% 98.96%
Upstairs 92.87% 92.57%
Downstairs 98.5% 98.11%
Sitting 95.05% 93.85%
Standing 99.65% 98.97%
Overall 97.33% 96.72%

References

  1. Attention Is All You Need
  2. A Novel IoT-Perceptive Human Activity Recognition (HAR) Approach Using Multihead Convolutional Attention
  3. Post Training Dynamic Quantization

About

This is Deep Learning based Human Activity Recognition Model. The model is trained over WISDM dataset, using the acceleration values over time to classify the activity of the human into 6 categories. The model is further Quantized for the making it compatible for IoT application

Topics

Resources

License

Stars

Watchers

Forks

Languages