15
Conditional Generation by GAN 李宏毅 Hung-yi Lee

Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Embed Size (px)

Citation preview

Page 1: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Conditional Generation by GAN李宏毅

Hung-yi Lee

Page 2: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Target of NN output

Text-to-Image

• Traditional supervised approach

NN Image

Text: “train”

a dog is running

a bird is flying

A blurry image!

c1: a dog is running

as close as possible

Page 3: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Conditional GAN

D (original)

scalar𝑥

G𝑧Normal distribution

x = G(c,z)c: train

x is real image or not

Image

Real images:

Generated images:

1

0

Generator will learn to generate realistic images ….

But completely ignore the input conditions.

[Scott Reed, et al, ICML, 2016]

Page 4: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Conditional GAN

D (better)

scalar𝑐

𝑥

True text-image pairs:

G𝑧Normal distribution

x = G(c,z)c: train

Image

x is realistic or not + c and x are matched or not

(train , )

(train , )(cat , )

[Scott Reed, et al, ICML, 2016]

1

00

Page 5: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

x is realistic or not + c and x are matched or not

Conditional GAN - Discriminator

[Takeru Miyato, et al., ICLR, 2018]

[Han Zhang, et al., arXiv, 2017]

[Augustus Odena et al., ICML, 2017]

condition c

object x

NetworkNetwork

Network

score

Network

Network

(almost every paper)

condition c

object x

c and x are matched or not

x is realistic or not

Page 6: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Conditional GAN

paired data

blue eyesred hairshort hair

Collecting anime faces and the description of its characteristics

red hair,green eyes

blue hair,red eyes

The images are generated by Yen-Hao Chen, Po-Chun Chien, Jun-Chen Xie, Tsung-Han Wu.

Page 7: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Stack GAN

Han Zhang, Tao Xu, Hongsheng

Li, Shaoting Zhang, Xiaogang Wang, Xiaolei

Huang, Dimitris Metaxas, “StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks”, ICCV, 2017

Page 8: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Image-to-image

https://arxiv.org/pdf/1611.07004

G𝑧

x = G(c,z)𝑐

Page 9: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

as close as possible

Image-to-image

• Traditional supervised approach

NN Image

It is blurry because it is the average of several images.

Testing:

input close

Page 10: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Image-to-image

• Experimental results

Testing:

input close GAN

G𝑧

Image D scalar

GAN + close

Page 11: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Patch GAN

D

score

D D

score score

https://arxiv.org/pdf/1611.07004.pdf

Page 12: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Speech Enhancement

• Typical deep learning approach

Noisy Clean

G Output

Using CNN

Page 13: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Speech Enhancement

• Conditional GAN

G

D scalar

noisy output clean

noisy clean

output

noisy

training data

(fake pair or not)

Page 14: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

Video Generation

Generator

Discriminator

Last frame is real or generated

Discriminator thinks it is real

target

Minimize distance

Page 15: Conditional Generation by GAN - speech.ee.ntu.edu.twspeech.ee.ntu.edu.tw/~tlkagk/courses/MLDS_2018/Lecture/CGAN.pdf · Conditional GAN paired data blue eyes red hair short hair Collecting

https://github.com/dyelax/Adversarial_Video_Generation