SlideShare a Scribd company logo
1 of 40
Generative Adversarial
Networks
Manohar Mukku
CS1703
1
• GANs were introduced in a paper by Ian Goodfellow and
other researchers at the University of Montreal, including
Yoshua Bengio, in 2014.
2
–Yann LeCun
“The most interesting idea in the last 10 years in
Machine Learning”
3
• So what are GANs?
• What makes them so “interesting” ?
4
• GAN - Generative Adversarial Network
• GANs belong to the set of generative models.
• It means that they are able to produce / generate new
content.
5
Examples of results obtained with GANs
Rightmost column contains true data that are nearest from the direct neighbouring
generated samples
6
Generative model
7
N = nxn grayscale image Unrolled N-dim vector
Problem is generating an N-dim vector that represents a “dog”
• It is equivalent to generating a random variable with
respect to the “dog probability distribution”
• The “dog probability distribution” over the N dimensional
vector space is a very complex one
• We don’t know how to explicitly express this distribution
• We don’t know how to directly generate complex random
variables
8
• It has been shown that Complex random variables can be
built as a function of some simpler random variables
C = F(S)
9
• Uniform random variables can be generated easily
• We need to express our N dim random variable as the
result of a very complex function applied to a simple N dim
random variable
Complex r.v = Function(Simple r.v’s)
• Solution - Use Neural network modelling
10
11
z ~ Pprior(z) Generator function, G(z;θg) x ~ Pg(x;θg) Unrolled vector
Generative Model
• How to train this Generative Network?
• One Solution - GAN
• Generative - Generates new content
• Adversarial Networks - Two networks with opposing
objectives
12
GAN
• It consists of two deep networks:
1. Discriminator network
2. Generator network
• The discriminator is supplied with both true and fake
images and it tries to detect fake vs true images. Outputs
a probability between 0 and 1 that the image is “true”
• The generator tries to fool the discriminator into thinking
that the fake images it generates are true images
13
Architecture of GAN
14
x ~ Pg(x)
Z ~ Pprior(z)
x ~ Pdata(x)
(z;θg)
(x;θd)
Some terminology
• Pdata(x) - Data distribution
• Pg(x) - Generated distribution
• Pprior(z) - Noise distribution
• D(x;θd) - Discriminator function with parameters θd
• G(x;θg) - Generator function with parameters θg
15
Discriminator Learning
16
D(x;θd)
Discriminator Learning
• Need to predict “1” for “true” images, and “0” for “fake”
images
• So the loss function (negative of log loss) for the
discriminator is
• We want to maximize this loss function. In other words,
perform gradient ascent as
θd  θd + ηΔV’(θd)
17
V’ =
Generator Learning
18
G(x;θg)
Generator Learning
• Generator needs to fool the discriminator.
• It needs the discriminator to output “1” for “fake” images.
• So the loss function (log loss) for the generator is
• We want to minimize this loss function. In other words,
perform gradient descent as
θg  θg − ηΔV’(θg)
19
V’ =
Learning Algorithm
20
Train D
Train G
K steps
1 step
GAN – Learn a discriminator
NN
Generator
v1
Real images
Sampled from
DB:
Discriminator
v1
image 1/0 (real or fake)
Random noise
1 1 1 1
0 0 0 0
Update θd
v2
(FIX)
GAN – Learn a generator
Discriminator
v1
NN
Generator
v1
Random noise
0.13
Update the parameters of generator with BP
Generator wants the output be
classified as “real” (as close to 1 as
possible)
Use gradient descent to update the parameters
in the generator, but fix the discriminator
unchanged
1.0
v2
Train
this
Do not
Train
This
They have
Opposite
objectives
(FIX)
• It has been shown in the paper that, if both the generator
and discriminator are provided with enough capacity and
training time we can get Pg(x) converge to Pdata(x)
23
Takeaways
• Generator models try to generate data from a given
(complex) probability distribution
• The generator tries to model the input data probability
distribution
Pg(x) = Pdata(x)
• GAN uses adversarial method to train the Generator
24
Applications
• Generating images, videos, poems, some simple
conversation
• Text-to-image synthesis
• Face Aging
25
Generating Anime Faces using GAN
Reference: https://arxiv.org/pdf/1708.05509.pdf
mages Source: Konachen Anime Faces (https://github.com/nagadomi/lbpcascade_animefa
Training Samples: 50,000 pictures of 96x96 pixels
Generating Anime Faces using GAN
100 iterations
Generating Anime Faces using GAN
1000 iterations
Generating Anime Faces using GAN
2000 iterations
Generating Anime Faces using GAN
5000 iterations
Generating Anime Faces using GAN
10,000 iterations
Generating Anime Faces using GAN
20,000 iterations
Generating Anime Faces using GAN
50,000 iterations
Application
34
Pose Guided Person Image Generation
Reference: https://arxiv.org/pdf/1705.09368.pdf
Application
35
CycleGAN
Transform image from one domain (real) to another domain (Monet painting)
Reference: https://github.com/junyanz/CycleGAN
Application
36
Text to image (StackGAN)
Sketch
Primitive
shape and
basic colours
Generate high
resolution with
photo-realistic details
Reference: https://arxiv.org/pdf/1612.03242v1.pdf
Application
37
Image inpainting
Reference: https://people.eecs.berkeley.edu/~pathak/context_encoder/
Application
38
Face aging (Age-cGAN)
Reference: https://arxiv.org/pdf/1702.01983.pdf
References
• https://towardsdatascience.com/understanding-generative-adversarial-
networks-gans-cd6e4651a29
• https://arxiv.org/pdf/1406.2661.pdf
• https://skymind.ai/wiki/generative-adversarial-network-gan
• http://www.iangoodfellow.com/slides/2016-12-04-NIPS.pdf
• http://slazebni.cs.illinois.edu/spring17/lec11_gan.pdf
• https://cs.uwaterloo.ca/~mli/Deep-Learning-2017-Lecture7GAN.ppt
• https://medium.com/@jonathan_hui/gan-some-cool-applications-of-gans-
4c9ecca35900
39
Thank You!
40

More Related Content

What's hot

Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)Amol Patil
 
