Skip to content
[ECCV 2018] Unsupervised Holistic Image Generation from Key Local Patches
Branch: master
Clone or download
Latest commit eddee13 Sep 13, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Mar 17, 2018
options modified Mar 21, 2018
utils add tensorboard logger Mar 16, 2018
.gitignore Update Sep 13, 2018
compcar_allbbs.mat major update Mar 14, 2018

[ECCV 2018] A PyTorch implementation of Patch2Image

  • This is a pytorch implementation of the paper, Unsupervised Holistic Image Generation from Key Local Patches. (ECCV 2018).
  • Paper link: (warning: this is an old version. Latest version will be uploaded!)


alt text

Examples (Faces)

alt text

Examples (Cars)

alt text


  • Python2 or 3
  • Cuda device (NVIDIA GTX1080Ti was used to test)
  • Pytorch
  • Visdom (optional)
  • Tensorflow & Tensorboard (optional)

Preparing dataset

Download dataset via visiting celebA or CompCar.

For celebA dataset,

You can download using

> python celebA

For compcar dataset, Download the entire compcar dataset and some pre-processing is required.

You should crop the car patches using the ground truth bounding boxes, resize them 128*128 resolution, and save them in a single directory.


We already extracted key patches from celebA and compcar dataset and save the bounding box coordinates to celebA_allbbs.mat and compcar_allbbs.mat.

You can extract key patches and use your own key patches.

Training celebA dataset


python --db_name=celebA --dataset_root=YOUR_DATA_ROOT --is_crop=True --image_size=108 --output_size=64 --model_structure=unet

The resolution of output image can be enlarged by --output_size=128 or --output_size=256 options.

Training compcar dataset


python --db_name=compcar --dataset_root=YOUR_DATA_ROOT --is_crop=False --image_size=128 --output_size=128 --conv_dim=64  --batch_size=32 --model_structure=unet


Modify the options output_size, conv_dim, or batch_size to prevent out-of-memory error.

You can’t perform that action at this time.