• Stars
    star
    110
  • Rank 314,940 (Top 7 %)
  • Language
    Python
  • Created over 5 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PyTorch Implementation for Unsupervised Person Image Generation with Semantic Parsing Transformation

person_generation_spt

Example

Unsupervised Person Image Generation with Semantic Parsing Transformation
(CVPR 2019, oral).

Sijie Song, Wei Zhang, Jiaying Liu, Tao Mei

Project page: http://39.96.165.147/Projects/SijieSong_cvpr19/CVPR19_ssj.html

Check out our paper and supplementary here.

Prerequisites

  • Python 2 (Python 3 should also work, but needs some modification)
  • Pytorch >= 0.4.0
  • opencv-python
  • Numpy
  • Scipy
  • Pandas
  • Skimage

Getting started

A demo model is given for appearance generation. We provide some samples in "./imgs", the parsing maps are in "./parsing".

  • Clone this repo:
git clone https://github.com/SijieSong/person_generation_spt.git

cd person_generation_spt
  • Download pre-trained models from Google Drive or Baidu Yun, put ./demo_model under ./checkpoints

  • Quick testing (modify the gpu_id in ./scripts/test_demo.sh if needed)

bash ./scripts/test_demo.sh
  • Check the results in ./results/demo_test (source image | target pose (ground truth) | output)

    Example
  • Testing a new image:

    You can test a new image with pre-defined parsing files (see the example in ./parsing). The id for each attribute label is defined as below: 0-background, 1-face, 2-hair, 3-upperclothes, 4-pants, 5-skirt, 6-leftArm, 7-rightArm, 8-leftLeg, 9-rightLeg.

Citation

If you use this code for your research, please cite our paper:

@inproceedings{song2019unsupervised,
  title={Unsupervised Person Image Generation with Semantic Parsing Transformation},
  author={Song, Sijie and Zhang, Wei and Liu, Jiaying and Mei, Tao},
  booktitle = {Proc.~IEEE Conference on Computer Vision and Pattern Recognition},
  year={2019}
}

Related projects

Contact

Sijie Song ssj940920 AT pku.edu.cn