This repository includes the PyTorch code of the network described in Learning 3D Human Shape and Pose from Dense Body Parts.
- python 2.7
-
PyTorch tested on version 1.0.1.post2
-
opendr optional
-
smpl_webuser optional
-
other packages listed in
requirements.txt
DensePose UV data
- Run the following script to fetch DensePose UV data.
bash get_densepose_uv.sh
SMPL model files
- Collect SMPL model files from https://smpl.is.tue.mpg.de and UP. Put model files into the
./data/SMPL_data
directory.
After collecting the above necessary files, the directory structure of ./data
is expected as follows.
./data
├── UV_data
│ ├── UV_Processed.mat
│ └── UV_symmetry_transforms.mat
└── SMPL_data
├── basicModel_f_lbs_10_207_0_v1.0.0.pkl
├── basicmodel_m_lbs_10_207_0_v1.0.0.pkl
└── basicModel_neutral_lbs_10_207_0_v1.0.0.pkl
-
Download the pre-trained model (trained on Human3.6M and DensePose-COCO) and put it into the
./data/pretrained_model
directory. -
Run the demo code. Using
--use_opendr
if theopendr
package is successfully installed.
python demo.py --cfg configs/danet_demo.yaml --load_ckpt ./data/pretrained_model/danet_model_h36m_cocodp.pth --img_dir ./imgs --use_opendr
- View visualization results in
./output
. Results are organized (from left to right) as the input image, the estimated IUV maps (global and partial), the rendered IUV of the predicted SMPL model, the predicted SMPL model (front and side views).
If this work is helpful in your research, please cite the following papers.
@inproceedings{zhang2019danet,
title={DaNet: Decompose-and-aggregate Network for 3D Human Shape and Pose Estimation},
author={Zhang, Hongwen and Cao, Jie and Lu, Guo and Ouyang, Wanli and Sun, Zhenan},
booktitle={Proceedings of the 27th ACM International Conference on Multimedia},
pages={935--944},
year={2019},
organization={ACM}
}
@article{zhang2019learning,
title={Learning 3D Human Shape and Pose from Dense Body Parts},
author={Zhang, Hongwen and Cao, Jie and Lu, Guo and Ouyang, Wanli and Sun, Zhenan},
journal={arXiv preprint arXiv:1912.13344},
year={2019}
}
The code is developed upon the following projects. Thanks to the original authors.