PyTorch implementation of "A Central Difference Graph Convolutional Operator for Skeleton-Based Action Recognition".
- g++ 5.4.0
cd ./model/Temporal_shift
bash run.sh
-
Download the raw data of NTU-RGBD and NTU-RGBD120.
-
For NTU-RGBD, preprocess data with
python data_gen/ntu_gendata.py
. For NTU-RGBD120, preprocess data withpython data_gen/ntu120_gendata.py
. -
Generate the bone data with
python data_gen/gen_bone_data.py
. -
Generate the motion data with
python data_gen/gen_motion_data.py
.
-
The general training template command:
python main.py --config ./config/nturgbd-cross-view/train_joint.yaml
python main.py --config ./config/nturgbd-cross-view/train_bone.yaml
python main.py --config ./config/nturgbd-cross-view/train_joint_motion.yaml
python main.py --config ./config/nturgbd-cross-view/train_bone_motion.yaml
-
The general testing template command:
python main.py --config ./config/nturgbd-cross-subject/test_joint.yaml
python main.py --config ./config/nturgbd-cross-subject/test_bone.yaml
python main.py --config ./config/nturgbd-cross-subject/test_joint_motion.yaml
python main.py --config ./config/nturgbd-cross-subject/test_bone_motion.yaml
-
Use the corresponding config files from ./config to train/test different datasets
To ensemble the results of 4 streams. Change models name in ensemble.py
depending on your experiment setting. Then run python ensemble.py
.
We release all trained models:
Dataset | Setting | Model |
---|---|---|
NTU-RGBD | X-view | ./save_models/ntu/xview/ntu_CDGC_joint_xview.pt |
NTU-RGBD | X-view | ./save_models/ntu/xview/ntu_CDGC_bone_xview.pt |
NTU-RGBD | X-view | ./save_models/ntu/xview/ntu_CDGC_joint_motion_xview.pt |
NTU-RGBD | X-view | ./save_models/ntu/xview/ntu_CDGC_bone_motion_xview.pt |
NTU-RGBD | X-sub | ./save_models/ntu/xsub/ntu_CDGC_joint_xsub.pt |
NTU-RGBD | X-sub | ./save_models/ntu/xsub/ntu_CDGC_bone_xsub.pt |
NTU-RGBD | X-sub | ./save_models/ntu/xsub/ntu_CDGC_joint_motion_xsub.pt |
NTU-RGBD | X-sub | ./save_models/ntu/xsub/ntu_CDGC_bone_motion_xsub.pt |
NTU-RGBD120 | X-setup | ./save_models/ntu120/xsetup/ntu120_CDGC_joint_xsetup.pt |
NTU-RGBD120 | X-setup | ./save_models/ntu120/xsetup/ntu120_CDGC_bone_xsetup.pt |
NTU-RGBD120 | X-setup | ./save_models/ntu120/xsetup/ntu120_CDGC_joint_motion_xsetup.pt |
NTU-RGBD120 | X-setup | ./save_models/ntu120/xsetup/ntu120_CDGC_bone_motion_xsetup.pt |
NTU-RGBD120 | X-sub | ./save_models/ntu120/xsub/ntu120_CDGC_joint_xsub.pt |
NTU-RGBD120 | X-sub | ./save_models/ntu120/xsub/ntu120_CDGC_bone_xsub.pt |
NTU-RGBD120 | X-sub | ./save_models/ntu120/xsub/ntu120_CDGC_joint_motion_xsub.pt |
NTU-RGBD120 | X-sub | ./save_models/ntu120/xsub/ntu120_CDGC_bone_motion_xsub.pt |
Most models are based on Python 0.4 and a few on 1.7. So you need two versions of Python when loading these models.
Please cite this work if you find it useful: