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.
Some examples
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