SlideShare a Scribd company logo
Olga Petrova
Machine Learning Engineer @ Scaleway
Harnessing the power of Generative
Adversarial Networks (GANs)
for supervised learning
1. INTRODUCTION
a)Generating content with AI
b)Supervised vs. Unsupervised learning
2. DEEP LEARNING PIPELINE
a)The building blocks of a DL project
b)How can a GPU help you?
3. FACE FRONTALIZATION GAN
OUTLINE
INTRODUCTION
a) Generating content with AI
b) Supervised vs. Unsupervised learning
THIS SLIDE DOES NOT EXIST
ThisPersonDoesNotExist.com
These images were generated via StyleGAN,
an artificial neural network by NVIDIA.
WHY USE A GPU FOR THIS?
NVIDIA
• Graphics Processing Unit manufacturer
• Training: very computationally intensive
• GPUs are optimised for Deep Learning
Scaleway GPU offer
• Dedicated 16-GB NVIDIA Tesla P100 GPU
• 10 CPU cores
• 45 GB of RAM
• 400 GB of local NVMe storage
INTRODUCTION
a) Generating content with AI
b) Supervised vs. Unsupervised learning
SUPERVISED vs. UNSUPERVISED
Unsupervised learning
ThisPersonDoesNot exist GAN:
- Show the model a lot of pictures of people
(~ 70 000 images from Flickr)
- The model learns how to generate new pictures of faces
Unlabelled data: unsupervised learning
The training set: instead of (input, output) pairs, only (input)
The original use of GANs was unsupervised learning
SUPERVISED vs. UNSUPERVISED
Unsupervised learning
ThisPersonDoesNot exist GAN:
- Show the model a lot of pictures of people
(~ 70 000 images from Flickr)
- The model learns how to generate new pictures of faces
Unlabelled data: unsupervised learning
The training set: instead of (input, output) pairs, only (input)
The original use of GANs was unsupervised learning
SUPERVISED vs. UNSUPERVISED
Supervised learning
Labeled data:
(input, output) pairs
- Dog vs cat: inputs = images,
outputs = class labels
- Super resolution: inputs = images,
outputs = SRed images
Typically, GANs were not used
Low resolution input vs. Super resolution output
“Photo-Realistic Single Image Super-Resolution Using a Generative
Adversarial Network” by Twitter (2017)
SUPERVISED vs. UNSUPERVISED
Supervised learning
Labeled data:
(input, output) pairs
- Dog vs cat: inputs = images,
outputs = class labels
- Super resolution: inputs = images,
outputs = SRed images
Typically, GANs were not used
Super resolution vs. Super resolution w/ GAN
“Photo-Realistic Single Image Super-Resolution Using a Generative
Adversarial Network” by Twitter (2017)
FACE FRONTALIZATION
Supervised learning
Inputs:
profile images at an angle
Outputs:
frontal images of the face
“Beyond Face Rotation: Global and Local Perception GAN for
Photorealistic and Identity Preserving Frontal View Synthesis” by
R. Huang et al (2017)
input
generated
output
ground
truth
FACE FRONTALIZATION
Supervised learning
Inputs:
profile images at an angle
Outputs:
frontal images of the face
Scaleway’s Face Frontalization GAN
input
generated
output
ground
truth
DEEP LEARNING PIPELINE
a) The building blocks of a DL project
b) How can a GPU help you?
FACE FRONTALIZATION
FACE FRONTALIZATION
Input = profile images; output = frontal images
Model = program ← this is the product
FACE FRONTALIZATION
THE MODEL
• Architecture + hyper parameters ← ML engineer’s job
• Trainable parameters ← learned numerical values
FACE FRONTALIZATION
TWO REGIMES
1. Training: learn the right parameters for the model
2. Inference: using the trained model to infer output
TRAINING THE MODEL I
Training data: correct (input, output) pairs
1. Feed inputs into the model
2. Compare the generated output to ground truth
3. Adjust trainable parameters to generate better outputs
TRAINING THE MODEL II
• Training done in mini-batches:
analyse a few images, then update parameters
• 1 pass through training dataset = 1 training epoch
DEEP LEARNING PIPELINE
a) The building blocks of a DL project
b) How can a GPU help you?
TECHNICAL CHALLENGE: COMPUTATION
Heavy computations:
Trainable parameters: ~ 8 000 000 in the frontalization GAN
Process many arithmetic operations in parallel
TECHNICAL CHALLENGE: COMPUTATION
SOLUTION: GPU
GPUs are optimised for such calculations
Example: NVIDIA Tesla P100 3584 cores
CPU vs GPU performance in training
GP1-XS 4 vCPUs
Scaleway Tesla
P100 GPU
Pricing
€39/month

€0.078/hour
€500/month

€1/hour

/hourTraining time per
epoch
8.5 hours 18 minutes
Cost €0.66 €0.30
CPU vs GPU performance in training
GP1-XS 4 vCPUs
Scaleway Tesla
P100 GPU
Pricing
€39/month

€0.078/hour
€500/month

€1/hour

/hourTraining time per
epoch
8.5 hours 18 minutes
Cost €0.66 €0.30
CPU vs GPU performance in training
GP1-XS 4 vCPUs
Scaleway Tesla
P100 GPU
Pricing
€39/month

