- python 3.5
- tensorflow-gpu 1.4.0
- numpy 1.14.2
- scipy 1.0.0
Download the datasets using the following script:
$ ./download_dataset.sh facadesfacades: 400 images from the CMP Facades dataset.cityscapes: 2975 images from the Cityscapes training set.maps: 1096 training images scraped from Google Maps.horse2zebra: 939 horse images and 1177 zebra images downloaded from ImageNet using keywordswild horseandzebra.apple2orange: 996 apple images and 1020 orange images downloaded from ImageNet using keywordsappleandnavel orange.summer2winter_yosemite: 1273 summer Yosemite images and 854 winter Yosemite images were downloaded using Flickr API. See more details in our paper.monet2photo,vangogh2photo,ukiyoe2photo,cezanne2photo: The art images were downloaded from Wikiart. The real photos are downloaded from Flickr using combination of tags landscape and landscapephotography. The training set size of each class is Monet:1074, Cezanne:584, Van Gogh:401, Ukiyo-e:1433, Photographs:6853.iphone2dslr_flower: both classe of images were downlaoded from Flickr. The training set size of each class is iPhone:1813, DSLR:3316. See more details in our paper.
| RealX | fakeY | fakeY | GenerateX | RealY | ||
|---|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| apple | G_orange | apple | G_orange | apple | G_orange | ||
|---|---|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
$ python3 train.pyIf you need help
$ python3 train.py -hIf you want to continue training from the point you halted before, then set 'load_model' parameter.
$ python3 train.py --load_model path_of_your_modelyou can export model for inference
$ python3 export_graph.py --checkpoint_dir path_of_your_checkpoint --XtoY_model facadesX2Y.pb --YtoX_model facedesY2X.pb --image_size 256For example:
$ python3 inference.py --model pretrained/your_model.pb --input input.jpg --output output.jpg --image_size 256pretrained models of facades: https://github.com/jijeng/CycleGAN/releases
This project is licensed under the MIT License - see the LICENSE file for details.
- The torch implementation of CycleGAN, https://github.com/junyanz/CycleGAN
- the tensorflow implementation of CycleGAN, https://github.com/vanhuyz/CycleGAN-TensorFlow
- original paper : https://arxiv.org/abs/1703.10593









