# cycleGAN-keras **Repository Path**: yang20072845/cycleGAN-keras ## Basic Information - **Project Name**: cycleGAN-keras - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-07-02 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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

Samples

horse2zebra

![144-horse2zebra](https://user-images.githubusercontent.com/24715359/48908870-ea066880-ee6b-11e8-905c-47c4278f1c14.png)

cityscapes

![198_cityscapes_resnet](https://user-images.githubusercontent.com/24715359/48908826-c511f580-ee6b-11e8-9669-b58685e7171f.png)

maps

![195_maps_resnet](https://user-images.githubusercontent.com/24715359/48908829-c6432280-ee6b-11e8-9cf0-cc3286878fa6.png)

Credits

Keras residual block implementation by Richard Higgins