SlideShare a Scribd company logo
1 of 126
Download to read offline
Generative Adversarial Network
Presented by Mohammad Khalooei
PhD student of Amirkabir University of Technology (Tehran Polytecnic)
Under supervision of Prof. Mohammad Mehdi Homayounpour & Dr. Maryam Amirmazlaghani
Laboratory of Intelligence and Multimedia Processing (LIMP)
http://ceit.aut.ac.ir/~khalooei
khalooei [at] aut.ac.ir
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 1
Generative Adversarial Network
Presented by Mohammad Khalooei
PhD student of Amirkabir University of Technology (Tehran Polytecnic)
Under supervision of Prof. Mohammad Mehdi Homayounpour & Dr. Maryam Amirmazlaghani
Laboratory of Intelligence and Multimedia Processing (LIMP)
http://ceit.aut.ac.ir/~khalooei
khalooei [at] aut.ac.ir
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 2
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 3
GAN Zoo!
https://github.com/hindupuravinash/the-gan-zoo
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 4
Best paper statistic from CVPR 2018
Are GANs the new Deep?
http://jponttuset.cat/are-gans-the-new-deep/
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 5
Best paper statistic from CVPR 2018
The most important one, in my opinion, is adversarial
training (also called GAN for Generative Adversarial
Networks).
https://medium.com/syncedreview/cvpr-2018-kicks-off-best-papers-announced-d3361bcc6984
Yann LeCun
More than eight percent of CVPR 2018’s
accepted papers include “GANs”
in their titles,
doubling the frequency at CVPR 2017.
Google AI Research Scientist Jordi Pont-Tuset suggested
in his blog that Generative Adversarial Networks (GANs)
might catch up with deep learning someday. Jordi Pont-Tuset
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 6
A brief Applications of GAN :: overview on CVPR18 paper
• Perceptual Fidelity
• Data Augmentation
• Adversarial Attack
• Domain Adaptation
• Improved GAN
• Metric Learning
Categories:
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 7
GAN !
https://goo.gl/oCdBRj
https://goo.gl/ibYzBr
Supervised learning
• Find deterministic function f
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 8
Introduction
x : data
y : label
f : y = f(x)
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 9
Introduction
x : data
y : label
f : y = f(x)
3×224×224
224 px
224 px
R
G
B
= 150528
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 10
Introduction
x : data
y : label
f : y = f(x)
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 11
Introduction
x : data
y : label
f : y = f(x)
All pixels change when the camera moves !
http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 12
Introduction
x : data
y : label
f : y = f(x)
http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 13
Introduction
x : data
y : label
f : y = f(x)
http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 14
Introduction
x : data
y : label
f : y = f(x)
http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 15
Introduction
x : data
y : label
f : y = f(x)
http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 16
Introduction
x : data
y : label
f : y = f(x)
http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 17
Introduction
x : data
y : label
f : y = f(x)
• Solution:
- Feature Vector
3×224×224
224 px
224 px
R
G
B
= 150528 2048
Feature extractor
Supervised learning
• Find deterministic function f
• Challenges:
- Image is high dimensional data
- Many variations
Viewpoint, illumination, deformation,
occlusion, background clutter,
intraclass variation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 18
Introduction
x : data
y : label
f : y = f(x)
• Solution:
- Feature Vector :: Synonyms
Latent Vector
Hidden Vector
Unobservable Vector
Feature
Representation
Supervised learning
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 19
Introduction
f : y = f(x)
Good Bad
Supervised learning
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 20
Introduction
f : y = f(x)
Good features:
Less redundancy
Similar features for similar data
High fidelity
Good Bad
Supervised learning
• More flexible solution
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 21
Introduction
x : data
y : label
f : y = f(x)
Cat
Supervised learning
• More flexible solution
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 22
Introduction
x : data
y : label
f : y = f(x)
0.87 Cat
0.22 Dog
0.01 Cake
Supervised learning
• More flexible solution
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 23
Introduction
x : data
y : label
f : y = f(x)
0.87 Cat
0.22 Dog
0.01 Cake
UnSupervised learning
• Find deterministic function f
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 24
Introduction
x : data
z : latent
f : z = f(x)
Similaritymeasure
UnSupervised learning
• Find deterministic function f
• More challenging than supervised learning !
• No label or curriculum → self learning
• Some NN solutions :
• Boltzmann machine
• Auto-encoder or Variational Inference
• Generative Adversarial Network
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 25
Introduction
x : data
z : latent
f : z = f(x)
Generative model
• Find generation function g
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 26
Introduction
x : data
z : latent
g : x = g(z)
Generative model
• Find generation function g
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 27
Introduction
x : data
z : latent
g : x = g(z)
UnSupervised learning
• Find deterministic function f
x : data
z : latent
f : z = f(x)
VS.
Generative model
• Find generation function g
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 28
Introduction
x : data
z : latent
g : x = g(z)
UnSupervised learning
• Find deterministic function f
x : data
z : latent
f : z = f(x)
VS.
P(z|x)
P(x|z)
Generative model
• Find generation function g
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 29
Introduction
x : data
z : latent
g : x = g(z)
UnSupervised learning
• Find deterministic function f
x : data
z : latent
f : z = f(x)
VS.
P(z|x)
P(x|z)
Encod
er
Decoder
(Generator)
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 30
Generative Modeling
Sample GeneratorTraining Data
Training Data Density function
Sample Generation
Density Estimation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 31
AutoEncoder
http://curiousily.com/data-science/2017/02/02/what-to-do-when-data-is-missing-part-2.html
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 32
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• …
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 33
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• …
Sample Code:
https://github.com/buriburisuri/sugartensor/blob/master/sugart
ensor/example/mnist_sae.py
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 34
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• …
Sample Code:
https://github.com/buriburisuri/sugartensor/blob/master/sugart
ensor/example/mnist_dae.py
Mohammad Khalooei | khalooei@aut.ac.ir 35
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• … • Based on Variational approximation
• Kingma et al, “Auto-Encoding Variational Bayes”, 2013
Generative Adversarial Network
Train
ing
phases
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 36
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• … • Based on Variational approximation
• Kingma et al, “Auto-Encoding Variational Bayes”, 2013
Generating phases
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 37
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• … • Based on Variational approximation
• Kingma et al, “Auto-Encoding Variational Bayes”, 2013
• Reparameterization trick
• Enable back propagation
• Reduce variances of gradients
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 38
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• … • Based on Variational approximation
• Kingma et al, “Auto-Encoding Variational Bayes”, 2013
• Reparameterization trick
• Enable back propagation
• Reduce variances of gradients
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 39
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• … • Based on Variational approximation
• Kingma et al, “Auto-Encoding Variational Bayes”, 2013
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 40
AutoEncoder
• Family of AE:
• Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x))
• Denoising autoencoder (DAE) :: Add random noise to input data
• Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder
• …
(Namjukim – 2017) (Namjukim – 2017)
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 41
Review …
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 42
Review:: Generative Model
https://www.slideshare.net/BrianKim244/dcgan-77452250
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 43
Review:: Generative Model
https://www.slideshare.net/BrianKim244/dcgan-77452250
Distribution of the actual images
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 44
Review:: Generative Model
https://www.slideshare.net/BrianKim244/dcgan-77452250
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 45
Review:: Generative Model
https://www.slideshare.net/BrianKim244/dcgan-77452250
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 46
Review:: Generative Model
https://www.slideshare.net/BrianKim244/dcgan-77452250
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 47
Review:: Generative Model
https://www.slideshare.net/BrianKim244/dcgan-77452250
Distribution of the actual images
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 48
Contents
o Machine learning
o Supervised learning
o Unsupervised learning
o Generative vs. Discriminative models
o Generative Adversarial Network
o Introduction
o Definition
o Challenges
o Applications
o Tricks for training
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 49
Adversarial Nets :: Introduction
Ian Goodfellow et al, “Generative
Adversarial Networks”, 2014
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 50
Adversarial Nets :: Definition
https://techcrunch.com/2017/06/20/gangogh
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 51
Adversarial Nets :: Definition
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 52
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 53
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 54
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 55
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 56
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 57
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 58
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 59
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 60
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 61
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 62
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 63
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 64
Adversarial Nets :: Definition
Tries to
generates
more real-
likefake bills
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 65
Adversarial Nets :: Definition
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 66
Adversarial Nets :: Definition
Tries tocatchfake
bills
Penalty if failure
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 67
Adversarial Nets :: Definition
https://github.com/dmonn/GAN-face-generator
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 68
Adversarial Nets :: Definition
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 69
Adversarial Nets :: Framework
(Goodfellow et al., 2014)
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 70
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 71
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 72
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 73
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 74
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 75
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 76
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 77
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 78
AutoEncoder :
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 79
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 80
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 81
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 82
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 83
• Different distance metrics :
KL-divergence
JS-divergence
Earth-mover distance (Wasserstein distance)
Total variation distance
Hellinger distance
Mahalanobis distance
Bhattacharyya distance
Energy distance
…
• Pure GAN’s measure for difference ::
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 84
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 85
Namjukim - 2017
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 86
Namjukim - 2017
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 87
GAN ideas (review intuitive papers)
https://carpedm20.github.io/faces/ https://github.com/carpedm20/DCGAN-tensorflow
DCGAN Deep convolutional generative adversarial network (DCGAN)
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 88
GAN ideas (review intuitive papers)
Vector space arithmetic
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 89
GAN ideas (review intuitive papers)
Vector space arithmetic
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 90
GAN ideas (review intuitive papers)
Super-Resolution
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 91
GAN ideas (review intuitive papers)
Super-Resolution
https://www.youtube.com/watch?v=9c4z6YsBGQ0
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 92
GAN ideas (review intuitive papers)
Conditional Generative Adversarial Network
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 93
GAN ideas (review intuitive papers)
Invertible Conditional GANs for image editing
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 94
GAN ideas (review intuitive papers)
Image to Image translation with conditional generative networks
https://phillipi.github.io/pix2pix/
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 95
GAN ideas (review intuitive papers)
Image to Image translation with conditional generative networks
https://phillipi.github.io/pix2pix/
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 96
GAN ideas (review intuitive papers)
Image to Image translation with conditional generative networks
https://phillipi.github.io/pix2pix/
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 97
GAN ideas (review intuitive papers)
Image to Image translation with conditional generative networks
https://phillipi.github.io/pix2pix/
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 98
GAN ideas (review intuitive papers)
Cycle GAN
F(G(X)) ≈ X
G: X → Y
F: Y → X
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 99
GAN ideas (review intuitive papers)
Cycle GAN
F(G(X)) ≈ X
G: X → Y
F: Y → X
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 100
GAN ideas (review intuitive papers)
Cycle GAN
F(G(X)) ≈ X
G: X → Y
F: Y → X
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 101
GAN ideas (review intuitive papers)
Cycle GAN
F(G(X)) ≈ X
G: X → Y
F: Y → X
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 102
GAN ideas (review intuitive papers)
Cycle GAN
F(G(X)) ≈ X
G: X → Y
F: Y → X
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 103
GAN ideas (review intuitive papers)
Cycle GAN
F(G(X)) ≈ X
G: X → Y
F: Y → X
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 104
GAN ideas (review intuitive papers)
Cycle GAN
F(G(X)) ≈ X
G: X → Y
F: Y → X
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 105
GAN ideas (review intuitive papers)
Unsupervised cross-domain image generation
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 106
GAN ideas (review intuitive papers)
Denoising GAN
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 107
GAN ideas (review intuitive papers)
Review:: Super resolution (SRGAN)
https://github.com/zsdonghao/SRGAN
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 108
GAN ideas (review intuitive papers)
Text to Image
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 109
GAN ideas (review intuitive papers)
Text to Image
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 110
GAN ideas (review intuitive papers)
MoCoGAN: Decomposing Motion and Content for Video Generation
https://github.com/sergeytulyakov/mocogan
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 111
GAN ideas (review intuitive papers)
MoCoGAN: Decomposing Motion and Content for Video Generation
https://github.com/sergeytulyakov/mocogan
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 112
GAN ideas (review intuitive papers)
ALOCC :: Adversarially Learned One-Class Classifier for Novelty Detection
https://github.com/khalooei/ALOCC-CVPR2018
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 113
GAN ideas (review intuitive papers)
ALOCC :: Adversarially Learned One-Class Classifier for Novelty Detection
https://github.com/khalooei/ALOCC-CVPR2018
• Converging
• Mode collapse
• Counting
…
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 114
GAN challenges
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 115
GAN’s Applications
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 116
GAN’s Applications
3.5 Years of Progress on Faces
(Brundage et al, 2018) (Goodfellow 2018)
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 117
GAN’s Applications
(Brundage et al, 2018) (Goodfellow 2018)
< 2 Years of Progress on Faces
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 118
GAN’s Applications
(Zhang et al., 2018) (Goodfellow 2018)
Self-Attention GAN
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 119
GAN’s Applications
(Goodfellow 2018)
Some intuitive:
Depth and Convolution
Class-conditional generation
Spectral Normalization
Hinge loss
Two-timescale update rule
Self-attention
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 120
GAN’s Applications
(Goodfellow 2018)
Some intuitive:
Depth and Convolution
Class-conditional generation
Hinge loss
Two-timescale update rule
Self-attention
No Convolution Needed to Solve Simple Tasks
Original GAN, 2014
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 121
GAN’s Applications
(Goodfellow 2018)
Some intuitive:
Depth and Convolution
Class-conditional generation
Hinge loss
Two-timescale update rule
Self-attention
Class-Conditional GANs
(Mirza and Osindero, 2014)
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 122
GAN’s Applications
(Goodfellow 2018)
Some intuitive:
Depth and Convolution
Class-conditional generation
Hinge loss
Two-timescale update rule
Self-attention
Class-Conditional GANs
(Odena et al, 2016)
AC-GAN: Specialist Generators
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 123
GAN’s Applications
(Goodfellow 2018)
Some intuitive:
Depth and Convolution
Class-conditional generation
Hinge loss
Two-timescale update rule
Self-attention
(Miyato et al, 2017)
Class-Conditional GANs
SN-GAN: Shared Generator
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 124
GAN’s Applications
(Goodfellow 2018)
Some intuitive:
Depth and Convolution
Class-conditional generation
Hinge loss
Two-timescale update rule
Self-attention
(Miyato et al 2017, Lim and Ye 2017, Tran et al 2017)
Hinge Loss
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 125
GAN’s Applications
(Goodfellow 2018)
Some intuitive:
Depth and Convolution
Class-conditional generation
Hinge loss
Two-timescale update rule
Self-attention
Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 126
Thank you!
Mohammad Khalooei
Mkhalooei [at] gmail.com
Khalooei [at] aut.ac.ir
https://ceit.aut.ac.ir/~khalooei

