Pixel-wise Conditioning of Generative Adversarial Networks December - - PowerPoint PPT Presentation

pixel wise conditioning of generative adversarial networks
SMART_READER_LITE
LIVE PREVIEW

Pixel-wise Conditioning of Generative Adversarial Networks December - - PowerPoint PPT Presentation

Pixel-wise Conditioning of Generative Adversarial Networks December 6, 2019 1 Normandie Univ, UNIROUEN, UNIHAVRE, INSA Rouen, LITIS, 76 000 Rouen, France 2 Belgian Nuclear Research, Institute Environment, Health and Safety, Boeretang 200 - BE-2400


slide-1
SLIDE 1

Pixel-wise Conditioning of Generative Adversarial Networks

Cyprien Ruffino1 , Romain Hérault1 , Eric Laloy2 and Gilles Gasso1 December 6, 2019

1Normandie Univ, UNIROUEN, UNIHAVRE, INSA Rouen, LITIS, 76 000 Rouen, France 2Belgian Nuclear Research, Institute Environment, Health and Safety, Boeretang 200 - BE-2400 Mol,

Belgium

slide-2
SLIDE 2

Problem

Objective

  • Image reconstruction task
  • Generation under pixel

constraints

  • Motivation: applications in

geosciences Differences with inpainting

  • Very few information

(∼ 0.5%)

  • Full-size image generation
  • Unstructured information

(a) Original Image (b) Regular Inpainting (c) Pixel Constraints

1

slide-3
SLIDE 3

Generative Adversarial Networks [GPAM+14]

Two networks, a generator G and a discriminator D :

  • Generator: produces synthetic data from a random z ∼ Pz,

where Pz is a known distribution

  • Discriminator: binary classifier, tries to distinguish real samples

from fake ones min

G max D

L(D, G)= E

X∼Pr

[ log(D(X)) ] + E

z∼Pz

[ log(1−D(G(z))) ]

D G x z GAN cost

2

slide-4
SLIDE 4

Conditional GAN [MO14]

  • Conditional variant of the GANs
  • A constraint/label c is simply given as an input to both G and D
  • Works well for generating image with a class constraints

min

G max D

L(D, G)= E

X∼Pr C∼PC|X

[ log(D(X, C)) ] + E

z∼Pz C′∼PC

[ log(1−D(G(z, C′), C′)) ]

D G x z GAN cost c

3

slide-5
SLIDE 5

Constrained CGAN

Theoretical objective Explicit verification, hard-constraint on the respect of C min

G max D

L(D, G)= E

X∼Pr C∼PC|X

[ log(D(X, C)) ] + E

z∼Pz C′∼PC

[ log(1−D(G(z, C′), C′)) ] s.c. C = M(C) ⊙ G(z, C) where M(C) gives the binary mask of the constraints Problem Strictly constrained objective is non-differentiable

4

slide-6
SLIDE 6

Constrained CGAN

Theoretical objective Explicit verification, hard-constraint on the respect of C min

G max D

L(D, G)= E

X∼Pr C∼PC|X

[ log(D(X, C)) ] + E

z∼Pz C′∼PC

[ log(1−D(G(z, C′), C′)) ] s.c. C = M(C) ⊙ G(z, C) where M(C) gives the binary mask of the constraints Problem Strictly constrained objective is non-differentiable

4

slide-7
SLIDE 7

Relaxation of the constrained CGAN

Our approach Relaxation of the strict constraints by a regularization term min

G max D

Lreg(D, G) = L(D, G) + λ E

z∼Pz C∼PC

[ ∥C − M(C) ⊙ G(z, C)∥2

2

]

D G x z GAN cost c L2 cost

5

slide-8
SLIDE 8

Experiments i

Task: Hyperparameter search on λ

  • Objective: find evidence of a controllable trade-off between

quality and respect of the constraints

  • Experiments repeated 10 times each

Metrics

  • Respect of the constraints: Mean Square Error on constrained

pixels

  • Visual quality: Fréchet Inception Distance [HRU+17]:

distance between the distributions of the features of real and generated samples at the output of a deep classifier.

6

slide-9
SLIDE 9

Experiments ii

Datasets

  • MNIST and FashionMNIST
  • Split in train, validation and test sets
  • 10% of each set used to sample constraints, then discarded

Networks architecture

  • DCGAN [RMC15]-like, with only 2 convolutional/transposed

convolutional layers in D and G

7

slide-10
SLIDE 10

Results on FashionMNIST

(a) Original Image (b) Constraints (c) Generated Image (d) Satisfied Consts.

This method can generate samples that respects pixel precise constraints

8

slide-11
SLIDE 11

Results on FashionMNIST

MSE / FID relative to λ

10

1

100 101 102 103 104 lambda 0.0 0.2 0.4 0.6 0.8 MSE =0 No constraints

Conditional GAN Conditional GAN GAN

10

1

100 101 102 103 104 lambda 1000 1500 2000 2500 3000 3500 FID =0 No constraints

Conditional GAN GAN

  • The constraints seem able to enhance quality
  • From λ = 0.1 upwards, there seem to be a trade-off between

MSE and FID

9

slide-12
SLIDE 12

Results on FashionMNIST

500 1000 1500 2000 2500 3000 3500 FID 0.0 0.2 0.4 0.6 0.8 MSE =0 No constraints 10

1

100 101 102 103 104 lambda

Conditional GAN GAN

  • Trade-off clearly visible
  • Adding constraints can enhance visual quality
  • Regularization enhance both quality and respect of constraints

10

slide-13
SLIDE 13

Results on FashionMNIST

Some generated samples at λ = 1 (best ratio between quality and respect of the constraints)

11

slide-14
SLIDE 14

Conclusion

Conclusion

  • Conditional GANs can learn pixel-wise constraints
  • The L2 regularization term allows to control a trade-off between

visual quality and respect of the constraints Extensions

  • Applications on real-world datasets
  • Extension to other kind of constraints

(moments on zones, ...)

12

slide-15
SLIDE 15

Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, pages 6626–6637, 2017. Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.

13