Skip to content

Fully working keras implementation of cycleGAN in Python

Notifications You must be signed in to change notification settings

d1ggs/cycleGAN-keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cycleGAN-keras

Fully working keras implementation of cycleGAN in Python, realized during internship at University of Parma's IMPLab .

[ CycleGAN Authors' repository - CycleGAN paper ]

Usage

To download toy example datasets (check available datasets here) use the datasets script:

sh datasets.sh dataset_name

To enable faster image loading into the network you can use hdf5 format by setting use_hdf5=True in train function in cycleGAN.py.

To build .hdf5 datsets use the make_dataset script in datasets folder:

python3 make_dataset.py dataset_path number_of_channels

For those with limited GPU resources, I suggest downscaling the images through the --img_size argument (square images are input and output of the network).

To train the network: python3 cycleGAN.py

At the end of each epoch a sample image of predictions on test images is output into ./images folder, along with the losses plots.

Dependencies

  • Python 3
  • Tensorflow 1.2 or greater
  • Keras 2.1.2
  • keras-contrib
  • h5py
  • glob
  • tqdm

Samples

horse2zebra

144-horse2zebra

cityscapes

198_cityscapes_resnet

maps

195_maps_resnet

Credits

Keras residual block implementation by Richard Higgins

About

Fully working keras implementation of cycleGAN in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published