• Non ci sono risultati.

Generative Adversarial Networks (GANs)

N/A
N/A
Protected

Academic year: 2021

Condividi "Generative Adversarial Networks (GANs)"

Copied!
80
0
0

Testo completo

(1)

Generative Adversarial Networks (GANs)

By: Ismail Elezi ismail.elezi@gmail.com

(2)

Supervised Learning vs Unsupervised Learning

(3)

Supervised Learning vs Unsupervised Learning

(4)

Supervised Learning vs Unsupervised Learning

(5)

Supervised Learning vs Unsupervised Learning

(6)

Supervised Learning vs Unsupervised Learning

(7)

Supervised Learning vs Unsupervised Learning

(8)

Supervised Learning vs Unsupervised Learning

(9)

Supervised Learning vs Unsupervised Learning

(10)
(11)
(12)

Generative Adversarial Networks

(13)

Generative Adversarial Networks

Credit: Thilo Stadelmann

(14)

Minimax Game on GANs

(15)

Minimax Game on GANs

(16)

Minimax Game on GANs

(17)

Minimax Game on GANs

(18)

Minimax Game on GANs

(19)

Alternative Cost Function

(20)

GAN Training Algorithm

Ian Goodfellow et al, Generative Adversarial Networks, NIPS 2014

(21)
(22)
(23)
(24)
(25)

Generating Digits

https://github.com/TheRevanchist/Generative_Adversarial_Networks/tree/master/gan

(26)

Conditional GANs

What if we want to generate only images of one particular class.

Idea: Give the labels of the classes (in one-hot format) to both the generator and discriminator.

For the generator concatenate the noise coming from latent space with the one hot vector. Similarly, the discriminator receives in input both the image and its label.

(27)

Conditional GANs

Mirza and Osindero, Conditional Generative Adversarial Networks, NIPS 2014

(28)
(29)
(30)

Generating Digits

https://github.com/TheRevanchist/Generative_Adversarial_Networks/tree/master/cgan

(31)

Any idea how to improve GANs?

(32)

Deep Convolutional GANs (DCGAN)

Radford, Metz and Chintala, Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks, ICLR 2016

(33)

Deep Convolutional GANs (DCGAN)

Radford, Metz and Chintala, Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks, ICLR 2016

(34)
(35)
(36)
(37)

Deep Convolutional GANs (DCGAN)

Radford, Metz and Chintala, Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks, ICLR 2016

(38)

Radford, Metz and Chintala, Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks, ICLR 2016

(39)

However, During Training

(40)

Mode Collapse

https://github.com/TheRevanchist/Generative_Adversarial_Networks/tree/master/dcgan

(41)

Possible Fixes to Mode Collapse

-  (Not scientific) Soft labeling, instead of giving to the discriminator labels 1/0, give to it 0.8/0.2

-  (Definitely not scientific) Checkpoint the net, and every time mode collapse occurs, load the net from the previous checkpoint.

-  (A bit more scientific) LSGAN, other types of cost functions.

-  (Scientific) Wasserstein GAN

-  (Even more scientific) Improved Wasserstein GAN, Dirac Gan etc

(42)

The GAN Zoo

https://github.com/hindupuravinash/the-gan-zoo

(43)

Does it Really Matter?!

Lucic et al, Are GANs Created Equal? A Large-Scale Study, NIPS 2018

(44)

Goodfellow, CVPR tutorial, 2018

(45)

Goodfellow, CPVP tutorial, 2018

(46)

Goodfellow, CPVP tutorial, 2018

(47)

Goodfellow, CPVP tutorial, 2018

(48)

GANs for Time Series

Hyland et al, Real-valued (medical) time series generation with recurrent conditional GANs, arXiv 2017

(49)

Efros, ICCV tutorial, 2017

(50)

Efros, ICCV tutorial, 2017

(51)
(52)
(53)
(54)
(55)
(56)
(57)
(58)
(59)
(60)
(61)
(62)
(63)
(64)
(65)

For much more look at: https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix

(66)
(67)

My GAN-story

(68)

Problems

1)  Our images are 2000 x 2000. At 700 (+ delta) by 700 (+delta) images, even a VOLTA V100 runs out of memory

(69)

Problems

1)  Our images are 2000 x 2000. At 700 by 700 images, even a VOLTA V100 runs out of memory

- Solution 1: train in patches, generate large images.

(70)

Problems

1)  Our images are 2000 x 2000. At 700 by 700 images, even a VOLTA V100 runs out of memory

- Solution 1: train in patches, generate large images. It doesn’t work.

(71)

Problems

1)  Our images are 2000 x 2000. At 700 by 700 images, even a VOLTA V100 runs out of memory

- Solution 1: train in patches, generate large images. It doesn’t work.

- Solution 2: make the nets more efficient. Train on float16 (NVIDIA Apex) and use gradient checkpointing.

(72)

Problems

1)  Our images are 2000 x 2000. At 700 by 700 images, even a VOLTA V100 runs out of memory

- Solution 1: train in patches, generate large images. It doesn’t work.

- Solution 2: make the nets more efficient. Train on float16 (NVIDIA Apex) and use gradient checkpointing. It works.

(73)

Digression: Half precision training

(74)

Digression: Gradient Checkpointing

(75)

Digression: Gradient Checkpointing

(76)

Digression: Gradient Checkpointing

(77)

Digression: Gradient Checkpointing

https://github.com/TheRevanchist/pytorch-CycleGAN-and-pix2pix

(78)

Problems

1)  Our images are 2000 x 2000. At 700 by 700 images, even a VOLTA V100 runs out of memory

- Solution 1: train in patches, generate large images. It doesn’t work.

- Solution 2: make the nets more efficient. Train on float16 (NVIDIA Apex) and use gradient checkpointing. It works.

2)  Bigger images, less likely that we will be able to generate meaningful images (mode collapse)

(79)

Problems

1)  Our images are 2000 x 2000. At 700 by 700 images, even a VOLTA V100 runs out of memory

- Solution 1: train in patches, generate large images. It doesn’t work.

- Solution 2: make the nets more efficient. Train on float16 (NVIDIA Apex) and use gradient checkpointing. It works.

2)  Bigger images, less likely that we will be able to generate meaningful images (mode collapse)

- Solution 1: more careful training and hyperparameter optimization.

- Solution 2: different loss functions, maybe Wasserstein GANs (or the improved version of it), researchy stuff.

- Solution 3: progressive training and/or BigGan-inspired approach.

(80)

Thank You!

Riferimenti

Documenti correlati

Most current deep learning based single image super- resolution (SISR) methods focus on designing deeper / wider models to learn the non-linear mapping between low- resolution

10, for each compressed set, we show the contribu- tion of each statistical estimators (mean, standard deviation, Kurtosis, Skewness, Kolmogorov distance, and correlation)

[r]

• We don’t care about the actual distribution of data, we just want to produce images as similar as possible to the real ones?. • The model of the PDF exists, but it’s

Even a more focused search using the terms “miRNA and development” displays almost 24,000 

I musei della città di Treviso, anche se non presenti all’interno del territorio considerato, possono farne parte, in quanto porzione del sistema

Our model uses an energy based generative adversarial network (EBGAN) (see Section 3.2) to address the stabilization problems of adversarial training of GAN and two encoder networks

11 years old) treated with denosumab for spinal ABCs where embolization failed, and reported healing of the lesion after 4 months of treatment with regression of the