- Notifications
You must be signed in to change notification settings - Fork5
hellbell/KeyPatchGan
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- This is a pytorch implementation of the paper,Unsupervised Holistic Image Generation from Key Local Patches. (ECCV 2018).
- Paper link:https://arxiv.org/abs/1703.10730 (warning: this is an old version. Latest version will be uploaded!)
- Python2 or 3
- Cuda device (NVIDIA GTX1080Ti was used to test)
- Pytorch
- Visdom (optional)
- Tensorflow & Tensorboard (optional)
Download dataset via visitingcelebA orCompCar.
For celebA dataset,
You can download usingdownload.py
> python download.py 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 them128*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 tocelebA_allbbs.mat
andcompcar_allbbs.mat
.
You can extract key patches and use your own key patches.
Run
python main.py --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.
Run
python main.py --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 optionsoutput_size
,conv_dim
, orbatch_size
to prevent out-of-memory error.