Skip to content
Official code repository for the paper "A Generative Model for People in Clothing".
Python Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
generation Add tools for rendering people conditioned on pose and shape. Jan 25, 2018
gp_tools Initial. Jul 31, 2017
.gitignore Add tools for rendering people conditioned on pose and shape. Jan 25, 2018
cm_22.png Initial. Jul 31, 2017
requirements.txt Initial. Jul 31, 2017

Generating People code repository


  • OpenCV (on Ubuntu, e.g., install libopencv-dev and python-opencv).
  • SMPL (download at and unzip to a place of your choice.
  • Edit the file to set up the paths.
  • tensorflow or tensorflow-gpu in a version >=v1.1.0 (I did not want to add it to the requirements to force installation of the GPU or non-GPU version).
  • Only if you want to run pose estimation and 3D fitting to integrate new data into the dataset: set up the unite the people repository ( and adjust its path in

The rest of the requirements is then automatically installed when running:

python develop

Setting up the data

The scripts in generation/tools/ transform the Chictopia data to construct to the final database. Iteratively go through the scripts to create it. Otherwise, download the pre-processed data from our website (, unzip it to the folder generation/data/pose/extracted and only run the last script

./ full

Training / running models

Model configuration and training artifacts are in the experiments folder. The config subfolder contains model configurations (LSM=latent sketch module, CSM=conditional sketch module, PM=portray module, PSM_class=portray module with class input). You can track the contents of this folder with git since it's lightweight and no artifacts are stored there. To create a new model, just copy template (or link to the files in it) and change in the new folder.

To run training/validation/testing use

./ [train,val,trainval,test,{sample}] experiments/config/modelname

where trainval runs a training on training+validation. Artifacts during training are written to experiments/states/modelname (you can run a tensorboard there for monitoring). The generated results from testing are stored in experiments/features/modelname/runstate, where runstate is either a training stage or point in time (if sampling). You can use the script to automatically scan for newly created training checkpoints and validating/testing them with the command

./ experiments/states/modelname [val, test]

Pre-trained models can be downloaded from .

Generating people

If you have trained or downloaded the LSM and PM models, you can use a convenience script to sample people. For this, navigate to the generation folder and run

./ n_people [out_folder]

to generate n_people to the optionally specified out_folder. If unspecified, the output folder is set to generated.


If you use this code for your research, please consider citing us:

  author    = {Christoph Lassner and Gerard Pons-Moll and Peter V. Gehler},
  title     = {A Generative Model for People in Clothing},
  year      = {2017},
  booktitle = {Proceedings of the IEEE International Conference on Computer Vision}


Our models are strongly inspired by the pix2pix line of work by Isola et al. ( Parts of the code are inspired by the implementation by Christopher Hesse ( Overall, this repository is set up similar to the Deeplab project structure, enabling efficient model specification, tracking and training ( and combining it with the advantages of Tensorboard.

You can’t perform that action at this time.