Generative Modeling with Convolutional Neural Networks. Denis Dus Data Scientist at InData Labs

Similar documents
GENERATIVE ADVERSARIAL NETWORKS (GAN) Presented by Omer Stein and Moran Rubin

Introduction to GAN. Generative Adversarial Networks. Junheng(Jeff) Hao

Alternatives to Direct Supervision

Introduction to GAN. Generative Adversarial Networks. Junheng(Jeff) Hao

(University Improving of Montreal) Generative Adversarial Networks with Denoising Feature Matching / 17

An Empirical Study of Generative Adversarial Networks for Computer Vision Tasks

Inception and Residual Networks. Hantao Zhang. Deep Learning with Python.

Inception Network Overview. David White CS793

Lab meeting (Paper review session) Stacked Generative Adversarial Networks

CNNS FROM THE BASICS TO RECENT ADVANCES. Dmytro Mishkin Center for Machine Perception Czech Technical University in Prague

POINT CLOUD DEEP LEARNING

Introduction to Generative Adversarial Networks

Unsupervised Learning

Fuzzy Set Theory in Computer Vision: Example 3

Convolutional Neural Networks

INTRODUCTION TO DEEP LEARNING

Lecture 3 GANs and Their Applications in Image Generation

Deep Learning Explained Module 4: Convolution Neural Networks (CNN or Conv Nets)

Tutorial on Keras CAP ADVANCED COMPUTER VISION SPRING 2018 KISHAN S ATHREY

Deep Learning with Tensorflow AlexNet

COMP9444 Neural Networks and Deep Learning 7. Image Processing. COMP9444 c Alan Blair, 2017

Learning to generate with adversarial networks

CNN Basics. Chongruo Wu

Deep Learning for Embedded Security Evaluation

Autoencoder. Representation learning (related to dictionary learning) Both the input and the output are x

Defense Data Generation in Distributed Deep Learning System Se-Yoon Oh / ADD-IDAR

Como funciona o Deep Learning

arxiv: v1 [cs.gr] 27 Dec 2018

Convolutional Neural Networks. Computer Vision Jia-Bin Huang, Virginia Tech

Data Set Extension with Generative Adversarial Nets

Autoencoders. Stephen Scott. Introduction. Basic Idea. Stacked AE. Denoising AE. Sparse AE. Contractive AE. Variational AE GAN.

Know your data - many types of networks

Deep Learning for Computer Vision II

Intro to Deep Learning. Slides Credit: Andrej Karapathy, Derek Hoiem, Marc Aurelio, Yann LeCunn

arxiv: v1 [cs.ne] 11 Jun 2018

Deep Residual Learning

CENG 783. Special topics in. Deep Learning. AlchemyAPI. Week 11. Sinan Kalkan

Reconstructing Pore Networks Using Generative Adversarial Networks

Text to Image Synthesis Using Generative Adversarial Networks

Implicit generative models: dual vs. primal approaches

Deep Learning in Visual Recognition. Thanks Da Zhang for the slides

Lecture 19: Generative Adversarial Networks

NVIDIA FOR DEEP LEARNING. Bill Veenhuis

Encoder-Decoder Networks for Semantic Segmentation. Sachin Mehta

Generative Adversarial Nets. Priyanka Mehta Sudhanshu Srivastava

Fei-Fei Li & Justin Johnson & Serena Yeung

Image Restoration with Deep Generative Models

Deep Learning Cook Book

Generative Adversarial Network

Convolutional Neural Networks: Applications and a short timeline. 7th Deep Learning Meetup Kornel Kis Vienna,

CS230: Lecture 4 Attacking Networks with Adversarial Examples - Generative Adversarial Networks

GAN Frontiers/Related Methods

Midterm Review. CS230 Fall 2018

Introduction to Generative Models (and GANs)

Introduction to Generative Adversarial Networks

Fuzzy Set Theory in Computer Vision: Example 3, Part II

Semi-Supervised Generative Adversarial Nets with Multiple Generators for SAR Image Recognition

Machine Learning. Deep Learning. Eric Xing (and Pengtao Xie) , Fall Lecture 8, October 6, Eric CMU,

What was Monet seeing while painting? Translating artworks to photo-realistic images M. Tomei, L. Baraldi, M. Cornia, R. Cucchiara

Learning Deep Representations for Visual Recognition

Generative Adversarial Networks (GANs) Based on slides from Ian Goodfellow s NIPS 2016 tutorial

Multi-Task Self-Supervised Visual Learning

