SlideShare a Scribd company logo
1 of 37
Download to read offline
[course site]
Visualization
Day 2 Lecture 3
Amaia Salvador
Visualization
Understand what ConvNets learn
2
Visualization
The development of better convnets
is reduced to trial-and-error.
Visualization can help in
proposing better architectures.
3
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
4
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
5
Visualize Learned Weights AlexNet
conv1
Filters are only interpretable on the first layer
6
Visualize Learned Weights
layer 2 weights
layer 3 weights
Source: ConvnetJS
7
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
8
Visualize Activations
Visualize image patches that maximally activate a neuron
Girshick et al. Rich feature hierarchies for accurate object detection and semantic segmentation. CVPR 2014
9
Visualize Activations
1. Iteratively forward the same image through the
network, occluding a different region at a time.
2. Keep track of the probability of the correct class
w.r.t. the position of the occluder
Zeiler and Fergus. Visualizing and Understanding Convolutional Networks. ECCV 2015 10
Occlusion experiments
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
11
Visualize Representation Space: t-SNE
Extract fc7 as the 4096-dimensional code for each image
12
Visualize Representation Space: t-SNE
Embed high dimensional data points
(i.e. feature codes) so that pairwise
distances are conserved in local
neighborhoods.
Maaten & Hinton. Visualizing High-Dimensional Data using t-SNE.
Journal of Machine Learning Research (2008).
13
Visualize Representation Space: t-SNE
t-SNE on fc7 features from AlexNet.
Source:
http://cs.stanford.edu/people/karpathy/cnnembed/
t-SNE implementation on scikit-learn
14
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
15
Deconvolution approach
Compute the gradient of any neuron w.r.t. the image
1. Forward image up to the desired layer (e.g. conv5)
2. Set all gradients to 0
3. Set gradient for the neuron we are interested in to 1
4. Backpropagate to get reconstructed image (gradient on the image)
Visualize the part of an image that mostly activates a neuron
16
Deconvolution approach
1. Forward image up to the desired layer (e.g. conv5)
2. Set all gradients to 0
3. Set gradient for the neuron we are interested in to 1
4. Backpropagate to get reconstructed image (gradient on the image)
Regular backprop Guided backprop*
Springenberg, Dosovitskiy, et al. Striving for Simplicity: The All Convolutional Net. ICLR 2015
Guided backprop: Only positive gradients are back-propagated. Generates cleaner results.
17
Deconvolution approach
Springenberg, Dosovitskiy, et al. Striving for Simplicity: The All Convolutional Net. ICLR 2015
18
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
19
Optimization approach
Simonyan et al. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps, 2014
Obtain the image that maximizes a class score
1. Forward random image
2. Set the gradient of the scores vector to be [0,0,0…,1,...,0,0]
3. Backprop (w/ L2 regularization)
4. Update image
5. Repeat
20
Optimization approach
Simonyan et al. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps, 2014 21
Optimization approach
Simonyan et al. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps, 2014 22
Deep Visualization Toolbox
http://yosinski.com/deepvis
Optimization & Deconv-based visualizations
23
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
24
DeepDream
https://github.com/google/deepdream
25
DeepDream
1. Forward image up to some layer (e.g. conv5)
2. Set the gradients to equal the activations on that layer
3. Backprop (with regularization)
4. Update the image
5. Repeat
26
DeepDream
1. Forward image up to some layer (e.g. conv5)
2. Set the gradients to equal the activations on that layer
3. Backprop (with regularization)
4. Update the image
5. Repeat
At each iteration, the image is
updated to boost all features
that activated in that layer in
the forward pass.
27
DeepDream
28
More examples here
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
29
Neural Style
Gatys et al. A neural algorithm of artistic style. 2015
Style image Content image Result
30
Neural Style
Extract raw activations in all layers. These activations will represent the contents of the image.
31
Gatys et al. A neural algorithm of artistic style. 2015
Neural Style
V =
● Activations are also extracted from the style image for all layers.
● Instead of the raw activations, gram matrices (G) are computed at each layer to represent the style.
E.g. at conv5 [13x13x256], reshape to:
169
256
...
G = VT
V
The Gram matrix G gives the
correlations between filter responses.
32
Neural Style
match content
match style
Match gram matrices
from style image
Match activations
from content image
33
Gatys et al. A neural algorithm of artistic style. 2015
Neural Style
match content
match style
Match gram matrices
from style image
Match activations
from content image
34
Gatys et al. A neural algorithm of artistic style. 2015
Neural Style
35
Gatys et al. A neural algorithm of artistic style. 2015
Visualization
● Learned weights
● Activations from data
● Representation space
● Deconvolution-based
● Optimization-based
● DeepDream
● Neural Style
36
Resources
● Related Lecture from CS231n @ Stanford [slides][video]
● ConvnetJS
● t-SNE visualization of CNN codes
● t-SNE implementation on scikit-learn
● Deepvis toolbox
● DrawNet from MIT: Visualize strong activations & connections between units
● 3D Visualization of a Convolutional Neural Network
● NeuralStyle:
○ Torch implementation
○ Deepart.io: Upload image, choose style, (wait), download new image with style :)
● Keras examples:
○ Optimization-based visualization Example in Keras
○ DeepDream in Keras
○ NeuralStyle in Keras
37

