Giter VIP home page Giter VIP logo

image-domain-conversion-using-cyclegan's Introduction

Image domain conversion using CycleGAN

This example shows how to convert images from one domain into another using CycleGAN

CycleGAN is a GAN model that is generally used for the following purposes.

  • Style transfer (images and paintings)
  • Season conversion
  • Day / night conversion
  • Object transformation

The difference from Pix2Pix, which also perform image-image conversion, is that CycleGAN uses unsupervised learning, so there is no need for a paired image dataset. In this example, even with unsupervised learning, you can see the model convert the images by understanding whether the fruit was a whole one or a cut one.

result image result image

Requirements

MATLAB version should be R2019b and later

Usage

The repository provides the following files:

  • CycleGANExample.mlx — Example showing how to train the CycleGAN model
  • generator.m — Function to create a CycleGAN generator network
  • discriminator.m — Function to create a CycleGAN discriminator network
  • cycleGanImageDatastore.m — Datastore to prepare batches of images for training
  • cycleGAN_1000.mat - Pretrained model that converts apples to oranges and vice-versa

To run, open CycleGANExample.mlx and run the script. You can train the model or use the pretrained model by setting the doTraining flag to false.

Reference

Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks (Jun-Yan Zhu.etc, 2017)

Copyright 2019-2020 The MathWorks, Inc. Download a free MATLAB trial for Deep Learning

View Image domain conversion using CycleGAN on File Exchange

image-domain-conversion-using-cyclegan's People

Contributors

taqji avatar

Watchers

 avatar

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.