Skip to content

LynnHo/CycleGAN-Tensorflow-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recommendation


New

  • 2018.04.13: We modify the codes: use the newest tensorflow 1.7 API, and remove the redundancies.

  • 2017.12.22: We add a simple PyTorch implementation, see the "pytorch" folder.

CycleGAN

Tensorflow implementation of CycleGAN.

Paper: Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks Author: Jun-Yan Zhu et al.

Exemplar results on testset

  • gif: horse -> zebra
  • row 1: horse -> zebra -> reconstructed horse, row 2: zebra -> horse -> reconstructed zebra
  • row 1: apple -> orange -> reconstructed apple, row 2: orange -> apple -> reconstructed orange

Prerequisites

  • tensorflow r1.7
  • python 2.7

Usage

cd CycleGAN-Tensorflow-PyTorch-master

Download Datasets

  • Download the horse2zebra dataset:
sh ./download_dataset.sh horse2zebra
  • Download the apple2orange dataset:
sh ./download_dataset.sh apple2orange
  • See download_dataset.sh for more datasets

Train Example

CUDA_VISIBLE_DEVICES=0 python train.py --dataset=horse2zebra

Test Example

CUDA_VISIBLE_DEVICES=0 python test.py --dataset=horse2zebra