More Related Content

What's hot

What's hot (20)

Deep Learning for Computer Vision: Unsupervised Learning (UPC 2016)
Deep Learning for Computer Vision: Unsupervised Learning (UPC 2016)Deep Learning for Computer Vision: Unsupervised Learning (UPC 2016)
Deep Learning for Computer Vision: Unsupervised Learning (UPC 2016)
 
Optimizing Deep Networks (D1L6 Insight@DCU Machine Learning Workshop 2017)
Optimizing Deep Networks (D1L6 Insight@DCU Machine Learning Workshop 2017)Optimizing Deep Networks (D1L6 Insight@DCU Machine Learning Workshop 2017)
Optimizing Deep Networks (D1L6 Insight@DCU Machine Learning Workshop 2017)
 
Unsupervised Learning (D2L6 2017 UPC Deep Learning for Computer Vision)
Unsupervised Learning (D2L6 2017 UPC Deep Learning for Computer Vision)Unsupervised Learning (D2L6 2017 UPC Deep Learning for Computer Vision)
Unsupervised Learning (D2L6 2017 UPC Deep Learning for Computer Vision)
 
Visualization of Deep Learning Models (D1L6 2017 UPC Deep Learning for Comput...
Visualization of Deep Learning Models (D1L6 2017 UPC Deep Learning for Comput...Visualization of Deep Learning Models (D1L6 2017 UPC Deep Learning for Comput...
Visualization of Deep Learning Models (D1L6 2017 UPC Deep Learning for Comput...
 
Joint unsupervised learning of deep representations and image clusters
Joint unsupervised learning of deep representations and image clustersJoint unsupervised learning of deep representations and image clusters
Joint unsupervised learning of deep representations and image clusters
 
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)
 
Deep Learning for Computer Vision: Transfer Learning and Domain Adaptation (U...
Deep Learning for Computer Vision: Transfer Learning and Domain Adaptation (U...Deep Learning for Computer Vision: Transfer Learning and Domain Adaptation (U...
Deep Learning for Computer Vision: Transfer Learning and Domain Adaptation (U...
 
Transfer Learning (D2L4 Insight@DCU Machine Learning Workshop 2017)
Transfer Learning (D2L4 Insight@DCU Machine Learning Workshop 2017)Transfer Learning (D2L4 Insight@DCU Machine Learning Workshop 2017)
Transfer Learning (D2L4 Insight@DCU Machine Learning Workshop 2017)
 
Deep Learning for Computer Vision: Segmentation (UPC 2016)
Deep Learning for Computer Vision: Segmentation (UPC 2016)Deep Learning for Computer Vision: Segmentation (UPC 2016)
Deep Learning for Computer Vision: Segmentation (UPC 2016)
 
Deep Learning for Computer Vision: Memory usage and computational considerati...
Deep Learning for Computer Vision: Memory usage and computational considerati...Deep Learning for Computer Vision: Memory usage and computational considerati...
Deep Learning for Computer Vision: Memory usage and computational considerati...
 
Deep Neural Networks (D1L2 Insight@DCU Machine Learning Workshop 2017)
Deep Neural Networks (D1L2 Insight@DCU Machine Learning Workshop 2017)Deep Neural Networks (D1L2 Insight@DCU Machine Learning Workshop 2017)
Deep Neural Networks (D1L2 Insight@DCU Machine Learning Workshop 2017)
 
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...
 
Convolutional Neural Networks (D1L3 2017 UPC Deep Learning for Computer Vision)
Convolutional Neural Networks (D1L3 2017 UPC Deep Learning for Computer Vision)Convolutional Neural Networks (D1L3 2017 UPC Deep Learning for Computer Vision)
Convolutional Neural Networks (D1L3 2017 UPC Deep Learning for Computer Vision)
 
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
 
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
Deep 3D Visual Analysis - Javier Ruiz-Hidalgo - UPC Barcelona 2017
 
Image Classification using deep learning
Image Classification using deep learning Image Classification using deep learning
Image Classification using deep learning
 
Image classification using cnn
Image classification using cnnImage classification using cnn
Image classification using cnn
 
Attention Models (D3L6 2017 UPC Deep Learning for Computer Vision)
Attention Models (D3L6 2017 UPC Deep Learning for Computer Vision)Attention Models (D3L6 2017 UPC Deep Learning for Computer Vision)
Attention Models (D3L6 2017 UPC Deep Learning for Computer Vision)
 
Image classification using CNN
Image classification using CNNImage classification using CNN
Image classification using CNN
 
Optimization for Deep Networks (D2L1 2017 UPC Deep Learning for Computer Vision)
Optimization for Deep Networks (D2L1 2017 UPC Deep Learning for Computer Vision)Optimization for Deep Networks (D2L1 2017 UPC Deep Learning for Computer Vision)
Optimization for Deep Networks (D2L1 2017 UPC Deep Learning for Computer Vision)
 

Viewers also liked

Surface Normal Prediction using Hypercolumn Skip-Net & Normal-Depth
Surface Normal Prediction using Hypercolumn Skip-Net & Normal-DepthSurface Normal Prediction using Hypercolumn Skip-Net & Normal-Depth
Surface Normal Prediction using Hypercolumn Skip-Net & Normal-Depth
Chinghang chen
 
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Universitat Politècnica de Catalunya
 

Viewers also liked (17)

Deep Learning for Computer Vision: Image Classification (UPC 2016)
Deep Learning for Computer Vision: Image Classification (UPC 2016)Deep Learning for Computer Vision: Image Classification (UPC 2016)
Deep Learning for Computer Vision: Image Classification (UPC 2016)
 
Deep Learning for Computer Vision: ImageNet Challenge (UPC 2016)
Deep Learning for Computer Vision: ImageNet Challenge (UPC 2016)Deep Learning for Computer Vision: ImageNet Challenge (UPC 2016)
Deep Learning for Computer Vision: ImageNet Challenge (UPC 2016)
 
Deep Learning for Computer Vision: Object Detection (UPC 2016)
Deep Learning for Computer Vision: Object Detection (UPC 2016)Deep Learning for Computer Vision: Object Detection (UPC 2016)
Deep Learning for Computer Vision: Object Detection (UPC 2016)
 
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
 
Deep Learning for Computer Vision: Image Retrieval (UPC 2016)
Deep Learning for Computer Vision: Image Retrieval (UPC 2016)Deep Learning for Computer Vision: Image Retrieval (UPC 2016)
Deep Learning for Computer Vision: Image Retrieval (UPC 2016)
 
Deep Learning for Computer Vision: Face Recognition (UPC 2016)
Deep Learning for Computer Vision: Face Recognition (UPC 2016)Deep Learning for Computer Vision: Face Recognition (UPC 2016)
Deep Learning for Computer Vision: Face Recognition (UPC 2016)
 
Deep Learning for Computer Vision: Welcome (UPC TelecomBCN 2016)
Deep Learning for Computer Vision: Welcome (UPC TelecomBCN 2016)Deep Learning for Computer Vision: Welcome (UPC TelecomBCN 2016)
Deep Learning for Computer Vision: Welcome (UPC TelecomBCN 2016)
 
Deep Learning for Computer Vision: Recurrent Neural Networks (UPC 2016)
Deep Learning for Computer Vision: Recurrent Neural Networks (UPC 2016)Deep Learning for Computer Vision: Recurrent Neural Networks (UPC 2016)
Deep Learning for Computer Vision: Recurrent Neural Networks (UPC 2016)
 
Deep Learning for Computer Vision: Optimization (UPC 2016)
Deep Learning for Computer Vision: Optimization (UPC 2016)Deep Learning for Computer Vision: Optimization (UPC 2016)
Deep Learning for Computer Vision: Optimization (UPC 2016)
 
Deep Learning for Computer Vision: Medical Imaging (UPC 2016)
Deep Learning for Computer Vision: Medical Imaging (UPC 2016)Deep Learning for Computer Vision: Medical Imaging (UPC 2016)
Deep Learning for Computer Vision: Medical Imaging (UPC 2016)
 
Deep Learning for Computer Vision: Video Analytics (UPC 2016)
Deep Learning for Computer Vision: Video Analytics (UPC 2016)Deep Learning for Computer Vision: Video Analytics (UPC 2016)
Deep Learning for Computer Vision: Video Analytics (UPC 2016)
 
Surface Normal Prediction using Hypercolumn Skip-Net & Normal-Depth
Surface Normal Prediction using Hypercolumn Skip-Net & Normal-DepthSurface Normal Prediction using Hypercolumn Skip-Net & Normal-Depth
Surface Normal Prediction using Hypercolumn Skip-Net & Normal-Depth
 
Deep Learning for Computer Vision: Closing (UPC 2016)
Deep Learning for Computer Vision: Closing (UPC 2016)Deep Learning for Computer Vision: Closing (UPC 2016)
Deep Learning for Computer Vision: Closing (UPC 2016)
 
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016
 
Case Study of Convolutional Neural Network
Case Study of Convolutional Neural NetworkCase Study of Convolutional Neural Network
Case Study of Convolutional Neural Network
 
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
 
Deep Learning - Convolutional Neural Networks - Architectural Zoo
Deep Learning - Convolutional Neural Networks - Architectural ZooDeep Learning - Convolutional Neural Networks - Architectural Zoo
Deep Learning - Convolutional Neural Networks - Architectural Zoo
 

Similar to Deep Learning for Computer Vision: Visualization (UPC 2016)

nips report
nips reportnips report
nips report
?? ?
 

Similar to Deep Learning for Computer Vision: Visualization (UPC 2016) (20)

Learning with Relative Attributes
Learning with Relative AttributesLearning with Relative Attributes
Learning with Relative Attributes
 
Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017
 
Computer Vision.pptx
Computer Vision.pptxComputer Vision.pptx
Computer Vision.pptx
 
Decomposing image generation into layout priction and conditional synthesis
Decomposing image generation into layout priction and conditional synthesisDecomposing image generation into layout priction and conditional synthesis
Decomposing image generation into layout priction and conditional synthesis
 
cnn ppt.pptx
cnn ppt.pptxcnn ppt.pptx
cnn ppt.pptx
 
Dividing and Aggregating Network for Multi-view Action Recognition [Poster in...
Dividing and Aggregating Network for Multi-view Action Recognition [Poster in...Dividing and Aggregating Network for Multi-view Action Recognition [Poster in...
Dividing and Aggregating Network for Multi-view Action Recognition [Poster in...
 
Graph Neural Network #2-1 (PinSage)
Graph Neural Network #2-1 (PinSage)Graph Neural Network #2-1 (PinSage)
Graph Neural Network #2-1 (PinSage)
 
Unsupervised Object Detection
Unsupervised Object DetectionUnsupervised Object Detection
Unsupervised Object Detection
 
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
Deep Computer Vision - 1.pptx
Deep Computer Vision - 1.pptxDeep Computer Vision - 1.pptx
Deep Computer Vision - 1.pptx
 
Deep Convolutional 3D Object Classification from a Single Depth Image and Its...
Deep Convolutional 3D Object Classification from a Single Depth Image and Its...Deep Convolutional 3D Object Classification from a Single Depth Image and Its...
Deep Convolutional 3D Object Classification from a Single Depth Image and Its...
 
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
An Approach for Image Deblurring: Based on Sparse Representation and Regulari...
 
Image Classification using Deep Learning
Image Classification using Deep LearningImage Classification using Deep Learning
Image Classification using Deep Learning
 
物件偵測與辨識技術
物件偵測與辨識技術物件偵測與辨識技術
物件偵測與辨識技術
 
Towards better analysis of deep convolutional neural networks
Towards better analysis of deep convolutional neural networksTowards better analysis of deep convolutional neural networks
Towards better analysis of deep convolutional neural networks
 
Seeing what a gan cannot generate: paper review
Seeing what a gan cannot generate: paper reviewSeeing what a gan cannot generate: paper review
Seeing what a gan cannot generate: paper review
 
Lecture 29 Convolutional Neural Networks - Computer Vision Spring2015
Lecture 29 Convolutional Neural Networks -  Computer Vision Spring2015Lecture 29 Convolutional Neural Networks -  Computer Vision Spring2015
Lecture 29 Convolutional Neural Networks - Computer Vision Spring2015
 
Gil Shapira's Active Appearance Model slides
Gil Shapira's Active Appearance Model slidesGil Shapira's Active Appearance Model slides
Gil Shapira's Active Appearance Model slides
 
nips report
nips reportnips report
nips report
 

More from Universitat Politècnica de Catalunya

Generation of Synthetic Referring Expressions for Object Segmentation in Videos
Generation of Synthetic Referring Expressions for Object Segmentation in VideosGeneration of Synthetic Referring Expressions for Object Segmentation in Videos
Generation of Synthetic Referring Expressions for Object Segmentation in Videos
Universitat Politècnica de Catalunya
 

More from Universitat Politècnica de Catalunya (20)

Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Deep Generative Learning for All
Deep Generative Learning for AllDeep Generative Learning for All
Deep Generative Learning for All
 
The Transformer in Vision | Xavier Giro | Master in Computer Vision Barcelona...
The Transformer in Vision | Xavier Giro | Master in Computer Vision Barcelona...The Transformer in Vision | Xavier Giro | Master in Computer Vision Barcelona...
The Transformer in Vision | Xavier Giro | Master in Computer Vision Barcelona...
 
Towards Sign Language Translation & Production | Xavier Giro-i-Nieto
Towards Sign Language Translation & Production | Xavier Giro-i-NietoTowards Sign Language Translation & Production | Xavier Giro-i-Nieto
Towards Sign Language Translation & Production | Xavier Giro-i-Nieto
 
The Transformer - Xavier Giró - UPC Barcelona 2021
The Transformer - Xavier Giró - UPC Barcelona 2021The Transformer - Xavier Giró - UPC Barcelona 2021
The Transformer - Xavier Giró - UPC Barcelona 2021
 
Learning Representations for Sign Language Videos - Xavier Giro - NIST TRECVI...
Learning Representations for Sign Language Videos - Xavier Giro - NIST TRECVI...Learning Representations for Sign Language Videos - Xavier Giro - NIST TRECVI...
Learning Representations for Sign Language Videos - Xavier Giro - NIST TRECVI...
 
Open challenges in sign language translation and production
Open challenges in sign language translation and productionOpen challenges in sign language translation and production
Open challenges in sign language translation and production
 
Generation of Synthetic Referring Expressions for Object Segmentation in Videos
Generation of Synthetic Referring Expressions for Object Segmentation in VideosGeneration of Synthetic Referring Expressions for Object Segmentation in Videos
Generation of Synthetic Referring Expressions for Object Segmentation in Videos
 
Discovery and Learning of Navigation Goals from Pixels in Minecraft
Discovery and Learning of Navigation Goals from Pixels in MinecraftDiscovery and Learning of Navigation Goals from Pixels in Minecraft
Discovery and Learning of Navigation Goals from Pixels in Minecraft
 
Learn2Sign : Sign language recognition and translation using human keypoint e...
Learn2Sign : Sign language recognition and translation using human keypoint e...Learn2Sign : Sign language recognition and translation using human keypoint e...
Learn2Sign : Sign language recognition and translation using human keypoint e...
 
Intepretability / Explainable AI for Deep Neural Networks
Intepretability / Explainable AI for Deep Neural NetworksIntepretability / Explainable AI for Deep Neural Networks
Intepretability / Explainable AI for Deep Neural Networks
 
Convolutional Neural Networks - Xavier Giro - UPC TelecomBCN Barcelona 2020
Convolutional Neural Networks - Xavier Giro - UPC TelecomBCN Barcelona 2020Convolutional Neural Networks - Xavier Giro - UPC TelecomBCN Barcelona 2020
Convolutional Neural Networks - Xavier Giro - UPC TelecomBCN Barcelona 2020
 
Self-Supervised Audio-Visual Learning - Xavier Giro - UPC TelecomBCN Barcelon...
Self-Supervised Audio-Visual Learning - Xavier Giro - UPC TelecomBCN Barcelon...Self-Supervised Audio-Visual Learning - Xavier Giro - UPC TelecomBCN Barcelon...
Self-Supervised Audio-Visual Learning - Xavier Giro - UPC TelecomBCN Barcelon...
 
Attention for Deep Learning - Xavier Giro - UPC TelecomBCN Barcelona 2020
Attention for Deep Learning - Xavier Giro - UPC TelecomBCN Barcelona 2020Attention for Deep Learning - Xavier Giro - UPC TelecomBCN Barcelona 2020
Attention for Deep Learning - Xavier Giro - UPC TelecomBCN Barcelona 2020
 
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...
Generative Adversarial Networks GAN - Xavier Giro - UPC TelecomBCN Barcelona ...
 
Q-Learning with a Neural Network - Xavier Giró - UPC Barcelona 2020
Q-Learning with a Neural Network - Xavier Giró - UPC Barcelona 2020Q-Learning with a Neural Network - Xavier Giró - UPC Barcelona 2020
Q-Learning with a Neural Network - Xavier Giró - UPC Barcelona 2020
 
Language and Vision with Deep Learning - Xavier Giró - ACM ICMR 2020 (Tutorial)
Language and Vision with Deep Learning - Xavier Giró - ACM ICMR 2020 (Tutorial)Language and Vision with Deep Learning - Xavier Giró - ACM ICMR 2020 (Tutorial)
Language and Vision with Deep Learning - Xavier Giró - ACM ICMR 2020 (Tutorial)
 
Image Segmentation with Deep Learning - Xavier Giro & Carles Ventura - ISSonD...
Image Segmentation with Deep Learning - Xavier Giro & Carles Ventura - ISSonD...Image Segmentation with Deep Learning - Xavier Giro & Carles Ventura - ISSonD...
Image Segmentation with Deep Learning - Xavier Giro & Carles Ventura - ISSonD...
 
Curriculum Learning for Recurrent Video Object Segmentation
Curriculum Learning for Recurrent Video Object SegmentationCurriculum Learning for Recurrent Video Object Segmentation
Curriculum Learning for Recurrent Video Object Segmentation
 
Deep Self-supervised Learning for All - Xavier Giro - X-Europe 2020
Deep Self-supervised Learning for All - Xavier Giro - X-Europe 2020Deep Self-supervised Learning for All - Xavier Giro - X-Europe 2020
Deep Self-supervised Learning for All - Xavier Giro - X-Europe 2020
 

Recently uploaded

Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 

Recently uploaded (20)

VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
ELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptxELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptx
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 

Deep Learning for Computer Vision: Visualization (UPC 2016)

  • 1. [course site] Visualization Day 2 Lecture 3 Amaia Salvador
  • 3. Visualization The development of better convnets is reduced to trial-and-error. Visualization can help in proposing better architectures. 3
  • 4. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 4
  • 5. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 5
  • 6. Visualize Learned Weights AlexNet conv1 Filters are only interpretable on the first layer 6
  • 7. Visualize Learned Weights layer 2 weights layer 3 weights Source: ConvnetJS 7
  • 8. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 8
  • 9. Visualize Activations Visualize image patches that maximally activate a neuron Girshick et al. Rich feature hierarchies for accurate object detection and semantic segmentation. CVPR 2014 9
  • 10. Visualize Activations 1. Iteratively forward the same image through the network, occluding a different region at a time. 2. Keep track of the probability of the correct class w.r.t. the position of the occluder Zeiler and Fergus. Visualizing and Understanding Convolutional Networks. ECCV 2015 10 Occlusion experiments
  • 11. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 11
  • 12. Visualize Representation Space: t-SNE Extract fc7 as the 4096-dimensional code for each image 12
  • 13. Visualize Representation Space: t-SNE Embed high dimensional data points (i.e. feature codes) so that pairwise distances are conserved in local neighborhoods. Maaten & Hinton. Visualizing High-Dimensional Data using t-SNE. Journal of Machine Learning Research (2008). 13
  • 14. Visualize Representation Space: t-SNE t-SNE on fc7 features from AlexNet. Source: http://cs.stanford.edu/people/karpathy/cnnembed/ t-SNE implementation on scikit-learn 14
  • 15. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 15
  • 16. Deconvolution approach Compute the gradient of any neuron w.r.t. the image 1. Forward image up to the desired layer (e.g. conv5) 2. Set all gradients to 0 3. Set gradient for the neuron we are interested in to 1 4. Backpropagate to get reconstructed image (gradient on the image) Visualize the part of an image that mostly activates a neuron 16
  • 17. Deconvolution approach 1. Forward image up to the desired layer (e.g. conv5) 2. Set all gradients to 0 3. Set gradient for the neuron we are interested in to 1 4. Backpropagate to get reconstructed image (gradient on the image) Regular backprop Guided backprop* Springenberg, Dosovitskiy, et al. Striving for Simplicity: The All Convolutional Net. ICLR 2015 Guided backprop: Only positive gradients are back-propagated. Generates cleaner results. 17
  • 18. Deconvolution approach Springenberg, Dosovitskiy, et al. Striving for Simplicity: The All Convolutional Net. ICLR 2015 18
  • 19. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 19
  • 20. Optimization approach Simonyan et al. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps, 2014 Obtain the image that maximizes a class score 1. Forward random image 2. Set the gradient of the scores vector to be [0,0,0…,1,...,0,0] 3. Backprop (w/ L2 regularization) 4. Update image 5. Repeat 20
  • 21. Optimization approach Simonyan et al. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps, 2014 21
  • 22. Optimization approach Simonyan et al. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps, 2014 22
  • 24. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 24
  • 26. DeepDream 1. Forward image up to some layer (e.g. conv5) 2. Set the gradients to equal the activations on that layer 3. Backprop (with regularization) 4. Update the image 5. Repeat 26
  • 27. DeepDream 1. Forward image up to some layer (e.g. conv5) 2. Set the gradients to equal the activations on that layer 3. Backprop (with regularization) 4. Update the image 5. Repeat At each iteration, the image is updated to boost all features that activated in that layer in the forward pass. 27
  • 29. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 29
  • 30. Neural Style Gatys et al. A neural algorithm of artistic style. 2015 Style image Content image Result 30
  • 31. Neural Style Extract raw activations in all layers. These activations will represent the contents of the image. 31 Gatys et al. A neural algorithm of artistic style. 2015
  • 32. Neural Style V = ● Activations are also extracted from the style image for all layers. ● Instead of the raw activations, gram matrices (G) are computed at each layer to represent the style. E.g. at conv5 [13x13x256], reshape to: 169 256 ... G = VT V The Gram matrix G gives the correlations between filter responses. 32
  • 33. Neural Style match content match style Match gram matrices from style image Match activations from content image 33 Gatys et al. A neural algorithm of artistic style. 2015
  • 34. Neural Style match content match style Match gram matrices from style image Match activations from content image 34 Gatys et al. A neural algorithm of artistic style. 2015
  • 35. Neural Style 35 Gatys et al. A neural algorithm of artistic style. 2015
  • 36. Visualization ● Learned weights ● Activations from data ● Representation space ● Deconvolution-based ● Optimization-based ● DeepDream ● Neural Style 36
  • 37. Resources ● Related Lecture from CS231n @ Stanford [slides][video] ● ConvnetJS ● t-SNE visualization of CNN codes ● t-SNE implementation on scikit-learn ● Deepvis toolbox ● DrawNet from MIT: Visualize strong activations & connections between units ● 3D Visualization of a Convolutional Neural Network ● NeuralStyle: ○ Torch implementation ○ Deepart.io: Upload image, choose style, (wait), download new image with style :) ● Keras examples: ○ Optimization-based visualization Example in Keras ○ DeepDream in Keras ○ NeuralStyle in Keras 37