Git Product home page Git Product logo

encodinghumanactivity's Introduction

Deep ConvLSTM with self-attention for human activity decoding using wearables.

In this git repository we implement the proposed novel architecture for encoding human activity data for body sensors. The proposed model encodes the sensor data in both the spatial domain (whereby it selects important sensors) and the time domain (whereby it selects important time points).

If you're using our code, please cite our paper (available on ArXiV): S. P. Singh, M. K. Sharma, A. Lay-Ekuakille, D. Gangwar and S. Gupta, "Deep ConvLSTM with self-attention for human activity decoding using wearable sensors," in IEEE Sensors Journal, doi: 10.1109/JSEN.2020.3045135.

proposed Architecture

We have added codes for two of models that we tested:

  • Baseline CNN + LSTM model
  • Proposed model with self-attention

Setup

pip3 install -r requirements.txt

Guide to run the code

  1. The data for the subjects resides in the data directory. You can create subdir for the arrangement and the dataset.npy file as data/arrangement/dataset.npz. We used the processed data from here and put it in the data folder. For example: 'data/LOTO/MHEALTH.npz' file depicts the leave one trial out (LOTO) for the MHEALTH dataset.

  2. The codes reside in the codes folder.

  • codes/model_baseline: This folder contains the Python code for training a baseline model containing CNN and RNN layers. You can run the code by running the following command:
python3 model_baseline.py
  • codes/model_proposed: This folder contains the Python code for training the proposed model built using Keras and Tensorflow. Self-attention was coded from here. You can run the code by running the following command:
python3 model_with_self_attn.py

encodinghumanactivity's People

Contributors

isukrit avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.