Skip to content

Lightweight CycleGAN tensorflow implementation 🦁 <-> πŸ†

Notifications You must be signed in to change notification settings

eyyub/tensorflow-cyclegan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

Lightweight CycleGAN tensorflow implementation 🦁 <-> πŸ†

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages