Home

Awesome

ComboGAN

This is our ongoing PyTorch implementation for ComboGAN. Code was written by Asha Anoosheh (built upon CycleGAN)

[ComboGAN Paper]

<img src="img/Inference.png" width=420/>

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

ComboGAN: Unrestrained Scalability for Image Domain Translation Asha Anoosheh, Eirikur Augustsson, Radu Timofte, Luc van Gool In Arxiv, 2017.

<br><br> <img src='img/Paintings.png' align="center" width=900> <br><br>

Prerequisites

Getting Started

Installation

git clone https://github.com/pytorch/vision
cd vision
python setup.py install
pip install visdom
pip install dominate
git clone https://github.com/AAnoosheh/ComboGAN.git
cd ComboGAN

ComboGAN training

Our ready datasets can be downloaded using ./datasets/download_dataset.sh <dataset_name>.

A pretrained model for the 14-painters dataset can be found HERE. Place under ./checkpoints/ and test using the instructions below, with args --name paint14_pretrained --dataroot ./datasets/painters_14 --n_domains 14 --which_epoch 1150.

Example running scripts can be found in the scripts directory.

python train.py --name <experiment_name> --dataroot ./datasets/<your_dataset> --n_domains <N> --niter <num_epochs_constant_LR> --niter_decay <num_epochs_decaying_LR>

Checkpoints will be saved by default to ./checkpoints/<experiment_name>/

python train.py --continue_train --which_epoch <checkpoint_number_to_load> --name <experiment_name> --dataroot ./datasets/<your_dataset> --n_domains <N> --niter <num_epochs_constant_LR> --niter_decay <num_epochs_decaying_LR>
python test.py --phase test --name <experiment_name> --dataroot ./datasets/<your_dataset> --n_domains <N> --which_epoch <checkpoint_number_to_load> --serial_test

The test results will be saved to a html file here: ./results/<experiment_name>/<epoch_number>/index.html.

Training/Testing Details

NOTE: one should not expect ComboGAN to work on just any combination of input and output datasets (e.g. dogs<->houses). We find it works better if two datasets share similar visual content. For example, landscape painting<->landscape photographs works much better than portrait painting <-> landscape photographs.