Human Pose Estimation with Deep Learning. Wei Yang

Study of Residual Networks for Image Recognition

INF 5860 Machine learning for image classification. Lecture 11: Visualization Anne Solberg April 4, 2018

TGANv2: Efficient Training of Large Models for Video Generation with Multiple Subsampling Layers

Lip Movement Synthesis from Text

Deep Learning and Its Applications

A New CGAN Technique for Constrained Topology Design Optimization. Abstract

Adversarial Machine Learning

Adversarially Learned Inference

Countering Adversarial Images using Input Transformations

From attribute-labels to faces: face generation using a conditional generative adversarial network

DEEP NEURAL NETWORKS FOR OBJECT DETECTION

All You Want To Know About CNNs. Yukun Zhu

Deep Neural Network Hyperparameter Optimization with Genetic Algorithms

Convolutional Neural Networks and Supervised Learning

Bidirectional GAN. Adversarially Learned Inference (ICLR 2017) Adversarial Feature Learning (ICLR 2017)

Deep Learning for Visual Manipulation and Synthesis

S+U Learning through ANs - Pranjit Kalita

Quantitative Evaluation of Generative Adversarial Networks and Improved Training Techniques

Deep Learning for Computer Vision with MATLAB By Jon Cherrie

Spatial Localization and Detection. Lecture 8-1

Bridging Theory and Practice of GANs

Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset. By Joa õ Carreira and Andrew Zisserman Presenter: Zhisheng Huang 03/02/2018

Delving into Transferable Adversarial Examples and Black-box Attacks

CSE 559A: Computer Vision

CMU Lecture 18: Deep learning and Vision: Convolutional neural networks. Teacher: Gianni A. Di Caro

Dynamic Routing Between Capsules

Deep Learning For Video Classification. Presented by Natalie Carlebach & Gil Sharon

Single Image Super Resolution of Textures via CNNs. Andrew Palmer

Convolution Neural Networks for Chinese Handwriting Recognition

arxiv: v2 [cs.lg] 17 Dec 2018

Machine Learning. MGS Lecture 3: Deep Learning

Recovering Realistic Texture in Image Super-resolution by Deep Spatial Feature Transform. Xintao Wang Ke Yu Chao Dong Chen Change Loy

Places Challenge 2017

Everything you wanted to know about Deep Learning for Computer Vision but were afraid to ask

Advanced Video Analysis & Imaging

Towards Principled Methods for Training Generative Adversarial Networks. Martin Arjovsky & Léon Bottou

DL Tutorial. Xudong Cao

Transcription:

Generative Modeling with Convolutional Neural Networks Denis Dus Data Scientist at InData Labs

What we will discuss 1. 2. 3. 4. Discriminative vs Generative modeling Convolutional Neural Networks How to train a neural network to fool another network How to train a neural network to produce photorealistic images (GANs here) 5. What difficulties can we face and how to avoid them 6. How could GAN framework be used in real problems

Probabilistic Data Modeling Discriminative model Goal - to recover conditional distribution P(y x; θ) Decision boundary = {x, P(y=1 x; θ) = P(y=0 x; θ)} Generative model Goal - to recover the joint distribution P(x, y; θ) P(y x) = P(x, y; θ) / P(x) = P(y)P(x y; θ) / P(x)

Discriminative vs Generative

CNNs are strong discriminators

CNNs: Architectures 2D convolution: Spatial pooling:

CNNs: Architectures 1. Typical formula of Convolutional Neural Network INPUT [[CONV (BN) ReLU] * N (POOL)] * M [FC (BN) ReLU] * K FC 2. Variations ResNets / Inceptions (v1-v4) / 3. Tendencies A. Fully Convolutional Networks B. Reduction of the number of parameters and computational complexity

CNNs: VGG-16

CNNs: VGG-16 State of the Art for 2014!

CNNs: VGG-16 Layerwise Block 1: Input shape: 224x224x3 2 conv layer 64 filters of size 3x3 2x2 max pooling (stride 2) Block 5: 3 conv layer 512 filters of size 3x3 2x2 max pooling (stride 2) Output shape: 7x7x512

CNNs: Hierarchical Representation

CNNs: VGG-16 Layerwise 224x224x64 3.2 mln activations Gradient flow 7x7x512x4096 103 mln parameters

CNNs: ResNets Input block: Inputs shape: 224x224x3 64 filters of size 7x7 (stride 2) 3x3 max pooling (stride 2) Output shape: 56x56x64 (~200k activations) Residual block(s): Pre-output block: Input shape: 7x7x512 Global Average Pooling Output shape: 1x1x512