Introduction to Generative Adversarial Networks
Introduction to Generative Adversarial NetworksIntroduction to Generative Adversarial Networks
Introduction to Generative Adversarial NetworksBennoG1
 
A (Very) Gentle Introduction to Generative Adversarial Networks (a.k.a GANs)
 A (Very) Gentle Introduction to Generative Adversarial Networks (a.k.a GANs) A (Very) Gentle Introduction to Generative Adversarial Networks (a.k.a GANs)
A (Very) Gentle Introduction to Generative Adversarial Networks (a.k.a GANs)Thomas da Silva Paula
 
Generative Adversarial Networks
Generative Adversarial NetworksGenerative Adversarial Networks
Generative Adversarial NetworksMark Chang
 
Generative Adversarial Network (GAN)
Generative Adversarial Network (GAN)Generative Adversarial Network (GAN)
Generative Adversarial Network (GAN)Prakhar Rastogi
 
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAIGenerative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAIWithTheBest
 
Generative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsGenerative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsArtifacia
 
Generative Adversarial Networks and Their Medical Imaging Applications
Generative Adversarial Networks and Their Medical Imaging ApplicationsGenerative Adversarial Networks and Their Medical Imaging Applications
Generative Adversarial Networks and Their Medical Imaging ApplicationsKyuhwan Jung
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical ImagingSanghoon Hong
 
Deep Generative Models
Deep Generative Models Deep Generative Models
Deep Generative Models Chia-Wen Cheng
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networksDing Li
 
Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Universitat Politècnica de Catalunya
 
A Short Introduction to Generative Adversarial Networks
A Short Introduction to Generative Adversarial NetworksA Short Introduction to Generative Adversarial Networks
A Short Introduction to Generative Adversarial NetworksJong Wook Kim
 
Tutorial on Deep Generative Models
 Tutorial on Deep Generative Models Tutorial on Deep Generative Models
Tutorial on Deep Generative ModelsMLReview
 
Deep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural NetworksDeep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural NetworksChristian Perone
 
Convolutional neural network
Convolutional neural network Convolutional neural network
Convolutional neural network Yan Xu
 
Autoencoders
AutoencodersAutoencoders
AutoencodersCloudxLab
 
Variational Autoencoder
Variational AutoencoderVariational Autoencoder
Variational AutoencoderMark Chang
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual IntroductionLukas Masuch
 

What's hot (20)

Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
 
Introduction to Generative Adversarial Networks
Introduction to Generative Adversarial NetworksIntroduction to Generative Adversarial Networks
Introduction to Generative Adversarial Networks
 
A (Very) Gentle Introduction to Generative Adversarial Networks (a.k.a GANs)
 A (Very) Gentle Introduction to Generative Adversarial Networks (a.k.a GANs) A (Very) Gentle Introduction to Generative Adversarial Networks (a.k.a GANs)
