AGCN
October 20, 2021 · View on GitHub
简体中文 | English
AGCN
Contents
Introduction
We implemented Adaptive Graph Convolution Network to improve the accuracy of ST-GCN.
Data
Please refer to FSD-10 data download and preparation doc FSD
Please refer to NTU-RGBD data download and preparation doc NTU-RGBD
Train
Train on FSD
- Train AGCN on FSD scripts:
python3.7 main.py -c configs/recognition/agcn/agcn_fsd.yaml
- Turn off
validwhen training, as validation dataset is not available for the competition.
Train on NTU-RGBD
- Train AGCN on NTU-RGBD scripts:
python3.7 -B -m paddle.distributed.launch --gpus="0,1,2,3" --log_dir=log_agcn main.py --validate -c configs/recognition/agcn/agcn_ntucs.yaml
- config file
agcn_ntucs.yamlcorresponding to the config of AGCN on NTU-RGB+D dataset with cross-subject splits.
Test
Test onf FSD
- Test scripts:
python3.7 main.py --test -c configs/recognition/agcn/agcn_fsd.yaml -w output/AGCN/AGCN_epoch_00100.pdparams
-
Specify the config file with
-c, specify the weight path with-w. -
Evaluation results will be saved in
submission.csvfile, final score can be obtained in competition website.
Accuracy on FSD dataset:
| Test_Data | Top-1 | checkpoints |
|---|---|---|
| Test_A | 62.29 | AGCN_fsd.pdparams |
Test on NTU-RGB+D
- Test scripts:
python3.7 main.py --test -c configs/recognition/agcn/agcn_ntucs.yaml -w output/AGCN/AGCN_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 | 83.27 | AGCN_ntucs.pdparams |
Inference
export inference model
To get model architecture file AGCN.pdmodel and parameters file AGCN.pdiparams, use:
python3.7 tools/export_model.py -c configs/recognition/agcn/agcn_fsd.yaml \
-p data/AGCN_fsd.pdparams \
-o inference/AGCN
- Args usage please refer to Model Inference.
infer
python3.7 tools/predict.py --input_file data/fsd10/example_skeleton.npy \
--config configs/recognition/agcn/agcn_fsd.yaml \
--model_file inference/AGCN/AGCN.pdmodel \
--params_file inference/AGCN/AGCN.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.8965644240379333
Reference
-
Spatial Temporal Graph Convolutional Networks for Skeleton-Based Action Recognition, Sijie Yan, Yuanjun Xiong, Dahua Lin
-
Two-Stream Adaptive Graph Convolutional Networks for Skeleton-Based Action Recognition, Lei Shi, Yifan Zhang, Jian Cheng, Hanqing Lu
-
Skeleton-Based Action Recognition with Multi-Stream Adaptive Graph Convolutional Networks, Lei Shi, Yifan Zhang, Jian Cheng, Hanqing Lu
-
Many thanks to li7819559 and ZhaoJingjing713 for contributing the code.