All Projects → takumiw → Deep-Learning-for-Human-Activity-Recognition

takumiw / Deep-Learning-for-Human-Activity-Recognition

Licence: MIT license
Keras implementation of CNN, DeepConvLSTM, and SDAE and LightGBM for sensor-based Human Activity Recognition (HAR).

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deep-Learning-for-Human-Activity-Recognition

Benchmarks
Comparison tools
Stars: ✭ 139 (+189.58%)
Mutual labels:  lightgbm
Unbiased lambdamart
Code for WWW'19 "Unbiased LambdaMART: An Unbiased Pairwise Learning-to-Rank Algorithm", which is based on LightGBM
Stars: ✭ 180 (+275%)
Mutual labels:  lightgbm
decision-trees-for-ml
Building Decision Trees From Scratch In Python
Stars: ✭ 61 (+27.08%)
Mutual labels:  lightgbm
M2cgen
Transform ML models into a native code (Java, C, Python, Go, JavaScript, Visual Basic, C#, R, PowerShell, PHP, Dart, Haskell, Ruby, F#, Rust) with zero dependencies
Stars: ✭ 1,962 (+3987.5%)
Mutual labels:  lightgbm
Mars
Mars is a tensor-based unified framework for large-scale data computation which scales numpy, pandas, scikit-learn and Python functions.
Stars: ✭ 2,308 (+4708.33%)
Mutual labels:  lightgbm
Eli5
A library for debugging/inspecting machine learning classifiers and explaining their predictions
Stars: ✭ 2,477 (+5060.42%)
Mutual labels:  lightgbm
Nyoka
Nyoka is a Python library to export ML/DL models into PMML (PMML 4.4.1 Standard).
Stars: ✭ 127 (+164.58%)
Mutual labels:  lightgbm
JLBoost.jl
A 100%-Julia implementation of Gradient-Boosting Regression Tree algorithms
Stars: ✭ 65 (+35.42%)
Mutual labels:  lightgbm
Gbm Perf
Performance of various open source GBM implementations
Stars: ✭ 177 (+268.75%)
Mutual labels:  lightgbm
cartoon-gan
Implementation of cartoon GAN [Chen et al., CVPR18] with pytorch
Stars: ✭ 55 (+14.58%)
Mutual labels:  convolutional-neural-network
Forecasting
Time Series Forecasting Best Practices & Examples
Stars: ✭ 2,123 (+4322.92%)
Mutual labels:  lightgbm
Lightgbm
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
Stars: ✭ 13,293 (+27593.75%)
Mutual labels:  lightgbm
Eland
Python Client and Toolkit for DataFrames, Big Data, Machine Learning and ETL in Elasticsearch
Stars: ✭ 235 (+389.58%)
Mutual labels:  lightgbm
Awesome Decision Tree Papers
A collection of research papers on decision, classification and regression trees with implementations.
Stars: ✭ 1,908 (+3875%)
Mutual labels:  lightgbm
fast retraining
Show how to perform fast retraining with LightGBM in different business cases
Stars: ✭ 56 (+16.67%)
Mutual labels:  lightgbm
Recotour
A tour through recommendation algorithms in python [IN PROGRESS]
Stars: ✭ 140 (+191.67%)
Mutual labels:  lightgbm
Mmlspark
Simple and Distributed Machine Learning
Stars: ✭ 2,899 (+5939.58%)
Mutual labels:  lightgbm
DeepCrack
DeepCrack: Learning Hierarchical Convolutional Features for Crack Detection
Stars: ✭ 137 (+185.42%)
Mutual labels:  convolutional-neural-network
Traffic Signs Recognition cnn
Traffic Sign Recognition by Convolutional Neural Network (TensorFlow)
Stars: ✭ 14 (-70.83%)
Mutual labels:  convolutional-neural-network
docker-kaggle-ko
머신러닝/딥러닝(PyTorch, TensorFlow) 전용 도커입니다. 한글 폰트, 한글 자연어처리 패키지(konlpy), 형태소 분석기, Timezone 등의 설정 등을 추가 하였습니다.
Stars: ✭ 46 (-4.17%)
Mutual labels:  lightgbm

Deep Learning (and Machine Learning) for Human Activity Recognition

Keras implementation of CNN, DeepConvLSTM, and SDAE and LightGBM for sensor-based Human Activity Recognition (HAR).

This repository contains keras (tensorflow.keras) implementation of Convolutional Neural Network (CNN) [1], Deep Convolutional LSTM (DeepConvLSTM) [1], Stacked Denoising AutoEncoder (SDAE) [2], and Light GBM for human activity recognition (HAR) using smartphones sensor dataset, UCI smartphone [3].

Table 1. The summary of the results amongst five methods on UCI smartphone dataset.

Method Accuracy Precision Recall F1-score
LightGBM 96.33 96.58 96.37 96.43
CNN [1] 95.29 95.46 95.50 95.47
DeepConvLSTM [1] 95.66 95.71 95.84 95.72
SDAE [2] 78.28 78.83 78.47 78.25
MLP 93.81 93.97 94.04 93.85

Setup

Dockerfile creates a virtual environment with Keras (tensorflow 2.3) and Python 3.8. If you wan to use this implementation locally within a docker container:

$ git clone [email protected]:takumiw/Deep-Learning-for-Human-Activity-Recognition.git
$ cd Deep-Learning-for-Human-Activity-Recognition
$ make start-gpu
# poetry install

Then run code by:

# poetry run python run_cnn.py

Dataset

The dataset includes types of movement amongst three static postures (STANDING, SITTING, LYING) and three dynamic activities (WALKING, WALKING DOWNSTAIRS, WALKING UPSTAIRS).


Watch video
Download dataset

Methods

Feature engineering + LightGBM

To represent raw sensor signals as a feature vector, 621 features are created by preprocessing, fast Fourier transform (FFT), statistics, etc. (run_generate_features.py.)
The 621 features of the training dataset were trained on a LightGBM classifier by 5-fold cross-validation, and evaluated on the test dataset.

Convolutional Neural network (CNN)

The preprocessed raw sensor signals are classified CNN. The CNN architecture, which is a baseline to DeepConvLSTM, follows the study [1]

Deep Convolutional LSTM (DeepConvLSTM)

The preprocessed raw sensor signals are classified DeepConvLSTM. The fully connected layers of CNN are replaced with LSTM layers. The DeepConvLSTM architecture follows the study [1].

Stacked Denoising AutoEncoder (SDAE)

The preprocessed raw sensor signals are trained with SDAE, softmax layer is superimposed on top of Encoder, then whole network is fine-tuned for the target classification task. I used as same settings to the reference [2] as possible, but could not reproduce the result in the paper.

Multi Layer Perceptron (MLP)

The preprocessed raw sensor signals are trained with MLP, which consists of two hidden layers.

Reference

[1] Ordóñez, F. J., & Roggen, D. (2016). Deep convolutional and lstm recurrent neural networks for multimodal wearable activity recognition. Sensors, 16(1), 115.
[2] Gao, X., Luo, H., Wang, Q., Zhao, F., Ye, L., & Zhang, Y. (2019). A human activity recognition algorithm based on stacking denoising autoencoder and lightGBM. Sensors, 19(4), 947.
[3] Reyes-Ortiz, J. L., Oneto, L., Samà, A., Parra, X., & Anguita, D. (2016). Transition-aware human activity recognition using smartphones. Neurocomputing, 171, 754-767.

Author

  • Takumi Watanabe (takumiw)
  • Sophia University
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].