All Projects → jindongwang → Deep Learning Activity Recognition

jindongwang / Deep Learning Activity Recognition

A tutorial for using deep learning for activity recognition (Pytorch and Tensorflow)

Programming Languages

python
139335 projects - #7 most used programming language

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

Activity-Recognition-CovMIJ
Skeleton-based method for activity recognition problem
Stars: ✭ 13 (-91.82%)
Mutual labels:  activity-recognition
Hake Action
As a part of the HAKE project, includes the reproduced SOTA models and the corresponding HAKE-enhanced versions (CVPR2020).
Stars: ✭ 72 (-54.72%)
Mutual labels:  activity-recognition
Hake
HAKE: Human Activity Knowledge Engine (CVPR'18/19/20, NeurIPS'20)
Stars: ✭ 132 (-16.98%)
Mutual labels:  activity-recognition
Lstm Human Activity Recognition
Human Activity Recognition example using TensorFlow on smartphone sensors dataset and an LSTM RNN. Classifying the type of movement amongst six activity categories - Guillaume Chevalier
Stars: ✭ 2,943 (+1750.94%)
Mutual labels:  activity-recognition
Wdk
The Wearables Development Toolkit - a development environment for activity recognition applications with sensor signals
Stars: ✭ 68 (-57.23%)
Mutual labels:  activity-recognition
M Pact
A one stop shop for all of your activity recognition needs.
Stars: ✭ 85 (-46.54%)
Mutual labels:  activity-recognition
hamnet
PyTorch implementation of AAAI 2021 paper: A Hybrid Attention Mechanism for Weakly-Supervised Temporal Action Localization
Stars: ✭ 30 (-81.13%)
Mutual labels:  activity-recognition
Fall Detection
Human Fall Detection from CCTV camera feed
Stars: ✭ 154 (-3.14%)
Mutual labels:  activity-recognition
React Native Activity Recognition
React Native wrapper for the Activity Recognition API.
Stars: ✭ 69 (-56.6%)
Mutual labels:  activity-recognition
Machinelearning
一些关于机器学习的学习资料与研究介绍
Stars: ✭ 1,707 (+973.58%)
Mutual labels:  activity-recognition
Awesome Action Recognition
A curated list of action recognition and related area resources
Stars: ✭ 3,202 (+1913.84%)
Mutual labels:  activity-recognition
Sense
Enhance your application with the ability to see and interact with humans using any RGB camera.
Stars: ✭ 522 (+228.3%)
Mutual labels:  activity-recognition
T3d
Temporal 3D ConvNet
Stars: ✭ 97 (-38.99%)
Mutual labels:  activity-recognition
On-device-activity-recognition
Personalized machine learning on the smartphone
Stars: ✭ 46 (-71.07%)
Mutual labels:  activity-recognition
Awesome Activity Prediction
Paper list of activity prediction and related area
Stars: ✭ 147 (-7.55%)
Mutual labels:  activity-recognition
Robust-Deep-Learning-Pipeline
Deep Convolutional Bidirectional LSTM for Complex Activity Recognition with Missing Data. Human Activity Recognition Challenge. Springer SIST (2020)
Stars: ✭ 20 (-87.42%)
Mutual labels:  activity-recognition
Hake Action Torch
HAKE-Action in PyTorch
Stars: ✭ 74 (-53.46%)
Mutual labels:  activity-recognition
Motion Sense
MotionSense Dataset for Human Activity and Attribute Recognition ( time-series data generated by smartphone's sensors: accelerometer and gyroscope)
Stars: ✭ 159 (+0%)
Mutual labels:  activity-recognition
Timeception
Timeception for Complex Action Recognition, CVPR 2019 (Oral Presentation)
Stars: ✭ 153 (-3.77%)
Mutual labels:  activity-recognition
Intro To Cv Ud810
Problem Set solutions for the "Introduction to Computer Vision (ud810)" MOOC from Udacity
Stars: ✭ 110 (-30.82%)
Mutual labels:  activity-recognition

Deep Learning for Human Activity Recognition

Deep learning is perhaps the nearest future of human activity recognition. While there are many existing non-deep method, we still want to unleash the full power of deep learning. This repo provides a demo of using deep learning to perform human activity recognition.

We support both Tensorflow and Pytorch.

Prerequisites

  • Python 3.x
  • Numpy
  • Tensorflow or Pytorch 1.0+

Dataset

There are many public datasets for human activity recognition. You can refer to this survey article Deep learning for sensor-based activity recognition: a survey to find more.

In this demo, we will use UCI HAR dataset as an example. This dataset can be found in here.

Of course, this dataset needs further preprocessing before being put into the network. I've also provided a preprocessing version of the dataset as a .npz file so you can focus on the network (download HERE). It is also highly recommended you download the dataset so that you can experience all the process on your own.

#subject #activity Frequency
30 6 50 Hz

Usage

  • For Pytorch (recommend), go to pytorch folder, config the folder of your data in config.py', and then runmain_pytorch.py`.

  • For tensorflow, run main_tensorflow.py file. The update of tensorflow version is stopped since I personally like Pytorch.

Network structure

What is the most influential deep structure? CNN it is. So we'll use CNN in our demo.

CNN structure

Convolution + pooling + convolution + pooling + dense + dense + dense + output

That is: 2 convolutions, 2 poolings, and 3 fully connected layers.

About the inputs

That dataset contains 9 channels of the inputs: (acc_body, acc_total and acc_gyro) on x-y-z. So the input channel is 9.

Dataset providers have clipped the dataset using sliding window, so every 128 in .txt can be considered as an input. In real life, you need to first clipped the input using sliding window.

So in the end, we reformatted the inputs from 9 inputs files to 1 file, the shape of that file is [n_sample,128,9], that is, every windows has 9 channels with each channel has length 128. When feeding it to Tensorflow, it has to be reshaped to [n_sample,9,1,128] as we expect there is 128 X 1 signals for every channel.

Related projects

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].