Code for our CVPR 2020 (ORAL) paper - TailorNet: Predicting Clothing in 3D as a Function of Human Pose, Shape and Garment Style.
This repository contains training and inference code for the following paper:
TailorNet: Predicting Clothing in 3D as a Function of Human Pose, Shape and Garment Style Chaitanya Patel*, Zhouyingcheng Liao*, Gerard Pons-Moll CVPR 2020 (ORAL)[ArXiv] [Project Website] [Dataset Repo] [Oral Presentation] [Results Video]
Cite us if you use our model, code or data:
@inproceedings{patel20tailornet, title = {TailorNet: Predicting Clothing in 3D as a Function of Human Pose, Shape and Garment Style}, author = {Patel, Chaitanya and Liao, Zhouyingcheng and Pons-Moll, Gerard}, booktitle = {{IEEE} Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {jun}, organization = {{IEEE}}, year = {2020}, }
python3
pytorch
scipy
chumpy
psbody.mesh
global_var.py.
run_tailornet.pyand run it to predict garments on some random inputs. You can play with different inputs. You can also run inference on motion sequence data.
python run_tailornet.py render. (Blender 2.79 needs to be installed.)
... evaluated using
evaluatefunction in
utils/eval.py. | garment_class | gender | TailorNet Baseline | TailorNet Mixture Model | |:--:|:--:|:--:|:--:| | old-t-shirt | female | 11.1 | 10.7 | | t-shirt | female | 12.6 | 12.3 | | t-shirt | male | 11.4 | 11.2 | | shirt | female | 14.2 | 14.1 | | shirt | male | 12.7 | 12.5 | | pant | female | 4.7 | 4.8 | | pant | male | 8.1 | 8.1 | | short-pant | female | 6.8 | 6.6 | | short-pant | male | 7.0 | 7.0 | | skirt | female | 7.7 | 7.8 |
global_var.py, especially LOG_DIR where training logs will be stored.
trainer/base_trainer.py(or pass them via command line) and run
python trainer/base_trainer.pyto train TailorNet MLP baseline.
python trainer/lf_trainer.pyto train low frequency predictor and
trainer/ss2g_trainer.pyto train shape-style-to-garment(in canonical pose) model.
python trainer/hf_trainer.py --shape_style _ _ ...to train pivot high frequency predictors for pivots
_,
_, and so on. See
DATA_DIR/_/pivots.txtto know available pivots.
models.tailornet_model.TailorNetModelwith appropriate logdir arguments to do prediction.
In the paper, we report inference time to be 1-2 ms per frame(depending upon garment) which is averaged inference time over the batch of 21 samples(20-40 ms per batch). We apologize for not clearly mentioning that in the paper. Running each sample separately takes almost same time as batch - around 20 ms per frame for all garments. However, note that TailorNet has 21 independent MLPs, so we believe that faster inference time is possible if MLPs are configured to run in parallel on GPU cores.
smpl_liblibrary taken from his MultiGarmentNet repo's lib folder.
For any doubt or concert about the code, raise an issue on this repository.