A lightweight CycleGAN tensorflow implementation.
If you plan to use a CycleGAN model for real-world purposes, you should use the Torch CycleGAN implementation.
More lion2leopard (each classes contain only 100 instances!)
horse2zebra
horse2zebra failure
zebra2horse
wtf
More zebra2horse
apple2orange
See more in readme_imgs/
- 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>
)
- Python 3.5
- Tensorflow
- Matplotlib
- Pillow
- (Only tested on Windows so far)
- 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
- Image Pool
- Add learning reate linear decay