€0.078/hour
€500/month

€1/hour

/hourTraining time per
epoch
8.5 hours 18 minutes
Cost €0.66 €0.30
CPU vs GPU performance in training
GP1-XS 4 vCPUs
Scaleway Tesla
P100 GPU
Pricing
€39/month

€0.078/hour
€500/month

€1/hour

/hourTraining time per
epoch
8.5 hours 18 minutes
Cost €0.66 €0.30
CPU vs GPU performance in training
GP1-XS 4 vCPUs
Scaleway Tesla
P100 GPU
Pricing
€39/month

€0.078/hour
€500/month

€1/hour

/hourTraining time per
epoch
8.5 hours 18 minutes
Cost €0.66 €0.30
GPU: over 28 times faster for less than half the price
TECHNICAL CHALLENGE: HEAVY I/O
Feed batches of (input, output) pairs of images
Frontalization training set size ~700 000, 13+ Gb
TECHNICAL CHALLENGE: HEAVY I/O
SOLUTION: Local Storage
Scaleway GPU instances come with
400 Gb of local NVMe SSD storage
FACE FRONTALIZATION GAN
a) GAN: Generative Adversarial Network
b) Generator: Encoder + Decoder
c) Training and Inference
GANs: Generative Adversarial Nets I
Generative Adversarial Nets by Ian Goodfellow et
al. (2014)
Yann LeCun (Director of Facebook AI):
“the most interesting idea in the last 10 years in
Machine Learning”
Fig: http://skymind.ai/wiki/generative-adversarial-network-gan
Generative: there is a Generator part
Adversarial: there is also a Discriminator. You train the two against each other
GANs: Generative Adversarial Nets II
1. Generator: generates output images
2. Discriminator: has two objectives
- accept images from the training set (Real)
and
-reject the generated images (Fake)
The purpose of training:
the Generator gets good enough to be able to fool the Discriminator
into accepting the generated images as Real
Fig: http://skymind.ai/wiki/generative-adversarial-network-gan
FACE FRONTALIZATION GAN
a) GAN: Generative Adversarial Network
b) Generator: Encoder + Decoder
c) Training and Inference
GENERATOR I
Input image: 3 x 128 x 128 = 49152 numbers
Perhaps we do not need all the 49152 values to describe a face?
GENERATOR II
ENCODER: Analyse the face → 512 numbers that describe it
DECODER: 512 numbers → Reconstruct the face
ENCODER + DECODER = GENERATOR
FACE FRONTALIZATION GAN
a) GAN: Generative Adversarial Network
b) Generator: Encoder + Decoder
c) Training and Inference
TRAINING
Model: only the Generator (not the Discriminator)
To train the GAN: train both Discriminator and Generator
To see the benefit of GAN, consider only the Generator first
TRAINING: ONLY THE GENERATOR
• ML engineer needs an assessment for how far the generated result is
from the ideal
• Example: pixelwise loss function
TRAINING: ONLY THE GENERATOR
Top: faces generated after 1 epoch (~700 000 training samples)

Bottom: ground truth frontal face photographs
• ML engineer needs an assessment for how far the generated result is
from the ideal
• Example: pixelwise loss function
generated
output
ground
truth
TRAINING: ONLY THE GENERATOR
Top: faces generated after 10 epochs

Bottom: actual frontal face photographs
• ML engineer needs an assessment for how far the generated result is
from the ideal
• Example: pixelwise loss function
generated
output
ground
truth
TRAINING: ONLY THE GENERATOR
Top: faces generated after 50 epochs

Bottom: actual frontal face photographs
• ML engineer needs an assessment for how far the generated result is
from the ideal
• Example: pixelwise loss function
generated
output
ground
truth
TRAINING: ONLY THE GENERATOR
Top: faces generated after 400 epochs

Bottom: actual frontal face photographs
• ML engineer needs an assessment for how far the generated result is
from the ideal
• Example: pixelwise loss function
generated
output
ground
truth
TRAINING: ONLY THE GENERATOR
Top: faces generated after 400 epochs

Bottom: actual frontal face photographs
• Why does this work?
• We have a lot of trainable parameters (~ 5 000 000)
generated
output
ground
truth
INFERENCE
Model after one training epoch: results are blurry
• Training for too long leads to overfitting the training data:
the model does not generalise well at inference time
• How can we get good training results faster?
Top: input
Middle: generated output
Bottom: ground truth
INFERENCE
Model after 50 training epochs: getting better
• Training for too long leads to overfitting the training data:
the model does not generalise well at inference time
• How can we get good training results faster?
Top: input
Middle: generated output
Bottom: ground truth
INFERENCE
Model after 400 epochs: generated images are getting worse
• Training for too long leads to overfitting the training data:
the model does not generalise well at inference time
• How can we get good training results faster?
Top: input
Middle: generated output
Bottom: ground truth
TRAINING THE GAN:
GENERATOR + DISCRIMINATOR
Top: faces generated after 1 epoch (old model)

Bottom: actual frontal face photographs
1. Minimize the pixel wise loss as before
2. Fool the Discriminator into believing the generated images
are Real
generated
output
ground
truth
Train Generator + Discriminator. Two objectives for the Generator:
TRAINING THE GAN:
GENERATOR + DISCRIMINATOR
Old model + GAN after 1 training epoch:

fine features are sharpened much faster
1. Minimize the pixel wise loss as before
2. Fool the Discriminator into believing the generated images
are Real
generated
output
ground
truth
Train Generator + Discriminator. Two objectives for the Generator:
TRAINING THE GAN:
GENERATOR + DISCRIMINATOR
Only the Generator
Generated output after 10 training epochs
Train Generator + Discriminator. Two objectives for the Generator:
GAN = Generator + Discriminator
1. Minimize the pixel wise loss as before
2. Fool the Discriminator into believing the generated images
are Real
TRAINING THE GAN:
GENERATOR + DISCRIMINATOR
Only the Generator
1. Minimize the pixel wise loss as before
2. Fool the Discriminator into believing the generated images
are Real
Generated output after 10 training epochs
Train Generator + Discriminator. Two objectives for the Generator:
GAN = Generator + Discriminator
1. With GAN we get better visual quality for the training set faster
2. Stop training earlier
3. The final model will generalise better
TRAINING THE GAN:
GENERATOR + DISCRIMINATOR
Generated output after 10 training epochs
Only the Generator GAN = Generator + Discriminator
COMBINED LOSS FUNCTION
Combined Loss function
1. Pixelwise loss for the generator:
how close is the output to ground truth?
2. Binary Cross Entropy loss for the
discriminator:
Fake or Real
Fig: http://skymind.ai/wiki/generative-adversarial-network-gan
Loss = the difference between
the generated output and the
desired output
input
generated
output
ground
truth
1. Fine features: small in pixelwise loss
2. Discriminator: uses fine features to
categorise images as Real or Fake
3. Result: better visual quality of the output Super resolution vs. Super resolution w/
GAN
“Photo-Realistic Single Image Super-Resolution Using a
Generative Adversarial Network” by Twitter (2017)
Loss = the difference between
the generated output and the
desired output
input
generated
output
ground
truth
COMBINED LOSS FUNCTION
CONCLUSION
1. Using GANs in
Supervised Learning
can be a good idea
2. Training such
complex deep
networks benefits
greatly from a GPU
Thank You
Stay tuned for exclusive how-to's and updates, follow us on Twitter and LinkedIn
@Scaleway
Emplacement QR Code
You can also follow me on LinkedIn www.linkedin.com/in/olga-p-petrova/
The face frontalization GAN code can be found on www.github.com/scaleway/frontalization
Harnessing the power of Generative Adversarial Networks (GANs) for supervised learning

More Related Content

Similar to Harnessing the power of Generative Adversarial Networks (GANs) for supervised learning

Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...
PyData
 
Semi-supervised learning with GANs
Semi-supervised learning with GANsSemi-supervised learning with GANs
Semi-supervised learning with GANs
terek47
 
Tutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GANTutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GAN
Wuhyun Rico Shin
 
AI Food detector; A model of Generative adversarial network for food Classifier
AI Food detector; A model of Generative adversarial network for food ClassifierAI Food detector; A model of Generative adversarial network for food Classifier
AI Food detector; A model of Generative adversarial network for food Classifier
jimmy majumder
 
Dato Keynote
Dato KeynoteDato Keynote
Dato Keynote
Turi, Inc.
 
B4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearningB4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearning
Hoa Le
 
Photo echance. Problems. Solutions. Ideas
Photo echance. Problems. Solutions. Ideas Photo echance. Problems. Solutions. Ideas
Photo echance. Problems. Solutions. Ideas
Andrew Nikishaev
 
Strata London - Deep Learning 05-2015
Strata London - Deep Learning 05-2015Strata London - Deep Learning 05-2015
Strata London - Deep Learning 05-2015
Turi, Inc.
 
Extracting information from images using deep learning and transfer learning ...
Extracting information from images using deep learning and transfer learning ...Extracting information from images using deep learning and transfer learning ...
Extracting information from images using deep learning and transfer learning ...
PAPIs.io
 
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud MLScaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Seldon
 
Easy path to machine learning
Easy path to machine learningEasy path to machine learning
Easy path to machine learning
wesley chun
 
Pragmatic deep learning for image labelling
Pragmatic deep learning for image labellingPragmatic deep learning for image labelling
Pragmatic deep learning for image labelling
Pierre Gutierrez
 
Cutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneCutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for Everyone
Ivo Andreev
 
“Practical Image Data Augmentation Methods for Training Deep Learning Object ...
“Practical Image Data Augmentation Methods for Training Deep Learning Object ...“Practical Image Data Augmentation Methods for Training Deep Learning Object ...
“Practical Image Data Augmentation Methods for Training Deep Learning Object ...
Edge AI and Vision Alliance
 
ML Paper Tutorial - Video Face Manipulation Detection Through Ensemble of CNN...
ML Paper Tutorial - Video Face Manipulation Detection Through Ensemble of CNN...ML Paper Tutorial - Video Face Manipulation Detection Through Ensemble of CNN...
ML Paper Tutorial - Video Face Manipulation Detection Through Ensemble of CNN...
Pei-Yuan Chien
 