A (Very) Gentle Introduction to Generative Adversarial Networks (a.k.a GANs)
 
Generative Adversarial Networks
Generative Adversarial NetworksGenerative Adversarial Networks
Generative Adversarial Networks
 
Generative Adversarial Network (GAN)
Generative Adversarial Network (GAN)Generative Adversarial Network (GAN)
Generative Adversarial Network (GAN)
 
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAIGenerative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
Generative Adversarial Networks (GANs) - Ian Goodfellow, OpenAI
 
Generative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsGenerative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their Applications
 
Generative Adversarial Networks and Their Medical Imaging Applications
Generative Adversarial Networks and Their Medical Imaging ApplicationsGenerative Adversarial Networks and Their Medical Imaging Applications
Generative Adversarial Networks and Their Medical Imaging Applications
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical Imaging
 
Deep Generative Models
Deep Generative Models Deep Generative Models
Deep Generative Models
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks
 
Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...
 
A Short Introduction to Generative Adversarial Networks
A Short Introduction to Generative Adversarial NetworksA Short Introduction to Generative Adversarial Networks
A Short Introduction to Generative Adversarial Networks
 
Tutorial on Deep Generative Models
 Tutorial on Deep Generative Models Tutorial on Deep Generative Models
Tutorial on Deep Generative Models
 
Deep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural NetworksDeep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural Networks
 
Convolutional neural network
Convolutional neural network Convolutional neural network
Convolutional neural network
 
Autoencoders
AutoencodersAutoencoders
Autoencoders
 
Gan intro
Gan introGan intro
Gan intro
 
Variational Autoencoder
Variational AutoencoderVariational Autoencoder
Variational Autoencoder
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
 

Similar to Generative Adversarial Networks (GAN)

gan-190318135433 (1).pptx
gan-190318135433 (1).pptxgan-190318135433 (1).pptx
gan-190318135433 (1).pptxkiran814572
 
Tutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial NetworksTutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial NetworksMLReview
 
Generative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural NetworksGenerative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural NetworksDenis Dus
 
MLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
MLIP - Chapter 6 - Generation, Super-Resolution, Style transferMLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
MLIP - Chapter 6 - Generation, Super-Resolution, Style transferCharles Deledalle
 
GAN Deep Learning Approaches to Image Processing Applications (1).pptx
GAN Deep Learning Approaches to Image Processing Applications (1).pptxGAN Deep Learning Approaches to Image Processing Applications (1).pptx
GAN Deep Learning Approaches to Image Processing Applications (1).pptxRMDAcademicCoordinat
 
Generating Networks with Arbitrary Properties
Generating Networks with Arbitrary PropertiesGenerating Networks with Arbitrary Properties
Generating Networks with Arbitrary PropertiesJérôme KUNEGIS
 
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019Codemotion
 
InfoGAN and Generative Adversarial Networks
InfoGAN and Generative Adversarial NetworksInfoGAN and Generative Adversarial Networks
InfoGAN and Generative Adversarial NetworksZak Jost
 
Generative Adversarial Networks GAN - Santiago Pascual - UPC Barcelona 2018
Generative Adversarial Networks GAN - Santiago Pascual - UPC Barcelona 2018Generative Adversarial Networks GAN - Santiago Pascual - UPC Barcelona 2018
Generative Adversarial Networks GAN - Santiago Pascual - UPC Barcelona 2018Universitat Politècnica de Catalunya
 
Generative Adversarial Network (GANs).
Generative  Adversarial  Network (GANs).Generative  Adversarial  Network (GANs).
Generative Adversarial Network (GANs).kgandham169
 
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018Universitat Politècnica de Catalunya
 
GAN Generative Adversarial Networks.pptx
GAN Generative Adversarial Networks.pptxGAN Generative Adversarial Networks.pptx
GAN Generative Adversarial Networks.pptxssuser2624f71
 
