File Exchange

image thumbnail

Image domain conversion using CycleGAN

version 1.0 (4.58 MB) by Takuji Fukumoto
MATLAB example of deep learning for image domain conversion


Updated 11 Jun 2020

GitHub view license on GitHub

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.



Cite As

Takuji Fukumoto (2020). Image domain conversion using CycleGAN (, GitHub. Retrieved .

Comments and Ratings (3)

Ruokai Lin

Yuanlong Zhang

Hi Takuji,
Thanks for your sharing! I tried the code and find it worked smoothly. However, I find you do not update State properties of generators and discriminators after running dlfeval to calculate the gradients, which seems different from other matlab deep learning models. For example, the official tutorial of GAN in matlab ( updates the State property for generator, but not in discriminator. Could you please comment on that? Thanks

Ryunosuke Takagi

MATLAB Release Compatibility
Created with R2020a
Compatible with R2019b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!