-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
## History Repeats Itself: Human Motion Prediction via Motion Attention | ||
This is the code for the paper | ||
|
||
Wei Mao, Miaomiao Liu, Mathieu Salzmann, Hongdong Li. | ||
[_History Repeats Itself: Human Motion Prediction via Motion Attention_](https://arxiv.org/abs/1908.05436). In ECCV 20. | ||
|
||
### Dependencies | ||
|
||
* cuda 10.0 | ||
* Python 3.6 | ||
* [Pytorch](https://github.com/pytorch/pytorch) >1.0.0 (Tested on 1.1.0 and 1.3.0) | ||
|
||
### Get the data | ||
|
||
[Human3.6m](http://vision.imar.ro/human3.6m/description.php) in exponential map can be downloaded from [here](http://www.cs.stanford.edu/people/ashesh/h3.6m.zip). | ||
|
||
Directory structure: | ||
```shell script | ||
H3.6m | ||
|-- S1 | ||
|-- S5 | ||
|-- S6 | ||
|-- ... | ||
`-- S11 | ||
``` | ||
[AMASS](https://amass.is.tue.mpg.de/en) from their official website.. | ||
|
||
Directory structure: | ||
```shell script | ||
amass | ||
|-- ACCAD | ||
|-- BioMotionLab_NTroje | ||
|-- CMU | ||
|-- ... | ||
`-- Transitions_mocap | ||
``` | ||
[3DPW](https://virtualhumans.mpi-inf.mpg.de/3DPW/) from their official website. | ||
|
||
Directory structure: | ||
```shell script | ||
3dpw | ||
|-- imageFiles | ||
| |-- courtyard_arguing_00 | ||
| |-- courtyard_backpack_00 | ||
| |-- ... | ||
`-- sequenceFiles | ||
|-- test | ||
|-- train | ||
`-- validation | ||
``` | ||
Put the all downloaded datasets in ./datasets directory. | ||
|
||
### Training | ||
All the running args are defined in [opt.py](utils/opt.py). We use following commands to train on different datasets and representations. | ||
To train, | ||
```bash | ||
python main_h36m_3d.py --kernel_size 10 --dct_n 20 --input_n 50 --output_n 10 --skip_rate 1 --batch_size 32 --test_batch_size 32 --in_features 66 | ||
``` | ||
```bash | ||
python main_h36m_ang.py --kernel_size 10 --dct_n 20 --input_n 50 --output_n 10 --skip_rate 1 --batch_size 32 --test_batch_size 32 --in_features 48 | ||
``` | ||
```bash | ||
python main_amass_3d.py --kernel_size 10 --dct_n 35 --input_n 50 --output_n 25 --skip_rate 5 --batch_size 128 --test_batch_size 128 --in_features 54 | ||
``` | ||
### Evaluation | ||
To evaluate the pretrained model, | ||
```bash | ||
python main_h36m_3d_eval.py --is_eval --kernel_size 10 --dct_n 20 --input_n 50 --output_n 10 --skip_rate 1 --batch_size 32 --test_batch_size 32 --in_features 66 --ckpt ./checkpoint/pretrained/h36m_3d_in50_out10_dctn20/ | ||
``` | ||
```bash | ||
python main_h36m_ang_eval.py --is_eval --kernel_size 10 --dct_n 20 --input_n 50 --output_n 10 --skip_rate 1 --batch_size 32 --test_batch_size 32 --in_features 48 --ckpt ./checkpoint/pretrained/h36m_ang_in50_out10_dctn20/ | ||
``` | ||
```bash | ||
python main_amass_3d_eval.py --is_eval --kernel_size 10 --dct_n 35 --input_n 50 --output_n 25 --skip_rate 5 --batch_size 128 --test_batch_size 128 --in_features 54 --ckpt ./checkpoint/pretrained/amass_3d_in50_out25_dctn30/ | ||
``` | ||
|
||
### Citing | ||
|
||
If you use our code, please cite our work | ||
|
||
``` | ||
@inproceedings{wei2020his, | ||
title={History Repeats Itself: Human Motion Prediction via Motion Attention}, | ||
author={Wei, Mao and Miaomiao, Liu and Mathieu, Salzemann}, | ||
booktitle={ECCV}, | ||
year={2020} | ||
} | ||
``` | ||
|
||
### Acknowledgments | ||
The overall code framework (dataloading, training, testing etc.) is adapted from [3d-pose-baseline](https://github.com/una-dinosauria/3d-pose-baseline). | ||
|
||
The predictor model code is adapted from [LTD](https://github.com/wei-mao-2019/LearnTrajDep). | ||
|
||
Some of our evaluation code and data process code was adapted/ported from [Residual Sup. RNN](https://github.com/una-dinosauria/human-motion-prediction) by [Julieta](https://github.com/una-dinosauria). | ||
|
||
### Licence | ||
MIT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"data_dir": "/home/wei/Documents/", | ||
"mean_params_dir": "/home/wei/Documents/projects/2019-human-mesh-recovery/baselines/single_mesh_from_img_feat/smpl/neutral_smpl_mean_params.h5", | ||
"smpl_model": "./smpl/model.npz", | ||
"exp": "main_att_model_v9_6_7_motion_amass_para_in50_out25_5_ks10_dmodel256_stg12_lr0.0005_gn10000_dctn30_sr5", | ||
"is_eval": false, | ||
"ckpt": "checkpoint/main_att_model_v9_6_7_motion_amass_para_in50_out25_5_ks10_dmodel256_stg12_lr0.0005_gn10000_dctn30_sr5", | ||
"img_size": 224, | ||
"num_points": 1000, | ||
"sample_rate": 2, | ||
"skip_rate": 5, | ||
"skip_rate_test": 5, | ||
"resamp_rate": 3, | ||
"dataset_used": [ | ||
"h36" | ||
], | ||
"input_size": 2048, | ||
"output_size": 85, | ||
"hidden_size": 512, | ||
"num_stage": 12, | ||
"drop_out": 0.5, | ||
"input_n": 50, | ||
"output_n": 25, | ||
"step_n": 5, | ||
"dct_n": 30, | ||
"lr_now": 0.0005, | ||
"max_norm": 10000, | ||
"lr_decay": 2, | ||
"lr_gamma": 0.96, | ||
"weight_decay": 0.9, | ||
"weight_3d": 1, | ||
"weight_2d": 1, | ||
"epoch": 50, | ||
"batch_size": 128, | ||
"test_batch_size": 128, | ||
"gt_dct": 0, | ||
"is_load": false, | ||
"d_model": 256, | ||
"n_head": 8, | ||
"num_encoder_layers": 6, | ||
"num_decoder_layers": 6, | ||
"dim_feedforward": 512, | ||
"warmup_steps": 4000, | ||
"do_p": 0.1, | ||
"act_f": "relu", | ||
"kernel_size": 10 | ||
} |