All Projects → QianliM → Cape

QianliM / Cape

Licence: other
Official implementation of CVPR2020 paper "Learning to Dress 3D People in Generative Clothing" https://arxiv.org/abs/1907.13615

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Cape

Unsup3d
(CVPR'20 Oral) Unsupervised Learning of Probably Symmetric Deformable 3D Objects from Images in the Wild
Stars: ✭ 905 (+585.61%)
Mutual labels:  cvpr
Dispnet Flownet Docker
Dockerfile and runscripts for DispNet and FlowNet1 (estimation of disparity and optical flow)
Stars: ✭ 78 (-40.91%)
Mutual labels:  cvpr
Ghostnet
CV backbones including GhostNet, TinyNet and TNT, developed by Huawei Noah's Ark Lab.
Stars: ✭ 1,744 (+1221.21%)
Mutual labels:  cvpr
Hadoop Pot
A scalable Apache Hadoop-based implementation of the Pooled Time Series video similarity algorithm based on M. Ryoo et al paper CVPR 2015.
Stars: ✭ 8 (-93.94%)
Mutual labels:  cvpr
Awesome Cv Paper Review
计算机视觉各个方向论文速览
Stars: ✭ 57 (-56.82%)
Mutual labels:  cvpr
Deeplpf
Code for CVPR 2020 paper "Deep Local Parametric Filters for Image Enhancement"
Stars: ✭ 91 (-31.06%)
Mutual labels:  cvpr
Zooming Slow Mo Cvpr 2020
Fast and Accurate One-Stage Space-Time Video Super-Resolution (accepted in CVPR 2020)
Stars: ✭ 555 (+320.45%)
Mutual labels:  cvpr
Deep Learning For Lidar Point Clouds
Deep Learning for LiDAR Point Clouds in Autonomous Driving: A Review
Stars: ✭ 131 (-0.76%)
Mutual labels:  cvpr
Dcm Net
This work is based on our paper "DualConvMesh-Net: Joint Geodesic and Euclidean Convolutions on 3D Meshes", which appeared at the IEEE Conference On Computer Vision And Pattern Recognition (CVPR) 2020.
Stars: ✭ 75 (-43.18%)
Mutual labels:  cvpr
Papers
读过的CV方向的一些论文,图像生成文字、弱监督分割等
Stars: ✭ 99 (-25%)
Mutual labels:  cvpr
Papercrawler
Crawler used to crawl papers
Stars: ✭ 20 (-84.85%)
Mutual labels:  cvpr
Awesome Papers
a list of papers and codes in graphics, computer vision, and HCI
Stars: ✭ 50 (-62.12%)
Mutual labels:  cvpr
Dhf1k
Revisiting Video Saliency: A Large-scale Benchmark and a New Model (CVPR18, PAMI19)
Stars: ✭ 96 (-27.27%)
Mutual labels:  cvpr
Flownet2
FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
Stars: ✭ 938 (+610.61%)
Mutual labels:  cvpr
Convolutional Handwriting Gan
ScrabbleGAN: Semi-Supervised Varying Length Handwritten Text Generation (CVPR20)
Stars: ✭ 107 (-18.94%)
Mutual labels:  cvpr
Deep metric
Deep Metric Learning
Stars: ✭ 671 (+408.33%)
Mutual labels:  cvpr
Tracknpred
This is the code base for our ACM CSCS 2019 paper: "RobustTP: End-to-End Trajectory Prediction for Heterogeneous Road-Agents in Dense Traffic with Noisy Sensor Inputs". This codebase contains implementations for several trajectory prediction methods including Social-GAN and TraPHic.
Stars: ✭ 88 (-33.33%)
Mutual labels:  cvpr
Up Detr
[CVPR2021 Oral] UP-DETR: Unsupervised Pre-training for Object Detection with Transformers
Stars: ✭ 126 (-4.55%)
Mutual labels:  cvpr
Ylg
[CVPR 2020] Official Implementation: "Your Local GAN: Designing Two Dimensional Local Attention Mechanisms for Generative Models".
Stars: ✭ 109 (-17.42%)
Mutual labels:  cvpr
Exposure correction
Reference code for the paper "Learning Multi-Scale Photo Exposure Correction", CVPR 2021.
Stars: ✭ 98 (-25.76%)
Mutual labels:  cvpr

CAPE: Clothed Auto-Person Encoding (CVPR 2020)

Paper Open In Colab

Tensorflow (1.13) implementation of the CAPE model, a Mesh-CVAE with a mesh patch discriminator, for dressing SMPL bodies with pose-dependent clothing, introduced in the CVPR 2020 paper:

Learning to Dress 3D People in Generative Clothing
Qianli Ma, Jinlong Yang, Anurag Ranjan, Sergi Pujades, Gerard Pons-Moll, Siyu Tang, and Michael. J. Black
Full paper | Paper in 1 min | Paper in 4 min | New dataset | Project website

Google Colab demo

In case you do not have a suitable GPU environment to run the CAPE code, we offer a demo on Google Colab. It generates and visualizes the 3D geometry of the clothed SMPL meshes: Open In Colab

For the full demo and training, follow the next steps.

Installation

We recommend creating a new virtual environment for a clean installation of the dependencies. All following commands are assumed to be executed within this virtual environment. The code has been tested on Ubuntu 18.04, python 3.6 and CUDA 10.0.

python3 -m venv $HOME/.virtualenvs/cape
source $HOME/.virtualenvs/cape/bin/activate
pip install -U pip setuptools
  • Install PSBody Mesh package. Currently we recommend installing version 0.3.
  • Install smplx python package.
  • Download the SMPL body model, and place the .pkl files for both genders and put them in /body_models/smpl/. Follow the instructions to remove the Chumpy objects from both model pkls.
  • Then simply run pip install -r requirements.txt (do this at last to ensure numpy==1.16.2).

Quick demo

  • Download the SMPL body model as described above.
  • cd CAPE && mkdir checkpoints
  • Download our pre-trained demo model and put the downloaded folder under the checkpoints folder. Then run:
python main.py --config configs/CAPE-affineconv_nz64_pose32_clotype32_male.yaml --mode demo

It will generate a few clothed body meshes in the results/ folder and show on-screen visualization.

Process data, training and evaluation

Prepare training data

Here we assume that the CAPE dataset is downloaded. The "raw" data are stored as an .npz file per frame. We are going to pack these data into dataset(s) that can be used to train the network. For example, the following command

python lib/prep_data.py <path_to_downloaded_CAPE_dataset> --ds_name dataset_male_4clotypes --phase both

will create a dataset named dataset_male_4clotypes, both the training and test splits, under data/datasets/dataset_male_4clotypes. This dataset contains 31036 training and 5128 test examples. Similarly, setting --ds_name dataset_female_4clotypes will create the female dataset that contains 21090 training and 5441 test examples.

To customize the packed dataset, simply edit the dataset_config_dicts defined in data/dataset_configs.py for your subject / clothing type / sequences of interest.

Training

Once the dataset is packed, we are ready for training! Give a name to the experiment (will be used to save / load checkpoints and for Tensorboard etc.), specify the genders (here assume we train a male model), and run:

python main.py --config configs/config.yaml --name <exp_name> --mode train

The training will start. You can watch the training process by running Tensorboard in summaries/<exp_name>. At the end of training it will automatically evaluate on the test split and run the generation demos.

To customize the architecture and training, check the arguments defined in config_parser.py, and set them either in configs/config.yaml or directly in command line by--[some argument] <value>.

Evaluation

Change the --mode flag to demo to run the auto-encoding evaluation. It will also run the generation demos.

python main.py --config configs/config.yaml --name <exp_name> --gender <gender> --mode demo

Performance

The public release of the CAPE dataset slightly differs from what we used in the paper due to the removal of faulty / corrupted frames. Therefore we retrained our model on the dataset_male_4clotypes and dataset_female_4clotypes datasets packed as shown above, and report the performance in terms of per-vertex auto-encoding Eucledian errors (in mm).

On male dataset:

Method PCA CoMA-4* CoMA-1* CAPE CAPE-affine_conv**
error mean 7.13 ± 5.27 7.32 ± 5.57 6.50 ± 5.35 6.15 ± 5.30 6.03 ± 5.18
medians 5.79 5.85 5.02 4.64 4.54

On female dataset:

Method PCA CoMA-4 CoMA-1 CAPE CAPE-affine_conv
error mean 3.87 ± 3.02 4.38 ± 3.33 3.86 ± 3.09 3.61 ± 3.01 3.58 ± 2.94
medians 3.10 3.55 3.07 2.82 2.82

* CoMA-X stands for the model by Ranjan et al. with a spatial downsampling rate X at each downsample layer.
** CAPE-affine_conv uses an improved mesh-residual block based on the idea of this CVPR2020 paper, instead of our original mesh residual block. It achieves improved results and is faster in training. To use this layer, use the flag --affine 1 in training.

Miscellaneous notes on training

The latent space dimension used in the paper and numbers above (set by flag --nz) is 18 to balance the size of the model and performance, but at a price of losing some clothing details. Increasing the latent dimension brings significant better wrinkles and edges. We also provide the model checkpoints trained with --nz 64 --nz_cond 32 --nz_cond2 32 --affine 1, see below.

Pretrained models

Our pretrained models on the above two datasets can be downloaded here. Their corresponding configuration yaml files are already in configs/ folder, with the same name as the name of each checkpoint folder.

To run evaluation / demo from the pretrained models, put the downloaded folder(s) under the checkpoints folder, and run the evaluation command, e. g.:

python main.py --config configs/CAPE-affineconv_nz18_pose24_clotype8_male.yaml --mode demo

CAPE dataset

Together with the model, we introduce the new CAPE dataset, a large scale 3D mesh dataset of clothed humans in motion. It contains 150K dynamnic clothed human mesh registrations from real scan data, with consistent topology. We also provide precise body shape under clothing, SMPL pose parameters and clothing displacements for all data frames, as well as handy code to process the data. Check it out at our project website!

News

05/08/2020 A Google Colab demo is added!

28/07/2020 Data packing and training scripts added! Also added a few new features. Check the changelog for more details.

26/07/2020 Updated the link to the pretrained checkpoint (previous one was faulty and generates weird shapes); minor bug fixes in the group norm param loading.

License

Software Copyright License for non-commercial scientific research purposes. Please read carefully the terms and conditions and any accompanying documentation before you download and/or use the CAPE data and software, (the "Dataset & Software"), including 3D meshes, pose parameters, scripts, and animations. By downloading and/or using the Model & Software (including downloading, cloning, installing, and any other use of this github repository), you acknowledge that you have read these terms and conditions, understand them, and agree to be bound by them. If you do not agree with these terms and conditions, you must not download and/or use the Model & Software. Any infringement of the terms of this agreement will automatically terminate your rights under this License.

The SMPL body related files data/{template_mesh.obj, edges_smpl.npy} are subject to the license of the SMPL model. The PSBody mesh package and smplx python package are subject to their own licenses.

Citations

Citing this work

If you find our code / paper / data useful to your research, please consider citing:

@inproceedings{ma2020cape,
    title = {Learning to Dress 3D People in Generative Clothing},
    author = {Ma, Qianli and Yang, Jinlong and Ranjan, Anurag and Pujades, Sergi and Pons-Moll, Gerard and Tang, Siyu and Black, Michael J.},
    booktitle = {Computer Vision and Pattern Recognition (CVPR)},
    month = jun,
    year = {2020},
    month_numeric = {6}
}

Related projects

CoMA (ECCV 2018): Our (non-conditional) convolutional mesh autoencoder for modeling extreme facial expressions. The codes of the CAPE repository are based on the repository of CoMA. If you find the code of this repository useful, please consider also citing CoMA.

ClothCap (SIGGRAPH 2017): Our method of capturing and registering clothed humans from 4D scans. The CAPE dataset released with our paper incorporates the scans and registrations from ClothCap. Check out our project website for the data!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].