Lightweight CycleGAN tensorflow implementation 🦁 <-> πŸ†
Clone or download
Latest commit 243e586 Jul 16, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images First commit Jul 16, 2017
model First commit Jul 16, 2017
models First commit Jul 16, 2017
readme_imgs First commit Jul 16, 2017
README.md Update README.md Jul 16, 2017
build_dataset.py First commit Jul 16, 2017
cyclegan.py First commit Jul 16, 2017
example.py First commit Jul 16, 2017

README.md

tensorflow-cyclegan

A lightweight CycleGAN tensorflow implementation.

If you plan to use a CycleGAN model for real-world purposes, you should use the Torch CycleGAN implementation.

@eyyub_s

Some examples

lion2leopard (cherry-picked)

More lion2leopard (each classes contain only 100 instances!)

horse2zebra

horse2zebra failure

zebra2horse

wtf

More zebra2horse

apple2orange

See more in readme_imgs/

Build horse2zebra

  • Download horse2zebra.zip from CycleGAN datasets
  • Unzip it here .
  • Run python build_dataset.py horse2zebra/trainA horse2zebra/trainB trainA trainB
  • (make sure dataset_trainA.npy & dataset_trainB.npy are created)
  • Then, run python example.py
  • (If you want to stop and restart your training later you can do: python example.py restore <last_iter_number>)

Requiremennts

  • Python 3.5
  • Tensorflow
  • Matplotlib
  • Pillow
  • (Only tested on Windows so far)

Very useful info

  • Training took me ~1day (GTX 1060 3g)
  • Each 100 steps the script adds an image in the images/ folder
  • Each 1000 steps the model is saved in models
  • CycleGAN seems to be init-sensitive, if the generators only inverse colors: kill & re-try training

Todo

  • Image Pool
  • Add learning reate linear decay