Getting Intimate with Images on Android with James Halpern
Getting Intimate with Images on Android with James HalpernGetting Intimate with Images on Android with James Halpern
Getting Intimate with Images on Android with James Halpern
FITC
 
Convolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision ApplicationsConvolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision Applications
Alex Conway
 
Project_Final_Review.pdf
Project_Final_Review.pdfProject_Final_Review.pdf
Project_Final_Review.pdf
DivyaGugulothu
 
Learning visual representation without human label
Learning visual representation without human labelLearning visual representation without human label
Learning visual representation without human label
Kai-Wen Zhao
 
Intelligent Thumbnail Selection
Intelligent Thumbnail SelectionIntelligent Thumbnail Selection
Intelligent Thumbnail Selection
Kamil Sindi
 

Similar to Harnessing the power of Generative Adversarial Networks (GANs) for supervised learning (20)

Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...
 
Semi-supervised learning with GANs
Semi-supervised learning with GANsSemi-supervised learning with GANs
Semi-supervised learning with GANs
 
Tutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GANTutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GAN
 
AI Food detector; A model of Generative adversarial network for food Classifier
AI Food detector; A model of Generative adversarial network for food ClassifierAI Food detector; A model of Generative adversarial network for food Classifier
AI Food detector; A model of Generative adversarial network for food Classifier
 
Dato Keynote
Dato KeynoteDato Keynote
Dato Keynote
 
B4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearningB4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearning
 
Photo echance. Problems. Solutions. Ideas
Photo echance. Problems. Solutions. Ideas Photo echance. Problems. Solutions. Ideas
Photo echance. Problems. Solutions. Ideas
 
Strata London - Deep Learning 05-2015
Strata London - Deep Learning 05-2015Strata London - Deep Learning 05-2015
Strata London - Deep Learning 05-2015
 
Extracting information from images using deep learning and transfer learning ...
Extracting information from images using deep learning and transfer learning ...Extracting information from images using deep learning and transfer learning ...
Extracting information from images using deep learning and transfer learning ...
 
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud MLScaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
 
Easy path to machine learning
Easy path to machine learningEasy path to machine learning
Easy path to machine learning
 
Pragmatic deep learning for image labelling
Pragmatic deep learning for image labellingPragmatic deep learning for image labelling
Pragmatic deep learning for image labelling
 
Cutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneCutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for Everyone
 
“Practical Image Data Augmentation Methods for Training Deep Learning Object ...
“Practical Image Data Augmentation Methods for Training Deep Learning Object ...“Practical Image Data Augmentation Methods for Training Deep Learning Object ...
“Practical Image Data Augmentation Methods for Training Deep Learning Object ...
 
ML Paper Tutorial - Video Face Manipulation Detection Through Ensemble of CNN...
ML Paper Tutorial - Video Face Manipulation Detection Through Ensemble of CNN...ML Paper Tutorial - Video Face Manipulation Detection Through Ensemble of CNN...
ML Paper Tutorial - Video Face Manipulation Detection Through Ensemble of CNN...
 
Getting Intimate with Images on Android with James Halpern
Getting Intimate with Images on Android with James HalpernGetting Intimate with Images on Android with James Halpern
Getting Intimate with Images on Android with James Halpern
 
Convolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision ApplicationsConvolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision Applications
 
Project_Final_Review.pdf
Project_Final_Review.pdfProject_Final_Review.pdf
Project_Final_Review.pdf
 
Learning visual representation without human label
Learning visual representation without human labelLearning visual representation without human label
Learning visual representation without human label
 
Intelligent Thumbnail Selection
Intelligent Thumbnail SelectionIntelligent Thumbnail Selection
Intelligent Thumbnail Selection
 

More from Scaleway

Entreprises : découvrez les briques essentielles d’une solution IoT
Entreprises : découvrez les briques essentielles d’une solution IoTEntreprises : découvrez les briques essentielles d’une solution IoT
Entreprises : découvrez les briques essentielles d’une solution IoT
Scaleway
 
Understand, verify, and act on the security of your Kubernetes clusters - Sca...
Understand, verify, and act on the security of your Kubernetes clusters - Sca...Understand, verify, and act on the security of your Kubernetes clusters - Sca...
Understand, verify, and act on the security of your Kubernetes clusters - Sca...
Scaleway
 
Éditeurs d'applications mobiles : augmentez la résolution des photos de vos c...
Éditeurs d'applications mobiles : augmentez la résolution des photos de vos c...Éditeurs d'applications mobiles : augmentez la résolution des photos de vos c...
Éditeurs d'applications mobiles : augmentez la résolution des photos de vos c...
Scaleway
 
Discover the benefits of Kubernetes to host a SaaS solution
Discover the benefits of Kubernetes to host a SaaS solutionDiscover the benefits of Kubernetes to host a SaaS solution
Discover the benefits of Kubernetes to host a SaaS solution
Scaleway
 
6 winning strategies for agil SaaS editors
6 winning strategies for agil SaaS editors6 winning strategies for agil SaaS editors
6 winning strategies for agil SaaS editors
Scaleway
 