More Related Content

Similar to Generative Adversarial Network

Similar to Generative Adversarial Network (6)

Open Web Data for Education - Linked Data technologies for connecting open ed...
Open Web Data for Education - Linked Data technologies for connecting open ed...Open Web Data for Education - Linked Data technologies for connecting open ed...
Open Web Data for Education - Linked Data technologies for connecting open ed...
 
Machine learning – 101
Machine learning – 101Machine learning – 101
Machine learning – 101
 
RDAP 15: You’re in good company: Unifying campus research data services
RDAP 15: You’re in good company: Unifying campus research data servicesRDAP 15: You’re in good company: Unifying campus research data services
RDAP 15: You’re in good company: Unifying campus research data services
 
Introduction to Learning Analytics - Framework and Implementation Concerns
Introduction to Learning Analytics - Framework and Implementation ConcernsIntroduction to Learning Analytics - Framework and Implementation Concerns
Introduction to Learning Analytics - Framework and Implementation Concerns
 
Team2 D2 1
Team2 D2 1Team2 D2 1
Team2 D2 1
 
What Can I Do Now? (web 2.0 pedagogy) v4
What Can I Do Now? (web 2.0 pedagogy) v4What Can I Do Now? (web 2.0 pedagogy) v4
What Can I Do Now? (web 2.0 pedagogy) v4
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Generative Adversarial Network

  • 1. Generative Adversarial Network Presented by Mohammad Khalooei PhD student of Amirkabir University of Technology (Tehran Polytecnic) Under supervision of Prof. Mohammad Mehdi Homayounpour & Dr. Maryam Amirmazlaghani Laboratory of Intelligence and Multimedia Processing (LIMP) http://ceit.aut.ac.ir/~khalooei khalooei [at] aut.ac.ir Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 1
  • 2. Generative Adversarial Network Presented by Mohammad Khalooei PhD student of Amirkabir University of Technology (Tehran Polytecnic) Under supervision of Prof. Mohammad Mehdi Homayounpour & Dr. Maryam Amirmazlaghani Laboratory of Intelligence and Multimedia Processing (LIMP) http://ceit.aut.ac.ir/~khalooei khalooei [at] aut.ac.ir Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 2
  • 3. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 3 GAN Zoo! https://github.com/hindupuravinash/the-gan-zoo
  • 4. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 4 Best paper statistic from CVPR 2018 Are GANs the new Deep? http://jponttuset.cat/are-gans-the-new-deep/
  • 5. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 5 Best paper statistic from CVPR 2018 The most important one, in my opinion, is adversarial training (also called GAN for Generative Adversarial Networks). https://medium.com/syncedreview/cvpr-2018-kicks-off-best-papers-announced-d3361bcc6984 Yann LeCun More than eight percent of CVPR 2018’s accepted papers include “GANs” in their titles, doubling the frequency at CVPR 2017. Google AI Research Scientist Jordi Pont-Tuset suggested in his blog that Generative Adversarial Networks (GANs) might catch up with deep learning someday. Jordi Pont-Tuset
  • 6. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 6 A brief Applications of GAN :: overview on CVPR18 paper • Perceptual Fidelity • Data Augmentation • Adversarial Attack • Domain Adaptation • Improved GAN • Metric Learning Categories:
  • 7. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 7 GAN ! https://goo.gl/oCdBRj https://goo.gl/ibYzBr
  • 8. Supervised learning • Find deterministic function f Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 8 Introduction x : data y : label f : y = f(x)
  • 9. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 9 Introduction x : data y : label f : y = f(x) 3×224×224 224 px 224 px R G B = 150528
  • 10. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 10 Introduction x : data y : label f : y = f(x)
  • 11. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 11 Introduction x : data y : label f : y = f(x) All pixels change when the camera moves ! http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
  • 12. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 12 Introduction x : data y : label f : y = f(x) http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
  • 13. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 13 Introduction x : data y : label f : y = f(x) http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
  • 14. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 14 Introduction x : data y : label f : y = f(x) http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
  • 15. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 15 Introduction x : data y : label f : y = f(x) http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
  • 16. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 16 Introduction x : data y : label f : y = f(x) http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture02.pdf
  • 17. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 17 Introduction x : data y : label f : y = f(x) • Solution: - Feature Vector 3×224×224 224 px 224 px R G B = 150528 2048 Feature extractor
  • 18. Supervised learning • Find deterministic function f • Challenges: - Image is high dimensional data - Many variations Viewpoint, illumination, deformation, occlusion, background clutter, intraclass variation Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 18 Introduction x : data y : label f : y = f(x) • Solution: - Feature Vector :: Synonyms Latent Vector Hidden Vector Unobservable Vector Feature Representation
  • 19. Supervised learning Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 19 Introduction f : y = f(x) Good Bad
  • 20. Supervised learning Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 20 Introduction f : y = f(x) Good features: Less redundancy Similar features for similar data High fidelity Good Bad
  • 21. Supervised learning • More flexible solution Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 21 Introduction x : data y : label f : y = f(x) Cat
  • 22. Supervised learning • More flexible solution Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 22 Introduction x : data y : label f : y = f(x) 0.87 Cat 0.22 Dog 0.01 Cake
  • 23. Supervised learning • More flexible solution Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 23 Introduction x : data y : label f : y = f(x) 0.87 Cat 0.22 Dog 0.01 Cake
  • 24. UnSupervised learning • Find deterministic function f Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 24 Introduction x : data z : latent f : z = f(x) Similaritymeasure
  • 25. UnSupervised learning • Find deterministic function f • More challenging than supervised learning ! • No label or curriculum → self learning • Some NN solutions : • Boltzmann machine • Auto-encoder or Variational Inference • Generative Adversarial Network Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 25 Introduction x : data z : latent f : z = f(x)
  • 26. Generative model • Find generation function g Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 26 Introduction x : data z : latent g : x = g(z)
  • 27. Generative model • Find generation function g Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 27 Introduction x : data z : latent g : x = g(z) UnSupervised learning • Find deterministic function f x : data z : latent f : z = f(x) VS.
  • 28. Generative model • Find generation function g Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 28 Introduction x : data z : latent g : x = g(z) UnSupervised learning • Find deterministic function f x : data z : latent f : z = f(x) VS. P(z|x) P(x|z)
  • 29. Generative model • Find generation function g Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 29 Introduction x : data z : latent g : x = g(z) UnSupervised learning • Find deterministic function f x : data z : latent f : z = f(x) VS. P(z|x) P(x|z) Encod er Decoder (Generator)
  • 30. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 30 Generative Modeling Sample GeneratorTraining Data Training Data Density function Sample Generation Density Estimation
  • 31. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 31 AutoEncoder http://curiousily.com/data-science/2017/02/02/what-to-do-when-data-is-missing-part-2.html
  • 32. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 32 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • …
  • 33. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 33 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • … Sample Code: https://github.com/buriburisuri/sugartensor/blob/master/sugart ensor/example/mnist_sae.py
  • 34. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 34 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • … Sample Code: https://github.com/buriburisuri/sugartensor/blob/master/sugart ensor/example/mnist_dae.py
  • 35. Mohammad Khalooei | khalooei@aut.ac.ir 35 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • … • Based on Variational approximation • Kingma et al, “Auto-Encoding Variational Bayes”, 2013 Generative Adversarial Network Train ing phases
  • 36. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 36 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • … • Based on Variational approximation • Kingma et al, “Auto-Encoding Variational Bayes”, 2013 Generating phases
  • 37. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 37 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • … • Based on Variational approximation • Kingma et al, “Auto-Encoding Variational Bayes”, 2013 • Reparameterization trick • Enable back propagation • Reduce variances of gradients
  • 38. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 38 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • … • Based on Variational approximation • Kingma et al, “Auto-Encoding Variational Bayes”, 2013 • Reparameterization trick • Enable back propagation • Reduce variances of gradients
  • 39. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 39 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • … • Based on Variational approximation • Kingma et al, “Auto-Encoding Variational Bayes”, 2013
  • 40. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 40 AutoEncoder • Family of AE: • Stack AutoEncoder (SAE) :: Use data itself as label / z = f(x), x=g(z) → x = g(f(x)) • Denoising autoencoder (DAE) :: Add random noise to input data • Variational autoencoder (VAE) :: Generative Model + Stacked Autoencoder • … (Namjukim – 2017) (Namjukim – 2017)
  • 41. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 41 Review …
  • 42. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 42 Review:: Generative Model https://www.slideshare.net/BrianKim244/dcgan-77452250
  • 43. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 43 Review:: Generative Model https://www.slideshare.net/BrianKim244/dcgan-77452250 Distribution of the actual images
  • 44. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 44 Review:: Generative Model https://www.slideshare.net/BrianKim244/dcgan-77452250
  • 45. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 45 Review:: Generative Model https://www.slideshare.net/BrianKim244/dcgan-77452250
  • 46. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 46 Review:: Generative Model https://www.slideshare.net/BrianKim244/dcgan-77452250
  • 47. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 47 Review:: Generative Model https://www.slideshare.net/BrianKim244/dcgan-77452250 Distribution of the actual images
  • 48. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 48 Contents o Machine learning o Supervised learning o Unsupervised learning o Generative vs. Discriminative models o Generative Adversarial Network o Introduction o Definition o Challenges o Applications o Tricks for training
  • 49. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 49 Adversarial Nets :: Introduction Ian Goodfellow et al, “Generative Adversarial Networks”, 2014
  • 50. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 50 Adversarial Nets :: Definition https://techcrunch.com/2017/06/20/gangogh
  • 51. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 51 Adversarial Nets :: Definition
  • 52. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 52 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 53. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 53 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 54. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 54 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 55. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 55 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 56. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 56 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 57. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 57 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 58. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 58 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 59. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 59 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 60. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 60 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 61. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 61 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 62. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 62 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 63. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 63 Adversarial Nets :: Definition Tries to generates more real- likefake bills Tries tocatchfake bills Penalty if failure
  • 64. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 64 Adversarial Nets :: Definition Tries to generates more real- likefake bills
  • 65. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 65 Adversarial Nets :: Definition Tries tocatchfake bills Penalty if failure
  • 66. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 66 Adversarial Nets :: Definition Tries tocatchfake bills Penalty if failure
  • 67. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 67 Adversarial Nets :: Definition https://github.com/dmonn/GAN-face-generator
  • 68. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 68 Adversarial Nets :: Definition
  • 69. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 69 Adversarial Nets :: Framework (Goodfellow et al., 2014)
  • 70. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 70
  • 71. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 71
  • 72. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 72
  • 73. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 73
  • 74. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 74
  • 75. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 75
  • 76. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 76
  • 77. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 77
  • 78. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 78 AutoEncoder :
  • 79. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 79
  • 80. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 80
  • 81. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 81
  • 82. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 82
  • 83. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 83 • Different distance metrics : KL-divergence JS-divergence Earth-mover distance (Wasserstein distance) Total variation distance Hellinger distance Mahalanobis distance Bhattacharyya distance Energy distance …
  • 84. • Pure GAN’s measure for difference :: Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 84
  • 85. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 85 Namjukim - 2017
  • 86. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 86 Namjukim - 2017
  • 87. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 87 GAN ideas (review intuitive papers) https://carpedm20.github.io/faces/ https://github.com/carpedm20/DCGAN-tensorflow DCGAN Deep convolutional generative adversarial network (DCGAN)
  • 88. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 88 GAN ideas (review intuitive papers) Vector space arithmetic
  • 89. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 89 GAN ideas (review intuitive papers) Vector space arithmetic
  • 90. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 90 GAN ideas (review intuitive papers) Super-Resolution
  • 91. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 91 GAN ideas (review intuitive papers) Super-Resolution https://www.youtube.com/watch?v=9c4z6YsBGQ0
  • 92. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 92 GAN ideas (review intuitive papers) Conditional Generative Adversarial Network
  • 93. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 93 GAN ideas (review intuitive papers) Invertible Conditional GANs for image editing
  • 94. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 94 GAN ideas (review intuitive papers) Image to Image translation with conditional generative networks https://phillipi.github.io/pix2pix/
  • 95. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 95 GAN ideas (review intuitive papers) Image to Image translation with conditional generative networks https://phillipi.github.io/pix2pix/
  • 96. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 96 GAN ideas (review intuitive papers) Image to Image translation with conditional generative networks https://phillipi.github.io/pix2pix/
  • 97. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 97 GAN ideas (review intuitive papers) Image to Image translation with conditional generative networks https://phillipi.github.io/pix2pix/
  • 98. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 98 GAN ideas (review intuitive papers) Cycle GAN F(G(X)) ≈ X G: X → Y F: Y → X
  • 99. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 99 GAN ideas (review intuitive papers) Cycle GAN F(G(X)) ≈ X G: X → Y F: Y → X
  • 100. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 100 GAN ideas (review intuitive papers) Cycle GAN F(G(X)) ≈ X G: X → Y F: Y → X
  • 101. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 101 GAN ideas (review intuitive papers) Cycle GAN F(G(X)) ≈ X G: X → Y F: Y → X
  • 102. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 102 GAN ideas (review intuitive papers) Cycle GAN F(G(X)) ≈ X G: X → Y F: Y → X
  • 103. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 103 GAN ideas (review intuitive papers) Cycle GAN F(G(X)) ≈ X G: X → Y F: Y → X
  • 104. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 104 GAN ideas (review intuitive papers) Cycle GAN F(G(X)) ≈ X G: X → Y F: Y → X
  • 105. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 105 GAN ideas (review intuitive papers) Unsupervised cross-domain image generation
  • 106. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 106 GAN ideas (review intuitive papers) Denoising GAN
  • 107. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 107 GAN ideas (review intuitive papers) Review:: Super resolution (SRGAN) https://github.com/zsdonghao/SRGAN
  • 108. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 108 GAN ideas (review intuitive papers) Text to Image
  • 109. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 109 GAN ideas (review intuitive papers) Text to Image
  • 110. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 110 GAN ideas (review intuitive papers) MoCoGAN: Decomposing Motion and Content for Video Generation https://github.com/sergeytulyakov/mocogan
  • 111. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 111 GAN ideas (review intuitive papers) MoCoGAN: Decomposing Motion and Content for Video Generation https://github.com/sergeytulyakov/mocogan
  • 112. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 112 GAN ideas (review intuitive papers) ALOCC :: Adversarially Learned One-Class Classifier for Novelty Detection https://github.com/khalooei/ALOCC-CVPR2018
  • 113. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 113 GAN ideas (review intuitive papers) ALOCC :: Adversarially Learned One-Class Classifier for Novelty Detection https://github.com/khalooei/ALOCC-CVPR2018
  • 114. • Converging • Mode collapse • Counting … Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 114 GAN challenges
  • 115. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 115 GAN’s Applications
  • 116. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 116 GAN’s Applications 3.5 Years of Progress on Faces (Brundage et al, 2018) (Goodfellow 2018)
  • 117. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 117 GAN’s Applications (Brundage et al, 2018) (Goodfellow 2018) < 2 Years of Progress on Faces
  • 118. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 118 GAN’s Applications (Zhang et al., 2018) (Goodfellow 2018) Self-Attention GAN
  • 119. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 119 GAN’s Applications (Goodfellow 2018) Some intuitive: Depth and Convolution Class-conditional generation Spectral Normalization Hinge loss Two-timescale update rule Self-attention
  • 120. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 120 GAN’s Applications (Goodfellow 2018) Some intuitive: Depth and Convolution Class-conditional generation Hinge loss Two-timescale update rule Self-attention No Convolution Needed to Solve Simple Tasks Original GAN, 2014
  • 121. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 121 GAN’s Applications (Goodfellow 2018) Some intuitive: Depth and Convolution Class-conditional generation Hinge loss Two-timescale update rule Self-attention Class-Conditional GANs (Mirza and Osindero, 2014)
  • 122. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 122 GAN’s Applications (Goodfellow 2018) Some intuitive: Depth and Convolution Class-conditional generation Hinge loss Two-timescale update rule Self-attention Class-Conditional GANs (Odena et al, 2016) AC-GAN: Specialist Generators
  • 123. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 123 GAN’s Applications (Goodfellow 2018) Some intuitive: Depth and Convolution Class-conditional generation Hinge loss Two-timescale update rule Self-attention (Miyato et al, 2017) Class-Conditional GANs SN-GAN: Shared Generator
  • 124. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 124 GAN’s Applications (Goodfellow 2018) Some intuitive: Depth and Convolution Class-conditional generation Hinge loss Two-timescale update rule Self-attention (Miyato et al 2017, Lim and Ye 2017, Tran et al 2017) Hinge Loss
  • 125. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 125 GAN’s Applications (Goodfellow 2018) Some intuitive: Depth and Convolution Class-conditional generation Hinge loss Two-timescale update rule Self-attention
  • 126. Generative Adversarial Network Mohammad Khalooei | khalooei@aut.ac.ir 126 Thank you! Mohammad Khalooei Mkhalooei [at] gmail.com Khalooei [at] aut.ac.ir https://ceit.aut.ac.ir/~khalooei