CNNs: ImageNet https://m2dsupsdlclass.github.io

Could CNNs act as strong generators?

Generative CNNs: Idea 1. The joint distribution of image pixels is very complex. 2. It is impossible to approximate it with classical methods.

Generative CNNs: Idea 1. The joint distribution of image pixels is very complex. 2. It is impossible to approximate it with classical methods. 3. We ll look for a parametric transformation of the following type:

Generative CNNs: Idea 1. The joint distribution of image pixels is very complex. 2. It is impossible to approximate it with classical methods. 3. We ll look for a parametric transformation of the following type: Something similar to reparametrization trick

Generative CNNs: Idea We have strong discriminative networks Weights of the networks trained on ImageNet dataset are publicly available https://github.com/fchollet/deep-learning-models If you have such network, for every image x you can get

Generative CNNs: Idea What should you do to generate images for the class Cup? Let s look for G(z θ) so that D(G(z θ)) is close to predefined distribution.

Generative CNNs: Practice - VGG-16 Before training the transformation G(z θ)

Generative CNNs: Practice - VGG-16 After training the transformation G(z θ)

Generative CNNs: Practice - ResNet-50 Before training the transformation G(z θ)

Generative CNNs: Practice - ResNet-50 After training the transformation G(z θ)

Generative CNNs: Too Naive How many images of shape 224x224 pixel exists? Natural images are only a small part of this number We did not require naturalness from G(z θ)! Only a predetermined classification was required!

CNNs: Hack em all! Let s consider the following optimization problem

CNNs: Hack em all - ResNet-50

CNNs: Hack em all - GoogLeNet

CNNs: Adversarial Attack Competition

Generative Adversarial Networks The statement of the problem lacks the requirement of image naturalness. Let s add it:

Generative Adversarial Networks The statement of the problem lacks the requirement of image naturalness. Let s add it: Jensen-Shannon Divergence Minimization

Generative Adversarial Networks

GAN: Discriminator

GAN: Generator

GAN Framework: Real Data

GAN Framework: Generator Evolution

GAN: Difficulties 1. Generation of large-sized images (more than 128x128 pixels) 2. The variability of real-world images 3. There is no guarantee that the game converges to an equilibrium state 4. It is difficult to keep D(x) and G(z) on the same quality level 5. Initially, D(x) has a very simple problem (in comparison with G(z)) 6. Quality assessment of G(z)

GAN: State of the Art

GAN: State of the Art

GAN: Variability and Size

GAN: Designing the D(x) 1. Normalize the input images in [-1.0, 1.0] 2. Should have less parameters than G(x) 3. Use Dropout / Spatial Dropout 4. 2x2 MaxPooling Convolution2D + Stride = 2 5. ReLU LeakyReLU 6. Adaptive L2 regularization / Label Smoothing / Instance Noise /... 7. Balancing of the min-max the game https://github.com/soumith/ganhacks Ian Goodfellow, Improved Techniques of Training GANs

GAN: Designing the D(x) In 2017: just use Wasserstein GAN

GAN: Designing the G(x) 1. Tanh on the last layer 2. min log(1-d(g(z)) max log(d(g(z)) 3. Should have more parameters than D(x) 4. Use Dropout / Spatial Dropout 5. UpSampling2D / Deconvolution2D 6. ReLU LeakyReLU 7. Batch Normalization https://github.com/soumith/ganhacks Ian Goodfellow, Improved Techniques of Training GANs

GAN: Image Segmentation One of the main Computer Vision tasks Objective function based on per-pixel loss functions

GAN: Image Segmentation Objective function based on per-pixel loss functions... which do not reflect many aspects of segmentation quality https://github.com/alexgkendall/segnet-tutorial

GAN: Image Segmentation

GAN: Image Segmentation

Many other interesting things 1. Types of GAN: CGAN, WGAN, Stacked GAN, Cycle GAN, 2. Alternative models: VAE, Pix2Pix,... 3. Other areas of application: generation of text/audio/video 4. Other practical tasks: Image Super-Resolution,...

Summary 1. CNNs perfectly cope with the CV tasks 2. But there is a serious problem with Adversarial Examples 3. GAN - is a very interesting idea at the intersection of areas of mathematics 4. GAN is not only fun, but also useful 5. Future improvements in this area are expected

Thank you! Denis Dus Data Scientist at InData Labs d_dus@indatalabs.com facebook: dzianis.dus www.indatalabs.com @indatalabs @indatalabs