Do train the lifting network Simple with the Human3.6M dataset loaded by Moon.
Follow the instructions in link to make the 'Human3.6M' & 'MPII' folder and put it under the 'data' directory. (MPII for only one-stage method training)
$ PoseAug_Human36M
| -- .vscode
| -- assets
| -- checkpoint
| -- common
| -- data
| -- Human3.6M
| -- annotations
| -- images
| -- bbox_root
| -- ...
| -- MPII
| -- annotations
| -- images
| -- data_extra
| -- ...
- Only baseline network(Simple) training is available now.
- Below instructions do the training of 2-stage methods.
# mlp - GT 2D keypoints
python3 run_baseline_custom.py --note GT --checkpoint ./checkpoint/pretrain_baseline --keypoints gt
# mlp - 2D keypoints estimated by networks
# before train using the 2D keypoints from the 2D estimation network, do 'run_2d_save.py' first.
# the results will be stored in {args.checkpoint} / mlp / {args.keypoints} / {start_time}_{args.note} /
python3 run_baseline_custom.py --note resnet_50 --checkpoint ./checkpoint/pretrain_baseline/ --keypoints resnet_50
python3 run_baseline_custom.py --note resnet_101 --checkpoint ./checkpoint/pretrain_baseline/ --keypoints resnet_101
python3 run_baseline_custom.py --note resnet_152 --checkpoint ./checkpoint/pretrain_baseline/ --keypoints resnet_152
python3 run_baseline_custom.py --note resnet --checkpoint ./checkpoint/pretrain_baseline/ --keypoints pelee
- Below instruction does the training of 1-stage methods.
# thre result will be saved in {args.save_path_one_stage}/
python run_train_one_stage.py --batch_size 32 --save_path_one_stage {PATH/TO/SAVE/WEIGHT FILE}
# evaluate 2-stage methods
python run_evaluate_custom.py --keypoints gt --evaluate {PATH/TO/WEIGHT}
python run_evaluate_custom.py --keypoints pelee --evaluate {PATH/TO/WEIGHT}
python run_evaluate_custom.py --posenet_name mlp --keypoints resnet_50 --evaluate {PATH/TO/WEIGHT}
python run_evaluate_custom.py --posenet_name mlp --keypoints resnet_101 --evaluate {PATH/TO/WEIGHT}
python run_evaluate_custom.py --posenet_name mlp --keypoints resnet_152 --evaluate {PATH/TO/WEIGHT}
# evaluate the 2-stage method
python run_evaluate_one_stage.py --args.path_one_stage {PATH/TO/WEIGHT}
Get the pre-trained weight from link for the resnet-based 2d pose estimation model and link for peleenet-based model.
# save the result of the Human3.6M training set using a 2D human pose estimation network
python run_2d_detection_save.py --batch_size 128 --keypoints resnet_50 --path_2d {PATH/TO/WEIGHT} --is_train true
python run_2d_detection_save.py --batch_size 128 --keypoints resnet_101 --path_2d {PATH/TO/WEIGHT} --is_train true
python run_2d_detection_save.py --batch_size 128 --keypoints resnet_152 --path_2d {PATH/TO/WEIGHT} --is_train true
python run_2d_detection_save.py --batch_size 128 --keypoints pelee --path_2d {PATH/TO/WEIGHT} --is_train true
# save the result of the Human3.6M test set
python run_2d_detection_save.py --batch_size 128 --keypoints resnet_50 --path_2d {PATH/TO/WEIGHT} --is_train false
python run_2d_detection_save.py --batch_size 128 --keypoints resnet_101 --path_2d {PATH/TO/WEIGHT} --is_train false
python run_2d_detection_save.py --batch_size 128 --keypoints resnet_152 --path_2d {PATH/TO/WEIGHT} --is_train false
python run_2d_detection_save.py --batch_size 128 --keypoints pelee --path_2d {PATH/TO/WEIGHT} --is_train false
# Visualize the keypoints detected by 2D estimator
# With GT keypoints -> save_test/{#}_GT.jpg
# With estimated keypoints -> save_test/{#}_pelee.jpg or save_test/{#}_resnet.jpg
python run_2d_save_test.pt --keypoints pelee
python run_2d_save_test.pt --keypoints resnet_50
python run_2d_save_test.pt --keypoints resnet_101
python run_2d_save_test.pt --keypoints resnet_152
This code uses (SemGCN, SimpleBL, ST-GCN and VPose3D) as backbone. The integrated contents are from PoseAug. Human 3.6M dataset is from Moon's github.