|
| 1 | +# PoseAug |
| 2 | + |
| 3 | +# Installation |
| 4 | + |
| 5 | +### Environment |
| 6 | +* **Supported OS:** Ubuntu 16.04 |
| 7 | +* **Packages:** |
| 8 | + * Python: 3.6.9 |
| 9 | + * PyTorch: 1.0.1.post2 ([https://pytorch.org/](https://pytorch.org/)) |
| 10 | +* **build the environment:** |
| 11 | +```sh |
| 12 | +cd PoseAug |
| 13 | +conda create -n poseaugEnv python=3.6.9 |
| 14 | +conda activate poseaugEnv |
| 15 | +pip install -r requirements.txt |
| 16 | +``` |
| 17 | + |
| 18 | +### Dataset |
| 19 | +* Please follow the `DATASETS.md` to get the data ready. |
| 20 | + |
| 21 | +# Train |
| 22 | +* There are 32 experiments in total (16 for baseline training, 16 for PoseAug training), |
| 23 | +including four pose estimators ([SemGCN](https://github.com/garyzhao/SemGCN), [SimpleBaseline](https://github.com/una-dinosauria/3d-pose-baseline), [ST-GCN](https://github.com/vanoracai/Exploiting-Spatial-temporal-Relationships-for-3D-Pose-Estimation-via-Graph-Convolutional-Networks), [VideoPose](https://github.com/facebookresearch/VideoPose3D)) |
| 24 | +and four 2D pose settings (Ground Truth, CPN, DET, HR-Net). |
| 25 | + |
| 26 | +### Pretrain |
| 27 | +```sh |
| 28 | +# gcn |
| 29 | +python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt |
| 30 | +python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints cpn_ft_h36m_dbb |
| 31 | +python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints detectron_ft_h36m |
| 32 | +python3 run_baseline.py --note pretrain --dropout 0 --lr 2e-2 --epochs 100 --posenet_name 'gcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints hr |
| 33 | + |
| 34 | +# videopose |
| 35 | +python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt |
| 36 | +python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints cpn_ft_h36m_dbb |
| 37 | +python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints detectron_ft_h36m |
| 38 | +python3 run_baseline.py --note pretrain --lr 1e-3 --posenet_name 'videopose' --checkpoint './checkpoint/pretrain_baseline' --keypoints hr |
| 39 | + |
| 40 | +# mlp |
| 41 | +python3 run_baseline.py --note pretrain --lr 1e-3 --stages 2 --posenet_name 'mlp' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt |
| 42 | +python3 run_baseline.py --note pretrain --lr 1e-3 --stages 2 --posenet_name 'mlp' --checkpoint './checkpoint/pretrain_baseline' --keypoints cpn_ft_h36m_dbb |
| 43 | +python3 run_baseline.py --note pretrain --lr 1e-3 --stages 2 --posenet_name 'mlp' --checkpoint './checkpoint/pretrain_baseline' --keypoints detectron_ft_h36m |
| 44 | +python3 run_baseline.py --note pretrain --lr 1e-3 --stages 2 --posenet_name 'mlp' --checkpoint './checkpoint/pretrain_baseline' --keypoints hr |
| 45 | + |
| 46 | +# st-gcn |
| 47 | +python3 run_baseline.py --note pretrain --dropout -1 --lr 1e-3 --posenet_name 'stgcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints gt |
| 48 | +python3 run_baseline.py --note pretrain --dropout -1 --lr 1e-3 --posenet_name 'stgcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints cpn_ft_h36m_dbb |
| 49 | +python3 run_baseline.py --note pretrain --dropout -1 --lr 1e-3 --posenet_name 'stgcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints detectron_ft_h36m |
| 50 | +python3 run_baseline.py --note pretrain --dropout -1 --lr 1e-3 --posenet_name 'stgcn' --checkpoint './checkpoint/pretrain_baseline' --keypoints hr |
| 51 | +# note: for st-gcn, the baseline requires a different dropout setting (-1: the default dropout setting), while the poseaug requires dropout=0. |
| 52 | + |
| 53 | +``` |
| 54 | +### PoseAug |
| 55 | +```sh |
| 56 | +# gcn |
| 57 | +python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'gcn' --lr_p 1e-3 --checkpoint './checkpoint/poseaug' --keypoints gt |
| 58 | +python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'gcn' --lr_p 1e-3 --checkpoint './checkpoint/poseaug' --keypoints cpn_ft_h36m_dbb |
| 59 | +python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'gcn' --lr_p 1e-3 --checkpoint './checkpoint/poseaug' --keypoints detectron_ft_h36m |
| 60 | +python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'gcn' --lr_p 1e-3 --checkpoint './checkpoint/poseaug' --keypoints hr |
| 61 | + |
| 62 | +# video |
| 63 | +python3 run_poseaug.py --note poseaug --posenet_name 'videopose' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints gt |
| 64 | +python3 run_poseaug.py --note poseaug --posenet_name 'videopose' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints cpn_ft_h36m_dbb |
| 65 | +python3 run_poseaug.py --note poseaug --posenet_name 'videopose' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints detectron_ft_h36m |
| 66 | +python3 run_poseaug.py --note poseaug --posenet_name 'videopose' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints hr |
| 67 | + |
| 68 | +# mlp |
| 69 | +python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints gt |
| 70 | +python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints cpn_ft_h36m_dbb |
| 71 | +python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints detectron_ft_h36m |
| 72 | +python3 run_poseaug.py --note poseaug --posenet_name 'mlp' --lr_p 1e-4 --stages 2 --checkpoint './checkpoint/poseaug' --keypoints hr |
| 73 | + |
| 74 | +# st-gcn |
| 75 | +python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'stgcn' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints gt |
| 76 | +python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'stgcn' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints cpn_ft_h36m_dbb |
| 77 | +python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'stgcn' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints detectron_ft_h36m |
| 78 | +python3 run_poseaug.py --note poseaug --dropout 0 --posenet_name 'stgcn' --lr_p 1e-4 --checkpoint './checkpoint/poseaug' --keypoints hr |
| 79 | + |
| 80 | +``` |
| 81 | + |
| 82 | +### Comment: |
| 83 | +* For simplicity, all the hyper-param are the same. If you want to explore better performance for specific setting, try changing the hyper-param. |
| 84 | +* The GAN training may collapse, change the hyper-param (e.g., random_seed) and re-train the models will solve the problem. |
| 85 | + |
| 86 | +### Monitor the PoseAug training process |
| 87 | +```sh |
| 88 | +cd ./checkpoint/poseaug |
| 89 | +tensorboard --logdir=/path/to/eventfile |
| 90 | +``` |
| 91 | + |
| 92 | +### Analysis the result |
| 93 | +We provide a `checkpoint/PoseAug_result_summary.ipynb` which can generate the result summary table for all 16 experiments. |
| 94 | + |
| 95 | + |
| 96 | +### Evaluate |
| 97 | +```sh |
| 98 | +python3 run_evaluate.py --posenet_name 'videopose' --keypoints gt --evaluate '/path/to/checkpoint' |
| 99 | +``` |
0 commit comments