Generative Models and Adversarial Training (D2L3 Insight@DCU Machine Learning...
Generative Models and Adversarial Training (D2L3 Insight@DCU Machine Learning...Generative Models and Adversarial Training (D2L3 Insight@DCU Machine Learning...
Generative Models and Adversarial Training (D2L3 Insight@DCU Machine Learning...Universitat Politècnica de Catalunya
 
Deep Generative Modelling
Deep Generative ModellingDeep Generative Modelling
Deep Generative ModellingPetko Nikolov
 
Reading group gan - 20170417
Reading group   gan - 20170417Reading group   gan - 20170417
Reading group gan - 20170417Shuai Zhang
 

Similar to Generative Adversarial Networks (GAN) (20)

gan-190318135433 (1).pptx
gan-190318135433 (1).pptxgan-190318135433 (1).pptx
gan-190318135433 (1).pptx
 
Tutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial NetworksTutorial on Theory and Application of Generative Adversarial Networks
Tutorial on Theory and Application of Generative Adversarial Networks
 
Generative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural NetworksGenerative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural Networks
 
MLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
MLIP - Chapter 6 - Generation, Super-Resolution, Style transferMLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
MLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
 
GAN Deep Learning Approaches to Image Processing Applications (1).pptx
GAN Deep Learning Approaches to Image Processing Applications (1).pptxGAN Deep Learning Approaches to Image Processing Applications (1).pptx
GAN Deep Learning Approaches to Image Processing Applications (1).pptx
 
Generating Networks with Arbitrary Properties
Generating Networks with Arbitrary PropertiesGenerating Networks with Arbitrary Properties
Generating Networks with Arbitrary Properties
 
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
 
InfoGAN and Generative Adversarial Networks
InfoGAN and Generative Adversarial NetworksInfoGAN and Generative Adversarial Networks
InfoGAN and Generative Adversarial Networks
 
Generative Adversarial Networks GAN - Santiago Pascual - UPC Barcelona 2018
Generative Adversarial Networks GAN - Santiago Pascual - UPC Barcelona 2018Generative Adversarial Networks GAN - Santiago Pascual - UPC Barcelona 2018
Generative Adversarial Networks GAN - Santiago Pascual - UPC Barcelona 2018
 
Generative Adversarial Network (GANs).
Generative  Adversarial  Network (GANs).Generative  Adversarial  Network (GANs).
Generative Adversarial Network (GANs).
 
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
Variational Autoencoders VAE - Santiago Pascual - UPC Barcelona 2018
 
GAN Generative Adversarial Networks.pptx
GAN Generative Adversarial Networks.pptxGAN Generative Adversarial Networks.pptx
GAN Generative Adversarial Networks.pptx
 
Generative Models and Adversarial Training (D2L3 Insight@DCU Machine Learning...
Generative Models and Adversarial Training (D2L3 Insight@DCU Machine Learning...Generative Models and Adversarial Training (D2L3 Insight@DCU Machine Learning...
Generative Models and Adversarial Training (D2L3 Insight@DCU Machine Learning...
 
Deep Generative Modelling
Deep Generative ModellingDeep Generative Modelling
Deep Generative Modelling
 
GAN.pptx
GAN.pptxGAN.pptx
GAN.pptx
 
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
 
11_gan.pdf
11_gan.pdf11_gan.pdf
11_gan.pdf
 
Reading group gan - 20170417
Reading group   gan - 20170417Reading group   gan - 20170417
Reading group gan - 20170417
 
gan.pdf
gan.pdfgan.pdf
gan.pdf
 
lec19.pdf
lec19.pdflec19.pdf
lec19.pdf
 

Recently uploaded

School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEselvakumar948
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 

Recently uploaded (20)

School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 

Generative Adversarial Networks (GAN)

  • 2. • GANs were introduced in a paper by Ian Goodfellow and other researchers at the University of Montreal, including Yoshua Bengio, in 2014. 2
  • 3. –Yann LeCun “The most interesting idea in the last 10 years in Machine Learning” 3
  • 4. • So what are GANs? • What makes them so “interesting” ? 4
  • 5. • GAN - Generative Adversarial Network • GANs belong to the set of generative models. • It means that they are able to produce / generate new content. 5
  • 6. Examples of results obtained with GANs Rightmost column contains true data that are nearest from the direct neighbouring generated samples 6
  • 7. Generative model 7 N = nxn grayscale image Unrolled N-dim vector Problem is generating an N-dim vector that represents a “dog”
  • 8. • It is equivalent to generating a random variable with respect to the “dog probability distribution” • The “dog probability distribution” over the N dimensional vector space is a very complex one • We don’t know how to explicitly express this distribution • We don’t know how to directly generate complex random variables 8
  • 9. • It has been shown that Complex random variables can be built as a function of some simpler random variables C = F(S) 9
  • 10. • Uniform random variables can be generated easily • We need to express our N dim random variable as the result of a very complex function applied to a simple N dim random variable Complex r.v = Function(Simple r.v’s) • Solution - Use Neural network modelling 10
  • 11. 11 z ~ Pprior(z) Generator function, G(z;θg) x ~ Pg(x;θg) Unrolled vector Generative Model
  • 12. • How to train this Generative Network? • One Solution - GAN • Generative - Generates new content • Adversarial Networks - Two networks with opposing objectives 12
  • 13. GAN • It consists of two deep networks: 1. Discriminator network 2. Generator network • The discriminator is supplied with both true and fake images and it tries to detect fake vs true images. Outputs a probability between 0 and 1 that the image is “true” • The generator tries to fool the discriminator into thinking that the fake images it generates are true images 13
  • 14. Architecture of GAN 14 x ~ Pg(x) Z ~ Pprior(z) x ~ Pdata(x) (z;θg) (x;θd)
  • 15. Some terminology • Pdata(x) - Data distribution • Pg(x) - Generated distribution • Pprior(z) - Noise distribution • D(x;θd) - Discriminator function with parameters θd • G(x;θg) - Generator function with parameters θg 15
  • 17. Discriminator Learning • Need to predict “1” for “true” images, and “0” for “fake” images • So the loss function (negative of log loss) for the discriminator is • We want to maximize this loss function. In other words, perform gradient ascent as θd  θd + ηΔV’(θd) 17 V’ =
  • 19. Generator Learning • Generator needs to fool the discriminator. • It needs the discriminator to output “1” for “fake” images. • So the loss function (log loss) for the generator is • We want to minimize this loss function. In other words, perform gradient descent as θg  θg − ηΔV’(θg) 19 V’ =
  • 21. GAN – Learn a discriminator NN Generator v1 Real images Sampled from DB: Discriminator v1 image 1/0 (real or fake) Random noise 1 1 1 1 0 0 0 0 Update θd v2 (FIX)
  • 22. GAN – Learn a generator Discriminator v1 NN Generator v1 Random noise 0.13 Update the parameters of generator with BP Generator wants the output be classified as “real” (as close to 1 as possible) Use gradient descent to update the parameters in the generator, but fix the discriminator unchanged 1.0 v2 Train this Do not Train This They have Opposite objectives (FIX)
  • 23. • It has been shown in the paper that, if both the generator and discriminator are provided with enough capacity and training time we can get Pg(x) converge to Pdata(x) 23
  • 24. Takeaways • Generator models try to generate data from a given (complex) probability distribution • The generator tries to model the input data probability distribution Pg(x) = Pdata(x) • GAN uses adversarial method to train the Generator 24
  • 25. Applications • Generating images, videos, poems, some simple conversation • Text-to-image synthesis • Face Aging 25
  • 26. Generating Anime Faces using GAN Reference: https://arxiv.org/pdf/1708.05509.pdf mages Source: Konachen Anime Faces (https://github.com/nagadomi/lbpcascade_animefa Training Samples: 50,000 pictures of 96x96 pixels
  • 27. Generating Anime Faces using GAN 100 iterations
  • 28. Generating Anime Faces using GAN 1000 iterations
  • 29. Generating Anime Faces using GAN 2000 iterations
  • 30. Generating Anime Faces using GAN 5000 iterations
  • 31. Generating Anime Faces using GAN 10,000 iterations
  • 32. Generating Anime Faces using GAN 20,000 iterations
  • 33. Generating Anime Faces using GAN 50,000 iterations
  • 34. Application 34 Pose Guided Person Image Generation Reference: https://arxiv.org/pdf/1705.09368.pdf
  • 35. Application 35 CycleGAN Transform image from one domain (real) to another domain (Monet painting) Reference: https://github.com/junyanz/CycleGAN
  • 36. Application 36 Text to image (StackGAN) Sketch Primitive shape and basic colours Generate high resolution with photo-realistic details Reference: https://arxiv.org/pdf/1612.03242v1.pdf
  • 38. Application 38 Face aging (Age-cGAN) Reference: https://arxiv.org/pdf/1702.01983.pdf
  • 39. References • https://towardsdatascience.com/understanding-generative-adversarial- networks-gans-cd6e4651a29 • https://arxiv.org/pdf/1406.2661.pdf • https://skymind.ai/wiki/generative-adversarial-network-gan • http://www.iangoodfellow.com/slides/2016-12-04-NIPS.pdf • http://slazebni.cs.illinois.edu/spring17/lec11_gan.pdf • https://cs.uwaterloo.ca/~mli/Deep-Learning-2017-Lecture7GAN.ppt • https://medium.com/@jonathan_hui/gan-some-cool-applications-of-gans- 4c9ecca35900 39