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

16 Downloads

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.

日本語
==
この例では、CycleGANを使用して、あるドメインから別のドメインに画像を変換する方法を紹介しています。
CycleGANは、一般的に以下のような目的で使用されているGANモデルです。
・スタイルの変換(画像や絵画)
・季節の変換
・昼夜変換
・物体の種類変換
同じく画像-画像変換を行うPix2Pixとの違いは、CycleGANは教師なし学習を利用しているため、ペア画像のデータセットが不要であることです。この例では、教師なし学習でも、果物が丸ごとなのかカットされたものなのかを理解して画像変換を行っていることがわかります。

[Keyword]
画像処理・IPCVデモ・ディープラーニング・深層学習・画像変換・コンピュータビジョン・ニューラルネットワーク・人工知能・敵対的生成ネットワーク

Cite As

Takuji Fukumoto (2020). Image domain conversion using CycleGAN (https://github.com/matlab-deep-learning/Image-domain-conversion-using-CycleGAN/releases/tag/v1.0), 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 (https://www.mathworks.com/help/deeplearning/ug/train-generative-adversarial-network.html) 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!