Condit itio ional Generativ ive Adversaria ial Networks - - PowerPoint PPT Presentation

condit itio ional
SMART_READER_LITE
LIVE PREVIEW

Condit itio ional Generativ ive Adversaria ial Networks - - PowerPoint PPT Presentation

Condit itio ional Generativ ive Adversaria ial Networks (cGANs) Prof. Leal-Taix and Prof. Niessner 1 Conditional GANs (cGANs) Gain control of output Modeling (e.g., sketch-based modeling, etc.) Add semantic meaning to latent


slide-1
SLIDE 1

Condit itio ional Generativ ive Adversaria ial Networks (cGANs)

  • Prof. Leal-Taixé and Prof. Niessner

1

slide-2
SLIDE 2

Conditional GANs (cGANs)

  • Gain control of output
  • Modeling (e.g., sketch-based modeling, etc.)

– Add semantic meaning to latent space manifold

  • Domain transfer

– Labels on A -> transfer to B, train network on ‘B’, test on B – More later

  • Prof. Leal-Taixé and Prof. Niessner

2

slide-3
SLIDE 3

GAN Manifold

  • Prof. Leal-Taixé and Prof. Niessner

3

[Radford et al. 15]

Train Data Sampled Data -> G(z)

slide-4
SLIDE 4

GAN Manifold

  • Prof. Leal-Taixé and Prof. Niessner

4

[Bojanowski et al 17]

slide-5
SLIDE 5

GAN Manifold

  • Prof. Leal-Taixé and Prof. Niessner

5

slide-6
SLIDE 6

GAN Manifold

  • Prof. Leal-Taixé and Prof. Niessner

6

[Radford et al. 15]

𝐻(𝑨0) 𝐻(𝑨1) Linear interpolation in z space: 𝐻(𝑨0 + 𝑢 ⋅ 𝑨1 − 𝑨0 )

slide-7
SLIDE 7

Conditional GANs (cGANs)

  • Prof. Leal-Taixé and Prof. Niessner

7

Slide credit Zhu

slide-8
SLIDE 8

iG iGANs: : Overv rview

  • riginal photo

projection on manifold Project Edit Transfer transition between the original and edited projection different degree of image manipulation

Editing UI

Slide credit Zhu / [Zhu et al. 16]

slide-9
SLIDE 9

iG iGANs: : Overv rview

  • riginal photo

projection on manifold Project Edit Transfer transition between the original and edited projection different degree of image manipulation

Editing UI

Slide credit Zhu / [Zhu et al. 16]

slide-10
SLIDE 10

0.196 0.238 0.332

Optimization

iG iGANs: Pro roje jectin ing an Im Image onto the Manif ifold

Input: real image 𝑦𝑆 Output: latent vector z

Generative model 𝐻(𝑨) Reconstruction loss 𝑀 Slide credit Zhu / [Zhu et al. 16]

slide-11
SLIDE 11

0.196 0.238 0.332

Optimization

iG iGANs: Pro roje jectin ing an Im Image onto the Manif ifold

Inverting Network z = 𝑄 𝑦

0.218 0.242 0.336

Auto-encoder with a fixed decoder G Input: real image 𝑦𝑆 Output: latent vector z

Slide credit Zhu / [Zhu et al. 16]

slide-12
SLIDE 12

0.196 0.238 0.332

Optimization

iG iGANs: Pro roje jectin ing an Im Image onto the Manif ifold

Inverting Network z = 𝑄 𝑦

0.218 0.242 0.336 0.153 0.167

Hybrid Method Use the network as initialization for the optimization problem

0.268

Input: real image 𝑦𝑆 Output: latent vector z

Slide credit Zhu / [Zhu et al. 16]

slide-13
SLIDE 13

iG iGANs: : Overv rview

  • riginal photo

projection on manifold Project Edit Transfer transition between the original and edited projection different degree of image manipulation

Editing UI

Slide credit Zhu / [Zhu et al. 16]

slide-14
SLIDE 14

iG iGANs: Manip ipulatin ing the Latent Vector

Objective:

𝐻(𝑨) Guidance 𝑤𝑕 𝑨0

user guidance image constraint violation loss 𝑀𝑕 Slide credit Zhu / [Zhu et al. 16]

