Giter Club home page Giter Club logo

online-skeleton-based-action-recognition's Introduction

Online skeleton-based action recognition with multi-feature early fusion

Introduction

Existing skeleton-based action recognition methods input a whole segmented action sequence and adopt later fusion to integrate the multi-stream results, which causes a large amount of computation and is not suitable for online application. This paper proposed an online skeleton-based action recognition method with multi-feature early fusion. The approach integrated different types of input feature through the early embedding layer and combined the max pooling and hierarchical pooling to extract multi-semantic spatial information. Moreover, the selection strategy of skeleton sequences was carefully designed. A new 3D skeleton dataset, NTU-GAST Skeleton, with 17 joint points was made to be compatible with existing 3D human pose estimation methods for online action recognition. Experiments on two available benchmark datasets NTU60 and 120 RGB+D indicate that the proposed method achieves competitive performance comparison to state-of-the-art results with more than 50×less computational complexity.

Online Skeleton-based Action Recognition with A Single RGB Camera

Online-Skeleton-base-Action-Recognition Online-Skeleton-base-Action-Recognition

Prerequisites

The code is built with the following libraries:

Data Preparation

NTU-GAST Skeleton dataset

Samples of NTU-GAST Skeleton dataset
  • Download NTU-GAST Skeleton dataset from Baidu drive. Extraction code:3bid. Google drive: NTU-GAST Skeleton
  • Extract the dataset to ./data/NTU-GAST-Skeleton
  • We use the dataset of GAST60 (NTU-GAST60 Skeleton) as an example for description.
    cd ./data/gast60/
    # Preprocess .h5 file of skeletons to .pkl file
    python preprocess_gast60.py
    # Get the training and evaluation data
    python protocol_gast60.py

NTU RGB+D dataset

We use the dataset of NTU60 RGB+D as an example for description. We need to first dowload the NTU-RGB+D dataset.

  • Extract the dataset to ./data/ntu/nturgb+d_skeletons/
  • Process the data
    cd ./data/ntu
    # Get skeleton of each performer
    python get_raw_skes_data.py
    # Remove the bad skeleton 
    python get_raw_denoised_data.py
    # Transform the skeleton to the center of the first frame
    python seq_transformation.py

Training

# For the CS setting
python  main.py --network ESN --train 1 --case 0
# For the CV setting
python  main.py --network ESN --train 1 --case 1

Testing

  • Test the pre-trained models (./results/NTU60/SGN/)
# For the CS setting
python  main.py --network ESN --train 0 --case 0
# For the CV setting
python  main.py --network ESN--train 0 --case 1

Reference

  • The NTU-GAST Skeleton dataset was generated by GAST-Net

  • Note that some codes references SGN

online-skeleton-based-action-recognition's People

Contributors

fabro66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

online-skeleton-based-action-recognition's Issues

MemoryError

At the Time i want to do the Training
and excutre the command
python main.py --network ESN --train 1 --case 0

this is waht i get :
The number of parameters: 1694986
The modes is: ESN
It is using GPU!
C:\Users*\Anaconda3\envs\Onlineskelet\lib\site-packages\torch\utils\data\dataloader.py:478: UserWarning: This DataLoader will create 24 worker processes in total. Our suggested max number of worker in current system is 16 (cpuset is not taken into account), which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
warnings.warn(_create_warning_msg(
Train on 40091 samples, validate on 16487 samples
0 0.001
Traceback (most recent call last):
File "", line 1, in
File "C:\Users*
\Anaconda3\envs\Onlineskelet\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "C:\Users****\Anaconda3\envs\Onlineskelet\lib\multiprocessing\spawn.py", line 126, in _main
self = reduction.pickle.load(from_parent)
MemoryError

How can I solve this error ?
please help!!!

Inference on generic video

Hi, thanks for your work!
I'm watching the code and I wonder if it is possible to do inference on a generic video.
I mean, if I use NTU pre-trained models there is a way to submit a generic video ad to have the list of recognized actions as output? Thanks

Demo

Thanks for your amazing work and make the code open source.
Where can I find the pre-trained model?
Can you provide a demo code for live-action recognition?

演示demo?

结束了训练之后该如何检测action?

Output meaning in test

Hi.
I analyzed the code and I've seen that in test mode the output for each input is an array with shape[32, 5, 60] and then transformed to [32,60] after the mean operation.
What does this output shape means?
What does the numbers represent?
Is there a map of actions and their correspondent number?
Thanks

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.