Webinar - Relying on Bare Metal to manage your workloads
Webinar - Relying on Bare Metal to manage your workloadsWebinar - Relying on Bare Metal to manage your workloads
Webinar - Relying on Bare Metal to manage your workloads
Scaleway
 
Webinaire du 09/04/20 - S'appuyer sur du Bare Metal pour gérer ses pics de ch...
Webinaire du 09/04/20 - S'appuyer sur du Bare Metal pour gérer ses pics de ch...Webinaire du 09/04/20 - S'appuyer sur du Bare Metal pour gérer ses pics de ch...
Webinaire du 09/04/20 - S'appuyer sur du Bare Metal pour gérer ses pics de ch...
Scaleway
 
Scaleway Approach to VXLAN EVPN Fabric
Scaleway Approach to VXLAN EVPN FabricScaleway Approach to VXLAN EVPN Fabric
Scaleway Approach to VXLAN EVPN Fabric
Scaleway
 
Workshop IoT Hub : Pilotez une ampoule connectée
Workshop IoT Hub : Pilotez une ampoule connectéeWorkshop IoT Hub : Pilotez une ampoule connectée
Workshop IoT Hub : Pilotez une ampoule connectée
Scaleway
 
Why and how we proxy our IoT broker connections
 Why and how we proxy our IoT broker connections Why and how we proxy our IoT broker connections
Why and how we proxy our IoT broker connections
Scaleway
 
From local servers up to Kubernetes in the cloud
From local servers up to Kubernetes in the cloudFrom local servers up to Kubernetes in the cloud
From local servers up to Kubernetes in the cloud
Scaleway
 
L’évolution des serveurs dédiés vers le Bare Metal et les instances : comm...
L’évolution des serveurs dédiés vers le Bare Metal et les instances : comm...L’évolution des serveurs dédiés vers le Bare Metal et les instances : comm...
L’évolution des serveurs dédiés vers le Bare Metal et les instances : comm...
Scaleway
 
L’IA, booster de votre activité : principes, usages & idéation
L’IA, booster de votre activité : principes, usages & idéationL’IA, booster de votre activité : principes, usages & idéation
L’IA, booster de votre activité : principes, usages & idéation
Scaleway
 
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Scaleway
 
Serverless
ServerlessServerless
Serverless
Scaleway
 
Migrating the Online’s console with Docker
Migrating the Online’s console with DockerMigrating the Online’s console with Docker
Migrating the Online’s console with Docker
Scaleway
 
Routage à grande échelle des requêtes via RabbitMQ
Routage à grande échelle des requêtes via RabbitMQRoutage à grande échelle des requêtes via RabbitMQ
Routage à grande échelle des requêtes via RabbitMQ
Scaleway
 
Instances Behind the Scene: What happen when you click on «create a new insta...
Instances Behind the Scene: What happen when you click on «create a new insta...Instances Behind the Scene: What happen when you click on «create a new insta...
Instances Behind the Scene: What happen when you click on «create a new insta...
Scaleway
 
Demystifying IoT : Bringing the cloud to connected devices with IoT Station
Demystifying IoT : Bringing the cloud to connected devices with IoT StationDemystifying IoT : Bringing the cloud to connected devices with IoT Station
Demystifying IoT : Bringing the cloud to connected devices with IoT Station
Scaleway
 
L’odyssée d’une requête HTTP chez Scaleway
L’odyssée d’une requête HTTP chez ScalewayL’odyssée d’une requête HTTP chez Scaleway
L’odyssée d’une requête HTTP chez Scaleway
Scaleway
 

More from Scaleway (20)

Entreprises : découvrez les briques essentielles d’une solution IoT
Entreprises : découvrez les briques essentielles d’une solution IoTEntreprises : découvrez les briques essentielles d’une solution IoT
Entreprises : découvrez les briques essentielles d’une solution IoT
 
Understand, verify, and act on the security of your Kubernetes clusters - Sca...
Understand, verify, and act on the security of your Kubernetes clusters - Sca...Understand, verify, and act on the security of your Kubernetes clusters - Sca...
Understand, verify, and act on the security of your Kubernetes clusters - Sca...
 
Éditeurs d'applications mobiles : augmentez la résolution des photos de vos c...
Éditeurs d'applications mobiles : augmentez la résolution des photos de vos c...Éditeurs d'applications mobiles : augmentez la résolution des photos de vos c...
Éditeurs d'applications mobiles : augmentez la résolution des photos de vos c...
 
Discover the benefits of Kubernetes to host a SaaS solution
Discover the benefits of Kubernetes to host a SaaS solutionDiscover the benefits of Kubernetes to host a SaaS solution
Discover the benefits of Kubernetes to host a SaaS solution
 
6 winning strategies for agil SaaS editors
6 winning strategies for agil SaaS editors6 winning strategies for agil SaaS editors
6 winning strategies for agil SaaS editors
 
Webinar - Relying on Bare Metal to manage your workloads
Webinar - Relying on Bare Metal to manage your workloadsWebinar - Relying on Bare Metal to manage your workloads
Webinar - Relying on Bare Metal to manage your workloads
 
