Skip to content

Latest commit

 

History

History
129 lines (79 loc) · 3.44 KB

File metadata and controls

129 lines (79 loc) · 3.44 KB

简体中文 | English

ST-GCN


Contents

Introduction

ST-GCN is skeleton-based action recognition model proposed in AAAI 2018.


Data

Please refer to FSD data download and preparation doc FSD

Please refer to NTU-RGBD data download and preparation doc NTU-RGBD

Train

Train on FSD

  • Train ST-GCN on FSD scripts:
python3.7 main.py -c configs/recognition/stgcn/stgcn_fsd.yaml
  • Turn off valid when training, as validation dataset is not available for the competition.

Train on NTU-RGBD

  • Train ST-GCN on NTU-RGBD scripts:
python3.7 -B -m paddle.distributed.launch --gpus="0,1,2,3"  --log_dir=log_stgcn  main.py  --validate -c configs/recognition/stgcn/stgcn_ntucs.yaml
  • config file stgcn_ntucs.yaml corresponding to the config of ST-GCN on NTU-RGB+D dataset with cross-subject splits.

Test

Test on FSD

  • Test scripts:
python3.7 main.py --test -c configs/recognition/stgcn/stgcn_fsd.yaml -w output/STGCN/STGCN_epoch_00090.pdparams
  • Specify the config file with -c, specify the weight path with -w.

  • Evaluation results will be saved in submission.csv file, final score can be obtained in competition website.

Accuracy on FSD-10 dataset:

Test_Data Top-1 checkpoints
Test_A 59.07 STGCN_fsd.pdparams

Test on NTU-RGB+D

  • Test scripts:
python3.7 main.py --test -c configs/recognition/stgcn/stgcn_ntucs.yaml -w output/STGCN/STGCN_best.pdparams
  • Specify the config file with -c, specify the weight path with -w.

Accuracy on NTU-RGB+D dataset:

split Top-1 checkpoints
cross-subject 82.28 STGCN_ntucs.pdparams

Inference

export inference model

To get model architecture file STGCN.pdmodel and parameters file STGCN.pdiparams, use:

python3.7 tools/export_model.py -c configs/recognition/stgcn/stgcn_fsd.yaml \
                                -p data/STGCN_fsd.pdparams \
                                -o inference/STGCN

infer

python3.7 tools/predict.py --input_file data/fsd10/example_skeleton.npy \
                           --config configs/recognition/stgcn/stgcn_fsd.yaml \
                           --model_file inference/STGCN/STGCN.pdmodel \
                           --params_file inference/STGCN/STGCN.pdiparams \
                           --use_gpu=True \
                           --use_tensorrt=False

example of logs:

Current video file: data/fsd10/example_skeleton.npy
        top-1 class: 27
        top-1 score: 0.9912770986557007

Reference