Giter Club home page Giter Club logo

cyclegan-keras's Introduction

Keras implementation of CycleGAN

Implementation using a tensorflow backend. Testing and evaluation done on street view images.

Results - 256x256 pixel images

Day 2 night

Input Translation Input Translation
drawing drawing drawing drawing
drawing drawing drawing drawing

Night 2 day

Input Translation Input Translation
drawing drawing drawing drawing
drawing drawing drawing drawing

Model additions as training options

  • Identity learning (on different modulus of training iterations)
  • PatchGAN in discriminators
  • Multi-scale discriminators
  • Resize convolution in generators
  • Supervised learning with training weight
  • Data generator (if using a large dataset)
  • Weight on discriminator training labels on real images

Code usage

  1. Prepare your dataset under the directory 'data' and set dataset name to parameter 'image_folder' in CycleGAN init function.
  • Directory structure on new dataset needed for training and testing:
    • data/Dataset-name/trainA
    • data/Dataset-name/trainB
    • data/Dataset-name/testA
    • data/Dataset-name/testB
  1. Set wanted training options, also found in the init function.

  2. Train a model by:

python model.py
  1. Generate synthetic images by following specifications under:
  • generate_images/ReadMe.rtf

The following gif shows an example of the training progression in a translation from day to night.

Left: Input image. Middle: Translated images. Right: Reconstructed images. drawing


More results

Day 2 night - gif

drawing

Rainy 2 sunny - gif

drawing

Sunny 2 rainy - gif

drawing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.