MISC: Multi-condition injection and spatially-adaptive compositing for conditional person rendering (unofficial)
This is the author's unofficial PyTorch MISC implementation.
We present MISC (Multi-condition Injection and Spatially-adaptive Compositing), an end-to-end trainable deep neural network for conditional person image synthesis. MISC includes a conditional person generation model and a spatially-adaptive image composition model.
Given attribute (color condition), segmentation mask (geometry condition), Gaussian noise (texture condition), and background image, our model could generate the specified person in user-designated image position.
- Python 3.6
- PyTorch 1.0
- NVIDIA GPU + CUDA cuDNN
Clone this repo:
git clone https://github.com/shuchenweng/MISC.git
Install PyTorch and dependencies from http://pytorch.org
Install other python requirements
We process the VIP person parsing dataset for evaluation. We annotate persons in VIP with 120 attribute classes, and crop the images in VIP to keep one major person in each image. We create the training and test splits, with 42K and 6K images, respectively.
Download the proccessed VIP dataset and copy them under DATA_DIR.
Download the pre-trained weights and copy them under PRETRAINED_DIR.
Setting the MODEL_DIR as the storage directory for generated experimental results.
These directory parameters could be found in cfg/test_SC.yml and cfg/train_SC.yml.
python main.py --cfg train_SC.yml
python main.py --cfg test_SC.yml
Licensed under a Creative Commons Attribution-NonCommercial 4.0 International.
Except where otherwise noted, this content is published under a CC BY-NC license, which means that you can copy, remix, transform and build upon the content as long as you do not use the material for commercial purposes and give appropriate credit and provide a link to the license.
If you use this code for your research, please cite our papers MISC: Multi-condition Injection and Spatially-adaptive Compositing for Conditional Person Image Synthesis
@InProceedings{Weng_2020_CVPR,
author = {Weng, Shuchen and Li, Wenbo and Li, Dawei and Jin, Hongxia and Shi, Boxin},
title = {MISC: Multi-Condition Injection and Spatially-Adaptive Compositing for Conditional Person Image Synthesis},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020}
}