slide-15
SLIDE 15

iG iGANs: : Overv rview

  • riginal photo

projection on manifold Project Edit Transfer transition between the original and edited projection different degree of image manipulation

Editing UI

Slide credit Zhu / [Zhu et al. 16]

slide-16
SLIDE 16

iG iGANs: : Edit it Tra ransfer

𝐻(𝑨1) 𝐻(𝑨0) Input

Motion (u, v)+ Color (𝑩𝟒×𝟓): estimate per-pixel geometric and color variation

Linear Interpolation in 𝑨 space

Slide credit Zhu / [Zhu et al. 16]

slide-17
SLIDE 17

iG iGANs: : Edit it Tra ransfer

𝐻(𝑨1) 𝐻(𝑨0) Input Linear Interpolation in 𝑨 space

Motion (u, v)+ Color (𝑩𝟒×𝟓): estimate per-pixel geometric and color variation

Slide credit Zhu / [Zhu et al. 16]

slide-18
SLIDE 18

iG iGANs: : Edit it Tra ransfer

Result

𝐻(𝑨1) 𝐻(𝑨0) Input

Motion (u, v)+ Color (𝑩𝟒×𝟓): estimate per-pixel geometric and color variation

Linear Interpolation in 𝑨 space

slide-19
SLIDE 19

cGANs: : In Interactiv ive GANs

https://github.com/junyanz/iGAN [Zhu et al. 16.]

Interactive GANs: projection to GAN embedding

  • Prof. Leal-Taixé and Prof. Niessner

19

slide-20
SLIDE 20

cGANs: : In Interactiv ive GANs

  • Prof. Leal-Taixé and Prof. Niessner

20

https://github.com/junyanz/iGAN [Zhu et al. 16.]

slide-21
SLIDE 21

cGANs: : In Interactiv ive GANs

  • Prof. Leal-Taixé and Prof. Niessner

21

https://github.com/junyanz/iGAN [Zhu et al. 16.]

slide-22
SLIDE 22

Mapping in in Latent Space is is Diff iffic icult!

  • Semantics are missing
  • In most cases, no labels available
  • Ideally, need some unsupervised disentangled rep.
  • Prof. Leal-Taixé and Prof. Niessner

22

InfoGAN [Chen et al. 16]

slide-23
SLIDE 23

Pair ired vs Unpair ired Settin ing

  • Prof. Leal-Taixé and Prof. Niessner

23

slide-24
SLIDE 24

pix ix2pix: : Im Image-to to-Image Tra ranslatio ion

slides credit: Isola / Zhu

slide-25
SLIDE 25

real or fake?

[Goodfellow et al. 2014] Discriminator

z G(z)

D

Generator

G

slides credit: Isola / Zhu

min

𝐻 max 𝐸

𝔽𝑨,𝑦 log 𝐸(𝐻 𝑨 ) + log(1 − 𝐸 𝑦 )

slide-26
SLIDE 26

real or fake?

Discriminator

x G(x)

D

Generator

G min

𝐻 max 𝐸

𝔽𝑦,𝑧 log 𝐸(𝐻 𝑦 ) + log(1 − 𝐸 𝑧 )

slides credit: Isola / Zhu

slide-27
SLIDE 27

Real!

Discriminator

x G(x)

D

Generator

G min

𝐻 max 𝐸

𝔽𝑦,𝑧 log 𝐸(𝐻 𝑦 ) + log(1 − 𝐸 𝑧 )

slides credit: Isola / Zhu

slide-28
SLIDE 28

Discriminator

x G(x)

D

Generator

G

Real too!

min

𝐻 max 𝐸

𝔽𝑦,𝑧 log 𝐸(𝐻 𝑦 ) + log(1 − 𝐸 𝑧 )

slides credit: Isola / Zhu

slide-29
SLIDE 29

min

𝐻 max 𝐸

𝔽𝑦,𝑧 log 𝐸(𝑦, 𝐻 𝑦 ) + log(1 − 𝐸 𝑦, 𝑧 )

real or fake pair ? x G(x)

G D

match joint distribution p G x , y ∼ p(x, y)

fake pair real pair

slides credit: Isola / Zhu

slide-30
SLIDE 30

Edges → Images