Webinaire du 09/04/20 - S'appuyer sur du Bare Metal pour gérer ses pics de ch...
Webinaire du 09/04/20 - S'appuyer sur du Bare Metal pour gérer ses pics de ch...Webinaire du 09/04/20 - S'appuyer sur du Bare Metal pour gérer ses pics de ch...
Webinaire du 09/04/20 - S'appuyer sur du Bare Metal pour gérer ses pics de ch...
 
Scaleway Approach to VXLAN EVPN Fabric
Scaleway Approach to VXLAN EVPN FabricScaleway Approach to VXLAN EVPN Fabric
Scaleway Approach to VXLAN EVPN Fabric
 
Workshop IoT Hub : Pilotez une ampoule connectée
Workshop IoT Hub : Pilotez une ampoule connectéeWorkshop IoT Hub : Pilotez une ampoule connectée
Workshop IoT Hub : Pilotez une ampoule connectée
 
Why and how we proxy our IoT broker connections
 Why and how we proxy our IoT broker connections Why and how we proxy our IoT broker connections
Why and how we proxy our IoT broker connections
 
From local servers up to Kubernetes in the cloud
From local servers up to Kubernetes in the cloudFrom local servers up to Kubernetes in the cloud
From local servers up to Kubernetes in the cloud
 
L’évolution des serveurs dédiés vers le Bare Metal et les instances : comm...
L’évolution des serveurs dédiés vers le Bare Metal et les instances : comm...L’évolution des serveurs dédiés vers le Bare Metal et les instances : comm...
L’évolution des serveurs dédiés vers le Bare Metal et les instances : comm...
 
L’IA, booster de votre activité : principes, usages & idéation
L’IA, booster de votre activité : principes, usages & idéationL’IA, booster de votre activité : principes, usages & idéation
L’IA, booster de votre activité : principes, usages & idéation
 
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
Comment automatiser le déploiement de sa plateforme sur des infrastructures ...
 
Serverless
ServerlessServerless
Serverless
 
Migrating the Online’s console with Docker
Migrating the Online’s console with DockerMigrating the Online’s console with Docker
Migrating the Online’s console with Docker
 
Routage à grande échelle des requêtes via RabbitMQ
Routage à grande échelle des requêtes via RabbitMQRoutage à grande échelle des requêtes via RabbitMQ
Routage à grande échelle des requêtes via RabbitMQ
 
Instances Behind the Scene: What happen when you click on «create a new insta...
Instances Behind the Scene: What happen when you click on «create a new insta...Instances Behind the Scene: What happen when you click on «create a new insta...
Instances Behind the Scene: What happen when you click on «create a new insta...
 
Demystifying IoT : Bringing the cloud to connected devices with IoT Station
Demystifying IoT : Bringing the cloud to connected devices with IoT StationDemystifying IoT : Bringing the cloud to connected devices with IoT Station
Demystifying IoT : Bringing the cloud to connected devices with IoT Station
 
L’odyssée d’une requête HTTP chez Scaleway
L’odyssée d’une requête HTTP chez ScalewayL’odyssée d’une requête HTTP chez Scaleway
L’odyssée d’une requête HTTP chez Scaleway
 

Recently uploaded

A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 

Recently uploaded (20)

A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 