Input Output Input Output Input Output

Edges from [Xie & Tu, 2015]

slides credit: Isola / Zhu

slide-31
SLIDE 31

Pix ix2Pix ix: : Pair ired Settin ing

  • Great when we have ‘free’ training data
  • Often called self-supervised
  • Think about these settings 

31

slide-32
SLIDE 32

Sketches → Images

Input Output Input Output Input Output

Trained on Edges → Images

Data from [Eitz, Hays, Alexa, 2012]

slides credit: Isola / Zhu

slide-33
SLIDE 33

#edges2cats

[Christopher Hesse] Ivy Tasi @ivymyt @gods_tail @matthematician

https://affinelayer.com/pixsrv/

Vitaly Vidmirov @vvid

slides credit: Isola / Zhu

slide-34
SLIDE 34

Input Output Groundtruth Data from [maps.google.com]

slides credit: Isola / Zhu

slide-35
SLIDE 35

BW → Color

Input Output Input Output Input Output

Data from [Russakovsky et al. 2015]

slides credit: Isola / Zhu

slide-36
SLIDE 36
  • Expensive to collect pairs.
  • Impossible in many

scenarios. Label ↔ photo: per-pixel labeling

Paired

Horse ↔ zebra: how to get zebras?

slides credit: Isola / Zhu

slide-37
SLIDE 37

… … …

Paired Unpaired

slides credit: Isola / Zhu

slide-38
SLIDE 38

x G(x)

Generator

G D

No input-output pairs!

slides credit: Isola / Zhu

slide-39
SLIDE 39

Discriminator

x G(x)

D

Generator

G

Real!

slides credit: Isola / Zhu

slide-40
SLIDE 40

Discriminator

x G(x)

D

Generator

G

Real too!

GANs doesn’t force output to correspond to input

slides credit: Isola / Zhu

slide-41
SLIDE 41

mode collapse!

slides credit: Isola / Zhu

slide-42
SLIDE 42

Cycle-Consistent Adversarial Networks

[Zhu*, Park*, Isola, and Efros, ICCV 2017]

slides credit: Isola / Zhu

slide-43
SLIDE 43

Cycle-Consistent Adversarial Networks

[Mark Twain, 1903]

⋯ ⋯

[Zhu*, Park*, Isola, and Efros, ICCV 2017]

slides credit: Isola / Zhu

slide-44
SLIDE 44

Cycle Consistency Loss

G(x) F(G x ) x

F G x − x 1

[Zhu*, Park*, Isola, and Efros, ICCV 2017]

DY(G x )

Reconstruction error

slides credit: Isola / Zhu

slide-45
SLIDE 45

Cycle Consistency Loss

G(x) F(G x ) x

F G x − x 1

Large cycle loss Small cycle loss

[Zhu*, Park*, Isola, and Efros, ICCV 2017]

DY(G x )

Reconstruction error

slides credit: Isola / Zhu

slide-46
SLIDE 46

G(x) F(G x ) x F(y) G(F x ) 𝑧

Cycle Consistency Loss

F G x − x 1 G F y − 𝑧 1

[Zhu*, Park*, Isola, and Efros, ICCV 2017]

DY(G x )

Reconstruction error Reconstruction error

DG(F x )

slides credit: Isola / Zhu

slide-47
SLIDE 47

Cycle le GAN - Overv rvie iew

https://junyanz.github.io/CycleGAN/ [Zhu et al. 17.]

  • Prof. Leal-Taixé and Prof. Niessner

48

slide-48
SLIDE 48

Monet’s paintin ings → photos

slides credit: Isola / Zhu

slide-49
SLIDE 49

slides credit: Isola / Zhu

slide-50
SLIDE 50

slides credit: Isola / Zhu

slide-51
SLIDE 51

Next Lectures

  • Next Monday 24th,

– Xmas s GANs – No Lecture re

  • Jan 14th -> No lecture, but office hours
  • Next Lecture -> Jan 14th
  • We are still working on feedback for presentations – will send

around asap…

  • Keep working on the projects!
  • Prof. Leal-Taixé and Prof. Niessner

52

slide-52
SLIDE 52

See you next year r 

  • Prof. Leal-Taixé and Prof. Niessner

53