Harnessing the power of Generative Adversarial Networks (GANs) for supervised learning

  • 1.
  • 2. Olga Petrova Machine Learning Engineer @ Scaleway Harnessing the power of Generative Adversarial Networks (GANs) for supervised learning
  • 3. 1. INTRODUCTION a)Generating content with AI b)Supervised vs. Unsupervised learning 2. DEEP LEARNING PIPELINE a)The building blocks of a DL project b)How can a GPU help you? 3. FACE FRONTALIZATION GAN OUTLINE
  • 4. INTRODUCTION a) Generating content with AI b) Supervised vs. Unsupervised learning
  • 5. THIS SLIDE DOES NOT EXIST ThisPersonDoesNotExist.com These images were generated via StyleGAN, an artificial neural network by NVIDIA.
  • 6. WHY USE A GPU FOR THIS? NVIDIA • Graphics Processing Unit manufacturer • Training: very computationally intensive • GPUs are optimised for Deep Learning Scaleway GPU offer • Dedicated 16-GB NVIDIA Tesla P100 GPU • 10 CPU cores • 45 GB of RAM • 400 GB of local NVMe storage
  • 7. INTRODUCTION a) Generating content with AI b) Supervised vs. Unsupervised learning
  • 8. SUPERVISED vs. UNSUPERVISED Unsupervised learning ThisPersonDoesNot exist GAN: - Show the model a lot of pictures of people (~ 70 000 images from Flickr) - The model learns how to generate new pictures of faces Unlabelled data: unsupervised learning The training set: instead of (input, output) pairs, only (input) The original use of GANs was unsupervised learning
  • 9. SUPERVISED vs. UNSUPERVISED Unsupervised learning ThisPersonDoesNot exist GAN: - Show the model a lot of pictures of people (~ 70 000 images from Flickr) - The model learns how to generate new pictures of faces Unlabelled data: unsupervised learning The training set: instead of (input, output) pairs, only (input) The original use of GANs was unsupervised learning
  • 10. SUPERVISED vs. UNSUPERVISED Supervised learning Labeled data: (input, output) pairs - Dog vs cat: inputs = images, outputs = class labels - Super resolution: inputs = images, outputs = SRed images Typically, GANs were not used Low resolution input vs. Super resolution output “Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network” by Twitter (2017)
  • 11. SUPERVISED vs. UNSUPERVISED Supervised learning Labeled data: (input, output) pairs - Dog vs cat: inputs = images, outputs = class labels - Super resolution: inputs = images, outputs = SRed images Typically, GANs were not used Super resolution vs. Super resolution w/ GAN “Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network” by Twitter (2017)
  • 12. FACE FRONTALIZATION Supervised learning Inputs: profile images at an angle Outputs: frontal images of the face “Beyond Face Rotation: Global and Local Perception GAN for Photorealistic and Identity Preserving Frontal View Synthesis” by R. Huang et al (2017) input generated output ground truth
  • 13. FACE FRONTALIZATION Supervised learning Inputs: profile images at an angle Outputs: frontal images of the face Scaleway’s Face Frontalization GAN input generated output ground truth
  • 14. DEEP LEARNING PIPELINE a) The building blocks of a DL project b) How can a GPU help you?
  • 16. FACE FRONTALIZATION Input = profile images; output = frontal images Model = program ← this is the product
  • 17. FACE FRONTALIZATION THE MODEL • Architecture + hyper parameters ← ML engineer’s job • Trainable parameters ← learned numerical values
  • 18. FACE FRONTALIZATION TWO REGIMES 1. Training: learn the right parameters for the model 2. Inference: using the trained model to infer output
  • 19. TRAINING THE MODEL I Training data: correct (input, output) pairs 1. Feed inputs into the model 2. Compare the generated output to ground truth 3. Adjust trainable parameters to generate better outputs
  • 20. TRAINING THE MODEL II • Training done in mini-batches: analyse a few images, then update parameters • 1 pass through training dataset = 1 training epoch
  • 21. DEEP LEARNING PIPELINE a) The building blocks of a DL project b) How can a GPU help you?
  • 22. TECHNICAL CHALLENGE: COMPUTATION Heavy computations: Trainable parameters: ~ 8 000 000 in the frontalization GAN Process many arithmetic operations in parallel
  • 23. TECHNICAL CHALLENGE: COMPUTATION SOLUTION: GPU GPUs are optimised for such calculations Example: NVIDIA Tesla P100 3584 cores
  • 24. CPU vs GPU performance in training GP1-XS 4 vCPUs Scaleway Tesla P100 GPU Pricing €39/month €0.078/hour €500/month €1/hour /hourTraining time per epoch 8.5 hours 18 minutes Cost €0.66 €0.30
  • 25. CPU vs GPU performance in training GP1-XS 4 vCPUs Scaleway Tesla P100 GPU Pricing €39/month €0.078/hour €500/month €1/hour /hourTraining time per epoch 8.5 hours 18 minutes Cost €0.66 €0.30
  • 26. CPU vs GPU performance in training GP1-XS 4 vCPUs Scaleway Tesla P100 GPU Pricing €39/month €0.078/hour €500/month €1/hour /hourTraining time per epoch 8.5 hours 18 minutes Cost €0.66 €0.30
  • 27. CPU vs GPU performance in training GP1-XS 4 vCPUs Scaleway Tesla P100 GPU Pricing €39/month €0.078/hour €500/month €1/hour /hourTraining time per epoch 8.5 hours 18 minutes Cost €0.66 €0.30
  • 28. CPU vs GPU performance in training GP1-XS 4 vCPUs Scaleway Tesla P100 GPU Pricing €39/month €0.078/hour €500/month €1/hour /hourTraining time per epoch 8.5 hours 18 minutes Cost €0.66 €0.30 GPU: over 28 times faster for less than half the price
  • 29. TECHNICAL CHALLENGE: HEAVY I/O Feed batches of (input, output) pairs of images Frontalization training set size ~700 000, 13+ Gb
  • 30. TECHNICAL CHALLENGE: HEAVY I/O SOLUTION: Local Storage Scaleway GPU instances come with 400 Gb of local NVMe SSD storage
  • 31. FACE FRONTALIZATION GAN a) GAN: Generative Adversarial Network b) Generator: Encoder + Decoder c) Training and Inference
  • 32. GANs: Generative Adversarial Nets I Generative Adversarial Nets by Ian Goodfellow et al. (2014) Yann LeCun (Director of Facebook AI): “the most interesting idea in the last 10 years in Machine Learning” Fig: http://skymind.ai/wiki/generative-adversarial-network-gan Generative: there is a Generator part Adversarial: there is also a Discriminator. You train the two against each other
  • 33. GANs: Generative Adversarial Nets II 1. Generator: generates output images 2. Discriminator: has two objectives - accept images from the training set (Real) and -reject the generated images (Fake) The purpose of training: the Generator gets good enough to be able to fool the Discriminator into accepting the generated images as Real Fig: http://skymind.ai/wiki/generative-adversarial-network-gan
  • 34. FACE FRONTALIZATION GAN a) GAN: Generative Adversarial Network b) Generator: Encoder + Decoder c) Training and Inference
  • 35. GENERATOR I Input image: 3 x 128 x 128 = 49152 numbers Perhaps we do not need all the 49152 values to describe a face?
  • 36. GENERATOR II ENCODER: Analyse the face → 512 numbers that describe it DECODER: 512 numbers → Reconstruct the face ENCODER + DECODER = GENERATOR
  • 37. FACE FRONTALIZATION GAN a) GAN: Generative Adversarial Network b) Generator: Encoder + Decoder c) Training and Inference
  • 38. TRAINING Model: only the Generator (not the Discriminator) To train the GAN: train both Discriminator and Generator To see the benefit of GAN, consider only the Generator first
  • 39. TRAINING: ONLY THE GENERATOR • ML engineer needs an assessment for how far the generated result is from the ideal • Example: pixelwise loss function
  • 40. TRAINING: ONLY THE GENERATOR Top: faces generated after 1 epoch (~700 000 training samples) Bottom: ground truth frontal face photographs • ML engineer needs an assessment for how far the generated result is from the ideal • Example: pixelwise loss function generated output ground truth
  • 41. TRAINING: ONLY THE GENERATOR Top: faces generated after 10 epochs Bottom: actual frontal face photographs • ML engineer needs an assessment for how far the generated result is from the ideal • Example: pixelwise loss function generated output ground truth
  • 42. TRAINING: ONLY THE GENERATOR Top: faces generated after 50 epochs Bottom: actual frontal face photographs • ML engineer needs an assessment for how far the generated result is from the ideal • Example: pixelwise loss function generated output ground truth
  • 43. TRAINING: ONLY THE GENERATOR Top: faces generated after 400 epochs Bottom: actual frontal face photographs • ML engineer needs an assessment for how far the generated result is from the ideal • Example: pixelwise loss function generated output ground truth
  • 44. TRAINING: ONLY THE GENERATOR Top: faces generated after 400 epochs Bottom: actual frontal face photographs • Why does this work? • We have a lot of trainable parameters (~ 5 000 000) generated output ground truth
  • 45. INFERENCE Model after one training epoch: results are blurry • Training for too long leads to overfitting the training data: the model does not generalise well at inference time • How can we get good training results faster? Top: input Middle: generated output Bottom: ground truth
  • 46. INFERENCE Model after 50 training epochs: getting better • Training for too long leads to overfitting the training data: the model does not generalise well at inference time • How can we get good training results faster? Top: input Middle: generated output Bottom: ground truth
  • 47. INFERENCE Model after 400 epochs: generated images are getting worse • Training for too long leads to overfitting the training data: the model does not generalise well at inference time • How can we get good training results faster? Top: input Middle: generated output Bottom: ground truth
  • 48. TRAINING THE GAN: GENERATOR + DISCRIMINATOR Top: faces generated after 1 epoch (old model) Bottom: actual frontal face photographs 1. Minimize the pixel wise loss as before 2. Fool the Discriminator into believing the generated images are Real generated output ground truth Train Generator + Discriminator. Two objectives for the Generator:
  • 49. TRAINING THE GAN: GENERATOR + DISCRIMINATOR Old model + GAN after 1 training epoch: fine features are sharpened much faster 1. Minimize the pixel wise loss as before 2. Fool the Discriminator into believing the generated images are Real generated output ground truth Train Generator + Discriminator. Two objectives for the Generator:
  • 50. TRAINING THE GAN: GENERATOR + DISCRIMINATOR Only the Generator Generated output after 10 training epochs Train Generator + Discriminator. Two objectives for the Generator: GAN = Generator + Discriminator 1. Minimize the pixel wise loss as before 2. Fool the Discriminator into believing the generated images are Real
  • 51. TRAINING THE GAN: GENERATOR + DISCRIMINATOR Only the Generator 1. Minimize the pixel wise loss as before 2. Fool the Discriminator into believing the generated images are Real Generated output after 10 training epochs Train Generator + Discriminator. Two objectives for the Generator: GAN = Generator + Discriminator
  • 52. 1. With GAN we get better visual quality for the training set faster 2. Stop training earlier 3. The final model will generalise better TRAINING THE GAN: GENERATOR + DISCRIMINATOR Generated output after 10 training epochs Only the Generator GAN = Generator + Discriminator
  • 53. COMBINED LOSS FUNCTION Combined Loss function 1. Pixelwise loss for the generator: how close is the output to ground truth? 2. Binary Cross Entropy loss for the discriminator: Fake or Real Fig: http://skymind.ai/wiki/generative-adversarial-network-gan Loss = the difference between the generated output and the desired output input generated output ground truth
  • 54. 1. Fine features: small in pixelwise loss 2. Discriminator: uses fine features to categorise images as Real or Fake 3. Result: better visual quality of the output Super resolution vs. Super resolution w/ GAN “Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network” by Twitter (2017) Loss = the difference between the generated output and the desired output input generated output ground truth COMBINED LOSS FUNCTION
  • 55. CONCLUSION 1. Using GANs in Supervised Learning can be a good idea 2. Training such complex deep networks benefits greatly from a GPU
  • 56. Thank You Stay tuned for exclusive how-to's and updates, follow us on Twitter and LinkedIn @Scaleway Emplacement QR Code You can also follow me on LinkedIn www.linkedin.com/in/olga-p-petrova/ The face frontalization GAN code can be found on www.github.com/scaleway/frontalization