SlideShare a Scribd company logo
Convolutional Neural
Networks
Anantharaman Palacode Narayana Iyer
narayana dot Anantharaman at gmail dot com
5 Aug 2017
References
“A dramatic moment in the meteoric rise of
deep learning came when a convolutional
network won this challenge for the first time
and by a wide margin, bringing down the
state-of-the-art top-5 error rate from 26.1% to
15.3% (Krizhevsky et al., 2012), meaning that
the convolutional network produces a ranked list
of possible categories for each image and the
correct category appeared in the first five entries
of this list for all but 15.3% of the test examples.
Since then, these competitions are consistently
won by deep convolutional nets, and as of this
writing, advances in deep learning have brought
the latest top-5 error rate in this contest down to
3.6%” – Ref: Deep Learning Book by Y Bengio
et al
What is a convolutional neural network?
Convolutional networks are simply
neural networks that use
convolution in place of general
matrix multiplication in at least
one of their layers.
• Convolution is a mathematical
operation having a linear form
Types of inputs
• Inputs have a structure
• Color images are three dimensional and so have a volume
• Time domain speech signals are 1-d while the frequency domain representations (e.g. MFCC
vectors) take a 2d form. They can also be looked at as a time sequence.
• Medical images (such as CT/MR/etc) are multidimensional
• Videos have the additional temporal dimension compared to stationary images
• Speech signals can be modelled as 2 dimensional
• Variable length sequences and time series data are again multidimensional
• Hence it makes sense to model them as tensors instead of vectors.
• The classifier then needs to accept a tensor as input and perform the necessary
machine learning task. In the case of an image, this tensor represents a volume.
CNNs are everywhere
• Image retrieval
• Detection
• Self driving cars
• Semantic segmentation
• Face recognition (FB tagging)
• Pose estimation
• Detect diseases
• Speech Recognition
• Text processing
• Analysing satellite data
Copyright 2016 JNResearch, All Rights Reserved
CNNs for applications that involve images
• Why CNNs are more suitable to process images?
• Pixels in an image correlate to each other. However, nearby pixels correlate
stronger and distant pixels don’t influence much
• Local features are important: Local Receptive Fields
• Affine transformations: The class of an image doesn’t change with translation. We
can build a feature detector that can look for a particular feature (e.g. an edge)
anywhere in the image plane by moving across. A convolutional layer may have
several such filters constituting the depth dimension of the layer.
Fully connected layers
• Fully connected layers (such as the hidden layers of a traditional neural network)
are agnostic to the structure of the input
• They take inputs as vectors and generate an output vector
• There is no requirement to share parameters unless forced upon in specific architectures.
This blows up the number of parameters as the input and/or output dimensions increase.
• Suppose we are to perform classification on an image of 100x100x3 dimensions.
• If we implement using a feed forward neural network that has an input, hidden
and an output layer, where: hidden units (nh) = 1000, output classes = 10 :
• Input layer = 10k pixels * 3 = 30k, weight matrix for hidden to input layer = 1k * 30k = 30 M
and output layer matrix size = 10 * 1000 = 10k
• We may handle this is by extracting the features using pre processing and
presenting a lower dimensional input to the Neural Network. But this requires
expert engineered features and hence domain knowledge
Convolution
𝐶𝑜𝑛𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑖𝑛 1 𝐷𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛:
𝑦 𝑛 =
𝑘=−∞
𝑘=∞
𝑥 𝑘 ℎ[𝑛 − 𝑘]
𝐶𝑜𝑛𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑖𝑛 2 𝐷𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛𝑠:
𝑦 𝑛1, 𝑛2 =
𝑘1=−∞
𝑘1=−∞
𝑘2=−∞
𝑘2=∞
𝑥 𝑘1, 𝑘2 ℎ[ 𝑛1 − 𝑘1 , 𝑛2 − 𝑘2 ]
Overview of Convolutional Neural Networks
CNNs
Types of layers in a CNN:
• Convolution Layer
• Pooling Layer
• Fully Connected Layer
Convolution Layer
• A layer in a regular neural
network take vector as input
and output a vector.
• A convolution layer takes a
tensor (3d volume for RGB
images) as input and
generates a tensor as output
Fig Credit: Lex Fridman, MIT, 6.S094
Slide Credit: Lex Fridman, MIT, 6.S094
Local Receptive Fields
• Filter (Kernel) is applied on the input image
like a moving window along width and height
• The depth of a filter matches that of the input.
• For each position of the filter, the dot product
of filter and the input are computed
(Activation)
• The 2d arrangement of these activations is
called an activation map.
• The number of such filters constitute the
depth of the convolution layer
Fig Credit: Lex Fridman, MIT, 6.S094
Convolution Operation between filter and image
• The convolution layer
computes dot products
between the filter and a
piece of image as it slides
along the image
• The step size of slide is
called stride
• Without any padding, the
convolution process
decreases the spatial
dimensions of the output
Fig Credit: A Karpathy, CS231n
Activation Maps
• Example:
• Consider an image 32 x 32 x 3 and a 5 x 5 x 3 filter.
• The convolution happens between a 5 x 5 x 3 chunk of the image with the filter: 𝑤 𝑇 𝑥 + 𝑏
• In this example we get 75 dimensional vector and a bias term
• In this example, with a stride of 1, we get 28 x 28 x 1 activation for 1 filter without padding
• If we have 6 filters, we would get 28 x 28 x 6 without padding
• In the above example we have an activation map of 28 x 28 per filter.
• Activation maps are feature inputs to the subsequent layer of the network
• Without any padding, the 2D surface area of the activation map is smaller than
the input surface area for a stride of >= 1
Copyright 2016 JNResearch, All Rights Reserved
Stacking Convolution Layers
Fig Credit: A Karpathy, CS231n
Feature Representation as a hierarchy
Padding
• The spatial (x, y) extent of the output produced by the convolutional layer is less
than the respective dimensions of the input (except for the special case of 1 x 1
filter with a stride 1).
• As we add more layers and use larger strides, the output surface dimensions keep
reducing and this may impact the accuracy.
• Often, we may want to preserve the spatial extent during the initial layers and
downsample them at a later time.
• Padding the input with suitable values (padding with zero is common) helps to
preserve the spatial size
Zero Padding the border
Fig Credit: A Karpathy, CS231n
Hyperparameters of the convolution layer
• Filter Size
• # Filters
• Stride
• Padding
Fig Credit: A Karpathy, CS231n
Pooling Layer
• Pooling is a downsampling
operation
• The rationale is that the “meaning”
embedded in a piece of image can
be captured using a small subset of
“important” pixels
• Max pooling and average pooling
are the two most common
operations
• Pooling layer doesn’t have any
trainable parameters
Fig Credit: A Karpathy, CS231n
Max Pooling Illustration
Popular Network Architectures
Current trend: Deeper Models
• CNNs consistently outperform other
approaches for the core tasks of CV
• Deeper models work better
• Increasing the number of parameters in layers
of CNN without increasing their depth is not
effective at increasing test set performance.
• Shallow models overfit at around 20 million
parameters while deep ones can benefit from
having over 60 million.
• Key insight: Model performs better when it is
architected to reflect composition of simpler
functions than a single complex function. This
may also be explained off viewing the
computation as a chain of dependencies
Overview of Convolutional Neural Networks
VGG Net
VGG net
ResNet
Core Tasks of Computer Vision
Core CV Task Task Description Output Metrics
Classification Given an image, assign a label Class Label Accuracy
Localization Determine the bounding box containing
the object in the given image
Box given by (x1, y1,
x2, y2)
Ratio of intersection to
the union (Overlap)
between the ground truth
and bounding box
Object
Detection
Given an image, detect all the objects and
their locations in the image
For each object:
(Label, Box)
Mean Avg Best Overlap
(MABO,) mean Average
Precision (mAP)
Semantic
Segmentation
Given an image, assign each pixel to a
class label, so that we can look at the
image as a set of labelled segments
A set of image
segments
Classification metrics,
Intersection by Union
overlap
Instance
Segmentation
Same as semantic segmentation, but each
instance of a segment class is determined
uniquely
A set of image
segments
Object Localization
• Given an image containing an object
of interest, determine the bounding
box for the object
• Classify the object
Slide Credit: A Karpathy, CS231n
Overview of Convolutional Neural Networks
Slide Credit: A Karpathy, CS231n
Overview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
Datasets for evaluation
• Imagenet challenges provide a platform for
researchers to benchmark their novel
algorithms
• PASCAL VOC 2010 is great for small scale
experiments. About 1.3 GB download size.
• MS COCO datasets are available for tasks
like Image Captioning. Download size is
huge but selective download is possible.

More Related Content

What's hot (20)

Machine Learning - Convolutional Neural Network
Machine Learning - Convolutional Neural NetworkMachine Learning - Convolutional Neural Network
Machine Learning - Convolutional Neural Network
Richard Kuo
 
Convolutional neural network
Convolutional neural network Convolutional neural network
Convolutional neural network
Yan Xu
 
Cnn
CnnCnn
Cnn
Nirthika Rajendran
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural network
Ferdous ahmed
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networks
Si Haem
 
Introduction to Recurrent Neural Network
Introduction to Recurrent Neural NetworkIntroduction to Recurrent Neural Network
Introduction to Recurrent Neural Network
Knoldus Inc.
 
CNN Tutorial
CNN TutorialCNN Tutorial
CNN Tutorial
Sungjoon Choi
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNN
Shuai Zhang
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
Basit Rafiq
 
Convolutional Neural Network
Convolutional Neural NetworkConvolutional Neural Network
Convolutional Neural Network
Vignesh Suresh
 
Recurrent Neural Network
Recurrent Neural NetworkRecurrent Neural Network
Recurrent Neural Network
Mohammad Sabouri
 
Convolutional Neural Network (CNN)
Convolutional Neural Network (CNN)Convolutional Neural Network (CNN)
Convolutional Neural Network (CNN)
Muhammad Haroon
 
CONVOLUTIONAL NEURAL NETWORK
CONVOLUTIONAL NEURAL NETWORKCONVOLUTIONAL NEURAL NETWORK
CONVOLUTIONAL NEURAL NETWORK
Md Rajib Bhuiyan
 
Object Detection Using R-CNN Deep Learning Framework
Object Detection Using R-CNN Deep Learning FrameworkObject Detection Using R-CNN Deep Learning Framework
Object Detection Using R-CNN Deep Learning Framework
Nader Karimi
 
LeNet to ResNet
LeNet to ResNetLeNet to ResNet
LeNet to ResNet
Somnath Banerjee
 
CNN and its applications by ketaki
CNN and its applications by ketakiCNN and its applications by ketaki
CNN and its applications by ketaki
Ketaki Patwari
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Simplilearn
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
mustafa aadel
 
Convolutional Neural Network (CNN) - image recognition
Convolutional Neural Network (CNN)  - image recognitionConvolutional Neural Network (CNN)  - image recognition
Convolutional Neural Network (CNN) - image recognition
YUNG-KUEI CHEN
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
Gaurav Mittal
 
Machine Learning - Convolutional Neural Network
Machine Learning - Convolutional Neural NetworkMachine Learning - Convolutional Neural Network
Machine Learning - Convolutional Neural Network
Richard Kuo
 
Convolutional neural network
Convolutional neural network Convolutional neural network
Convolutional neural network
Yan Xu
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural network
Ferdous ahmed
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networks
Si Haem
 
Introduction to Recurrent Neural Network
Introduction to Recurrent Neural NetworkIntroduction to Recurrent Neural Network
Introduction to Recurrent Neural Network
Knoldus Inc.
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNN
Shuai Zhang
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
Basit Rafiq
 
Convolutional Neural Network
Convolutional Neural NetworkConvolutional Neural Network
Convolutional Neural Network
Vignesh Suresh
 
Convolutional Neural Network (CNN)
Convolutional Neural Network (CNN)Convolutional Neural Network (CNN)
Convolutional Neural Network (CNN)
Muhammad Haroon
 
CONVOLUTIONAL NEURAL NETWORK
CONVOLUTIONAL NEURAL NETWORKCONVOLUTIONAL NEURAL NETWORK
CONVOLUTIONAL NEURAL NETWORK
Md Rajib Bhuiyan
 
Object Detection Using R-CNN Deep Learning Framework
Object Detection Using R-CNN Deep Learning FrameworkObject Detection Using R-CNN Deep Learning Framework
Object Detection Using R-CNN Deep Learning Framework
Nader Karimi
 
CNN and its applications by ketaki
CNN and its applications by ketakiCNN and its applications by ketaki
CNN and its applications by ketaki
Ketaki Patwari
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Simplilearn
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
mustafa aadel
 
Convolutional Neural Network (CNN) - image recognition
Convolutional Neural Network (CNN)  - image recognitionConvolutional Neural Network (CNN)  - image recognition
Convolutional Neural Network (CNN) - image recognition
YUNG-KUEI CHEN
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
Gaurav Mittal
 

Similar to Overview of Convolutional Neural Networks (20)

CNN_AH.pptx
CNN_AH.pptxCNN_AH.pptx
CNN_AH.pptx
ssuserc755f1
 
CNN_AH.pptx
CNN_AH.pptxCNN_AH.pptx
CNN_AH.pptx
ssuserc755f1
 
Mnist report ppt
Mnist report pptMnist report ppt
Mnist report ppt
RaghunandanJairam
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
Suraj Aavula
 
Convolution Neural Network_Artificial Intelligence_Good.pptx
Convolution Neural Network_Artificial Intelligence_Good.pptxConvolution Neural Network_Artificial Intelligence_Good.pptx
Convolution Neural Network_Artificial Intelligence_Good.pptx
AnnavarapuRajavarapr
 
DL.pdf
DL.pdfDL.pdf
DL.pdf
ssuserd23711
 
Introduction to Convolutional Neural Networks (CNNs).pptx
Introduction to Convolutional Neural Networks (CNNs).pptxIntroduction to Convolutional Neural Networks (CNNs).pptx
Introduction to Convolutional Neural Networks (CNNs).pptx
CHRISEVANS269099
 
Convolutional neural network in deep learning
Convolutional neural network in deep learningConvolutional neural network in deep learning
Convolutional neural network in deep learning
priyasjcettnj
 
Mnist report
Mnist reportMnist report
Mnist report
RaghunandanJairam
 
Introduction to convolutional networks .pptx
Introduction to convolutional networks .pptxIntroduction to convolutional networks .pptx
Introduction to convolutional networks .pptx
ArunNegi37
 
_AI_Stanford_Super_#DeepLearning_Cheat_Sheet!_😊🙃😀🙃😊.pdf
_AI_Stanford_Super_#DeepLearning_Cheat_Sheet!_😊🙃😀🙃😊.pdf_AI_Stanford_Super_#DeepLearning_Cheat_Sheet!_😊🙃😀🙃😊.pdf
_AI_Stanford_Super_#DeepLearning_Cheat_Sheet!_😊🙃😀🙃😊.pdf
SongsDrizzle
 
super-cheatsheet-deep-learning.pdf
super-cheatsheet-deep-learning.pdfsuper-cheatsheet-deep-learning.pdf
super-cheatsheet-deep-learning.pdf
DeanSchoolofElectron
 
build a Convolutional Neural Network (CNN) using TensorFlow in Python
build a Convolutional Neural Network (CNN) using TensorFlow in Pythonbuild a Convolutional Neural Network (CNN) using TensorFlow in Python
build a Convolutional Neural Network (CNN) using TensorFlow in Python
Kv Sagar
 
computervisionanditsapplications-190311134821.pptx
computervisionanditsapplications-190311134821.pptxcomputervisionanditsapplications-190311134821.pptx
computervisionanditsapplications-190311134821.pptx
OrxanMirzzad
 
Deep Computer Vision - 1.pptx
Deep Computer Vision - 1.pptxDeep Computer Vision - 1.pptx
Deep Computer Vision - 1.pptx
JawadHaider36
 
“Introduction to Computer Vision with Convolutional Neural Networks,” a Prese...
“Introduction to Computer Vision with Convolutional Neural Networks,” a Prese...“Introduction to Computer Vision with Convolutional Neural Networks,” a Prese...
“Introduction to Computer Vision with Convolutional Neural Networks,” a Prese...
Edge AI and Vision Alliance
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
milad abbasi
 
Cnn
CnnCnn
Cnn
Mehrnaz Faraz
 
NMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptxNMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptx
LEGENDARYTECHNICAL
 
NMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptxNMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptx
LEGENDARYTECHNICAL
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
Suraj Aavula
 
Convolution Neural Network_Artificial Intelligence_Good.pptx
Convolution Neural Network_Artificial Intelligence_Good.pptxConvolution Neural Network_Artificial Intelligence_Good.pptx
Convolution Neural Network_Artificial Intelligence_Good.pptx
AnnavarapuRajavarapr
 
Introduction to Convolutional Neural Networks (CNNs).pptx
Introduction to Convolutional Neural Networks (CNNs).pptxIntroduction to Convolutional Neural Networks (CNNs).pptx
Introduction to Convolutional Neural Networks (CNNs).pptx
CHRISEVANS269099
 
Convolutional neural network in deep learning
Convolutional neural network in deep learningConvolutional neural network in deep learning
Convolutional neural network in deep learning
priyasjcettnj
 
Introduction to convolutional networks .pptx
Introduction to convolutional networks .pptxIntroduction to convolutional networks .pptx
Introduction to convolutional networks .pptx
ArunNegi37
 
_AI_Stanford_Super_#DeepLearning_Cheat_Sheet!_😊🙃😀🙃😊.pdf
_AI_Stanford_Super_#DeepLearning_Cheat_Sheet!_😊🙃😀🙃😊.pdf_AI_Stanford_Super_#DeepLearning_Cheat_Sheet!_😊🙃😀🙃😊.pdf
_AI_Stanford_Super_#DeepLearning_Cheat_Sheet!_😊🙃😀🙃😊.pdf
SongsDrizzle
 
super-cheatsheet-deep-learning.pdf
super-cheatsheet-deep-learning.pdfsuper-cheatsheet-deep-learning.pdf
super-cheatsheet-deep-learning.pdf
DeanSchoolofElectron
 
build a Convolutional Neural Network (CNN) using TensorFlow in Python
build a Convolutional Neural Network (CNN) using TensorFlow in Pythonbuild a Convolutional Neural Network (CNN) using TensorFlow in Python
build a Convolutional Neural Network (CNN) using TensorFlow in Python
Kv Sagar
 
computervisionanditsapplications-190311134821.pptx
computervisionanditsapplications-190311134821.pptxcomputervisionanditsapplications-190311134821.pptx
computervisionanditsapplications-190311134821.pptx
OrxanMirzzad
 
Deep Computer Vision - 1.pptx
Deep Computer Vision - 1.pptxDeep Computer Vision - 1.pptx
Deep Computer Vision - 1.pptx
JawadHaider36
 
“Introduction to Computer Vision with Convolutional Neural Networks,” a Prese...
“Introduction to Computer Vision with Convolutional Neural Networks,” a Prese...“Introduction to Computer Vision with Convolutional Neural Networks,” a Prese...
“Introduction to Computer Vision with Convolutional Neural Networks,” a Prese...
Edge AI and Vision Alliance
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
milad abbasi
 
NMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptxNMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptx
LEGENDARYTECHNICAL
 
NMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptxNMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptx
LEGENDARYTECHNICAL
 
Ad

More from ananth (20)

Generative Adversarial Networks : Basic architecture and variants
Generative Adversarial Networks : Basic architecture and variantsGenerative Adversarial Networks : Basic architecture and variants
Generative Adversarial Networks : Basic architecture and variants
ananth
 
Convolutional Neural Networks : Popular Architectures
Convolutional Neural Networks : Popular ArchitecturesConvolutional Neural Networks : Popular Architectures
Convolutional Neural Networks : Popular Architectures
ananth
 
Foundations: Artificial Neural Networks
Foundations: Artificial Neural NetworksFoundations: Artificial Neural Networks
Foundations: Artificial Neural Networks
ananth
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models
ananth
 
An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier
ananth
 
Mathematical Background for Artificial Intelligence
Mathematical Background for Artificial IntelligenceMathematical Background for Artificial Intelligence
Mathematical Background for Artificial Intelligence
ananth
 
Search problems in Artificial Intelligence
Search problems in Artificial IntelligenceSearch problems in Artificial Intelligence
Search problems in Artificial Intelligence
ananth
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial Intelligence
ananth
 
Word representation: SVD, LSA, Word2Vec
Word representation: SVD, LSA, Word2VecWord representation: SVD, LSA, Word2Vec
Word representation: SVD, LSA, Word2Vec
ananth
 
Deep Learning For Speech Recognition
Deep Learning For Speech RecognitionDeep Learning For Speech Recognition
Deep Learning For Speech Recognition
ananth
 
Overview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language ProcessingOverview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language Processing
ananth
 
Convolutional Neural Networks: Part 1
Convolutional Neural Networks: Part 1Convolutional Neural Networks: Part 1
Convolutional Neural Networks: Part 1
ananth
 
Machine Learning Lecture 3 Decision Trees
Machine Learning Lecture 3 Decision TreesMachine Learning Lecture 3 Decision Trees
Machine Learning Lecture 3 Decision Trees
ananth
 
Machine Learning Lecture 2 Basics
Machine Learning Lecture 2 BasicsMachine Learning Lecture 2 Basics
Machine Learning Lecture 2 Basics
ananth
 
Introduction To Applied Machine Learning
Introduction To Applied Machine LearningIntroduction To Applied Machine Learning
Introduction To Applied Machine Learning
ananth
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
ananth
 
MaxEnt (Loglinear) Models - Overview
MaxEnt (Loglinear) Models - OverviewMaxEnt (Loglinear) Models - Overview
MaxEnt (Loglinear) Models - Overview
ananth
 
An overview of Hidden Markov Models (HMM)
An overview of Hidden Markov Models (HMM)An overview of Hidden Markov Models (HMM)
An overview of Hidden Markov Models (HMM)
ananth
 
L06 stemmer and edit distance
L06 stemmer and edit distanceL06 stemmer and edit distance
L06 stemmer and edit distance
ananth
 
L05 language model_part2
L05 language model_part2L05 language model_part2
L05 language model_part2
ananth
 
Generative Adversarial Networks : Basic architecture and variants
Generative Adversarial Networks : Basic architecture and variantsGenerative Adversarial Networks : Basic architecture and variants
Generative Adversarial Networks : Basic architecture and variants
ananth
 
Convolutional Neural Networks : Popular Architectures
Convolutional Neural Networks : Popular ArchitecturesConvolutional Neural Networks : Popular Architectures
Convolutional Neural Networks : Popular Architectures
ananth
 
Foundations: Artificial Neural Networks
Foundations: Artificial Neural NetworksFoundations: Artificial Neural Networks
Foundations: Artificial Neural Networks
ananth
 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models
ananth
 
An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier
ananth
 
Mathematical Background for Artificial Intelligence
Mathematical Background for Artificial IntelligenceMathematical Background for Artificial Intelligence
Mathematical Background for Artificial Intelligence
ananth
 
Search problems in Artificial Intelligence
Search problems in Artificial IntelligenceSearch problems in Artificial Intelligence
Search problems in Artificial Intelligence
ananth
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial Intelligence
ananth
 
Word representation: SVD, LSA, Word2Vec
Word representation: SVD, LSA, Word2VecWord representation: SVD, LSA, Word2Vec
Word representation: SVD, LSA, Word2Vec
ananth
 
Deep Learning For Speech Recognition
Deep Learning For Speech RecognitionDeep Learning For Speech Recognition
Deep Learning For Speech Recognition
ananth
 
Overview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language ProcessingOverview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language Processing
ananth
 
Convolutional Neural Networks: Part 1
Convolutional Neural Networks: Part 1Convolutional Neural Networks: Part 1
Convolutional Neural Networks: Part 1
ananth
 
Machine Learning Lecture 3 Decision Trees
Machine Learning Lecture 3 Decision TreesMachine Learning Lecture 3 Decision Trees
Machine Learning Lecture 3 Decision Trees
ananth
 
Machine Learning Lecture 2 Basics
Machine Learning Lecture 2 BasicsMachine Learning Lecture 2 Basics
Machine Learning Lecture 2 Basics
ananth
 
Introduction To Applied Machine Learning
Introduction To Applied Machine LearningIntroduction To Applied Machine Learning
Introduction To Applied Machine Learning
ananth
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
ananth
 
MaxEnt (Loglinear) Models - Overview
MaxEnt (Loglinear) Models - OverviewMaxEnt (Loglinear) Models - Overview
MaxEnt (Loglinear) Models - Overview
ananth
 
An overview of Hidden Markov Models (HMM)
An overview of Hidden Markov Models (HMM)An overview of Hidden Markov Models (HMM)
An overview of Hidden Markov Models (HMM)
ananth
 
L06 stemmer and edit distance
L06 stemmer and edit distanceL06 stemmer and edit distance
L06 stemmer and edit distance
ananth
 
L05 language model_part2
L05 language model_part2L05 language model_part2
L05 language model_part2
ananth
 
Ad

Recently uploaded (20)

Tesia Dobrydnia - A Leader In Her Industry
Tesia Dobrydnia - A Leader In Her IndustryTesia Dobrydnia - A Leader In Her Industry
Tesia Dobrydnia - A Leader In Her Industry
Tesia Dobrydnia
 
Application Security and Secure Software Development Lifecycle
Application  Security and Secure Software Development LifecycleApplication  Security and Secure Software Development Lifecycle
Application Security and Secure Software Development Lifecycle
DrKavithaP1
 
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
RishabhGupta578788
 
ENERGY STORING DEVICES-Primary Battery.pdf
ENERGY STORING DEVICES-Primary Battery.pdfENERGY STORING DEVICES-Primary Battery.pdf
ENERGY STORING DEVICES-Primary Battery.pdf
TAMILISAI R
 
Digital Crime – Substantive Criminal Law – General Conditions – Offenses – In...
Digital Crime – Substantive Criminal Law – General Conditions – Offenses – In...Digital Crime – Substantive Criminal Law – General Conditions – Offenses – In...
Digital Crime – Substantive Criminal Law – General Conditions – Offenses – In...
ManiMaran230751
 
Structural Health and Factors affecting.pptx
Structural Health and Factors affecting.pptxStructural Health and Factors affecting.pptx
Structural Health and Factors affecting.pptx
gunjalsachin
 
Influence line diagram in a robust model
Influence line diagram in a robust modelInfluence line diagram in a robust model
Influence line diagram in a robust model
ParthaSengupta26
 
Influence line diagram for truss in a robust
Influence line diagram for truss in a robustInfluence line diagram for truss in a robust
Influence line diagram for truss in a robust
ParthaSengupta26
 
ISO 5011 Air Filter Catalogues .pdf
ISO 5011 Air Filter Catalogues      .pdfISO 5011 Air Filter Catalogues      .pdf
ISO 5011 Air Filter Catalogues .pdf
FILTRATION ENGINEERING & CUNSULTANT
 
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
BeHappy728244
 
Webinar On Steel Melting IIF of steel for rdso
Webinar  On Steel  Melting IIF of steel for rdsoWebinar  On Steel  Melting IIF of steel for rdso
Webinar On Steel Melting IIF of steel for rdso
KapilParyani3
 
Numerical Investigation of the Aerodynamic Characteristics for a Darrieus H-t...
Numerical Investigation of the Aerodynamic Characteristics for a Darrieus H-t...Numerical Investigation of the Aerodynamic Characteristics for a Darrieus H-t...
Numerical Investigation of the Aerodynamic Characteristics for a Darrieus H-t...
Mohamed905031
 
Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...
Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...
Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...
ManiMaran230751
 
Proposed EPA Municipal Waste Combustor Rule
Proposed EPA Municipal Waste Combustor RuleProposed EPA Municipal Waste Combustor Rule
Proposed EPA Municipal Waste Combustor Rule
AlvaroLinero2
 
MODULE 4 BUILDING PLANNING AND DESIGN SY BTECH HVAC SYSTEM IN BUILDING
MODULE 4 BUILDING PLANNING AND DESIGN SY BTECH HVAC SYSTEM IN BUILDINGMODULE 4 BUILDING PLANNING AND DESIGN SY BTECH HVAC SYSTEM IN BUILDING
MODULE 4 BUILDING PLANNING AND DESIGN SY BTECH HVAC SYSTEM IN BUILDING
Dr. BASWESHWAR JIRWANKAR
 
fy06_46f6-ht30_22_oil_gas_industry_guidelines.ppt
fy06_46f6-ht30_22_oil_gas_industry_guidelines.pptfy06_46f6-ht30_22_oil_gas_industry_guidelines.ppt
fy06_46f6-ht30_22_oil_gas_industry_guidelines.ppt
sukarnoamin
 
world subdivision.pdf...................
world subdivision.pdf...................world subdivision.pdf...................
world subdivision.pdf...................
bmmederos12
 
ISO 10121-Flat Sheet Media-Catalouge-Final.pdf
ISO 10121-Flat Sheet Media-Catalouge-Final.pdfISO 10121-Flat Sheet Media-Catalouge-Final.pdf
ISO 10121-Flat Sheet Media-Catalouge-Final.pdf
FILTRATION ENGINEERING & CUNSULTANT
 
Software Engineering Project Presentation Tanisha Tasnuva
Software Engineering Project Presentation Tanisha TasnuvaSoftware Engineering Project Presentation Tanisha Tasnuva
Software Engineering Project Presentation Tanisha Tasnuva
tanishatasnuva76
 
All about the Snail Power Catalog Product 2025
All about the Snail Power Catalog  Product 2025All about the Snail Power Catalog  Product 2025
All about the Snail Power Catalog Product 2025
kstgroupvn
 
Tesia Dobrydnia - A Leader In Her Industry
Tesia Dobrydnia - A Leader In Her IndustryTesia Dobrydnia - A Leader In Her Industry
Tesia Dobrydnia - A Leader In Her Industry
Tesia Dobrydnia
 
Application Security and Secure Software Development Lifecycle
Application  Security and Secure Software Development LifecycleApplication  Security and Secure Software Development Lifecycle
Application Security and Secure Software Development Lifecycle
DrKavithaP1
 
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
9aeb2aae-3b85-47a5-9776-154883bbae57.pdf
RishabhGupta578788
 
ENERGY STORING DEVICES-Primary Battery.pdf
ENERGY STORING DEVICES-Primary Battery.pdfENERGY STORING DEVICES-Primary Battery.pdf
ENERGY STORING DEVICES-Primary Battery.pdf
TAMILISAI R
 
Digital Crime – Substantive Criminal Law – General Conditions – Offenses – In...
Digital Crime – Substantive Criminal Law – General Conditions – Offenses – In...Digital Crime – Substantive Criminal Law – General Conditions – Offenses – In...
Digital Crime – Substantive Criminal Law – General Conditions – Offenses – In...
ManiMaran230751
 
Structural Health and Factors affecting.pptx
Structural Health and Factors affecting.pptxStructural Health and Factors affecting.pptx
Structural Health and Factors affecting.pptx
gunjalsachin
 
Influence line diagram in a robust model
Influence line diagram in a robust modelInfluence line diagram in a robust model
Influence line diagram in a robust model
ParthaSengupta26
 
Influence line diagram for truss in a robust
Influence line diagram for truss in a robustInfluence line diagram for truss in a robust
Influence line diagram for truss in a robust
ParthaSengupta26
 
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
BeHappy728244
 
Webinar On Steel Melting IIF of steel for rdso
Webinar  On Steel  Melting IIF of steel for rdsoWebinar  On Steel  Melting IIF of steel for rdso
Webinar On Steel Melting IIF of steel for rdso
KapilParyani3
 
Numerical Investigation of the Aerodynamic Characteristics for a Darrieus H-t...
Numerical Investigation of the Aerodynamic Characteristics for a Darrieus H-t...Numerical Investigation of the Aerodynamic Characteristics for a Darrieus H-t...
Numerical Investigation of the Aerodynamic Characteristics for a Darrieus H-t...
Mohamed905031
 
Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...
Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...
Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...
ManiMaran230751
 
Proposed EPA Municipal Waste Combustor Rule
Proposed EPA Municipal Waste Combustor RuleProposed EPA Municipal Waste Combustor Rule
Proposed EPA Municipal Waste Combustor Rule
AlvaroLinero2
 
MODULE 4 BUILDING PLANNING AND DESIGN SY BTECH HVAC SYSTEM IN BUILDING
MODULE 4 BUILDING PLANNING AND DESIGN SY BTECH HVAC SYSTEM IN BUILDINGMODULE 4 BUILDING PLANNING AND DESIGN SY BTECH HVAC SYSTEM IN BUILDING
MODULE 4 BUILDING PLANNING AND DESIGN SY BTECH HVAC SYSTEM IN BUILDING
Dr. BASWESHWAR JIRWANKAR
 
fy06_46f6-ht30_22_oil_gas_industry_guidelines.ppt
fy06_46f6-ht30_22_oil_gas_industry_guidelines.pptfy06_46f6-ht30_22_oil_gas_industry_guidelines.ppt
fy06_46f6-ht30_22_oil_gas_industry_guidelines.ppt
sukarnoamin
 
world subdivision.pdf...................
world subdivision.pdf...................world subdivision.pdf...................
world subdivision.pdf...................
bmmederos12
 
Software Engineering Project Presentation Tanisha Tasnuva
Software Engineering Project Presentation Tanisha TasnuvaSoftware Engineering Project Presentation Tanisha Tasnuva
Software Engineering Project Presentation Tanisha Tasnuva
tanishatasnuva76
 
All about the Snail Power Catalog Product 2025
All about the Snail Power Catalog  Product 2025All about the Snail Power Catalog  Product 2025
All about the Snail Power Catalog Product 2025
kstgroupvn
 

Overview of Convolutional Neural Networks

  • 1. Convolutional Neural Networks Anantharaman Palacode Narayana Iyer narayana dot Anantharaman at gmail dot com 5 Aug 2017
  • 3. “A dramatic moment in the meteoric rise of deep learning came when a convolutional network won this challenge for the first time and by a wide margin, bringing down the state-of-the-art top-5 error rate from 26.1% to 15.3% (Krizhevsky et al., 2012), meaning that the convolutional network produces a ranked list of possible categories for each image and the correct category appeared in the first five entries of this list for all but 15.3% of the test examples. Since then, these competitions are consistently won by deep convolutional nets, and as of this writing, advances in deep learning have brought the latest top-5 error rate in this contest down to 3.6%” – Ref: Deep Learning Book by Y Bengio et al
  • 4. What is a convolutional neural network? Convolutional networks are simply neural networks that use convolution in place of general matrix multiplication in at least one of their layers. • Convolution is a mathematical operation having a linear form
  • 5. Types of inputs • Inputs have a structure • Color images are three dimensional and so have a volume • Time domain speech signals are 1-d while the frequency domain representations (e.g. MFCC vectors) take a 2d form. They can also be looked at as a time sequence. • Medical images (such as CT/MR/etc) are multidimensional • Videos have the additional temporal dimension compared to stationary images • Speech signals can be modelled as 2 dimensional • Variable length sequences and time series data are again multidimensional • Hence it makes sense to model them as tensors instead of vectors. • The classifier then needs to accept a tensor as input and perform the necessary machine learning task. In the case of an image, this tensor represents a volume.
  • 6. CNNs are everywhere • Image retrieval • Detection • Self driving cars • Semantic segmentation • Face recognition (FB tagging) • Pose estimation • Detect diseases • Speech Recognition • Text processing • Analysing satellite data Copyright 2016 JNResearch, All Rights Reserved
  • 7. CNNs for applications that involve images • Why CNNs are more suitable to process images? • Pixels in an image correlate to each other. However, nearby pixels correlate stronger and distant pixels don’t influence much • Local features are important: Local Receptive Fields • Affine transformations: The class of an image doesn’t change with translation. We can build a feature detector that can look for a particular feature (e.g. an edge) anywhere in the image plane by moving across. A convolutional layer may have several such filters constituting the depth dimension of the layer.
  • 8. Fully connected layers • Fully connected layers (such as the hidden layers of a traditional neural network) are agnostic to the structure of the input • They take inputs as vectors and generate an output vector • There is no requirement to share parameters unless forced upon in specific architectures. This blows up the number of parameters as the input and/or output dimensions increase. • Suppose we are to perform classification on an image of 100x100x3 dimensions. • If we implement using a feed forward neural network that has an input, hidden and an output layer, where: hidden units (nh) = 1000, output classes = 10 : • Input layer = 10k pixels * 3 = 30k, weight matrix for hidden to input layer = 1k * 30k = 30 M and output layer matrix size = 10 * 1000 = 10k • We may handle this is by extracting the features using pre processing and presenting a lower dimensional input to the Neural Network. But this requires expert engineered features and hence domain knowledge
  • 9. Convolution 𝐶𝑜𝑛𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑖𝑛 1 𝐷𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛: 𝑦 𝑛 = 𝑘=−∞ 𝑘=∞ 𝑥 𝑘 ℎ[𝑛 − 𝑘] 𝐶𝑜𝑛𝑣𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑖𝑛 2 𝐷𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛𝑠: 𝑦 𝑛1, 𝑛2 = 𝑘1=−∞ 𝑘1=−∞ 𝑘2=−∞ 𝑘2=∞ 𝑥 𝑘1, 𝑘2 ℎ[ 𝑛1 − 𝑘1 , 𝑛2 − 𝑘2 ]
  • 11. CNNs Types of layers in a CNN: • Convolution Layer • Pooling Layer • Fully Connected Layer
  • 12. Convolution Layer • A layer in a regular neural network take vector as input and output a vector. • A convolution layer takes a tensor (3d volume for RGB images) as input and generates a tensor as output Fig Credit: Lex Fridman, MIT, 6.S094
  • 13. Slide Credit: Lex Fridman, MIT, 6.S094
  • 14. Local Receptive Fields • Filter (Kernel) is applied on the input image like a moving window along width and height • The depth of a filter matches that of the input. • For each position of the filter, the dot product of filter and the input are computed (Activation) • The 2d arrangement of these activations is called an activation map. • The number of such filters constitute the depth of the convolution layer Fig Credit: Lex Fridman, MIT, 6.S094
  • 15. Convolution Operation between filter and image • The convolution layer computes dot products between the filter and a piece of image as it slides along the image • The step size of slide is called stride • Without any padding, the convolution process decreases the spatial dimensions of the output Fig Credit: A Karpathy, CS231n
  • 16. Activation Maps • Example: • Consider an image 32 x 32 x 3 and a 5 x 5 x 3 filter. • The convolution happens between a 5 x 5 x 3 chunk of the image with the filter: 𝑤 𝑇 𝑥 + 𝑏 • In this example we get 75 dimensional vector and a bias term • In this example, with a stride of 1, we get 28 x 28 x 1 activation for 1 filter without padding • If we have 6 filters, we would get 28 x 28 x 6 without padding • In the above example we have an activation map of 28 x 28 per filter. • Activation maps are feature inputs to the subsequent layer of the network • Without any padding, the 2D surface area of the activation map is smaller than the input surface area for a stride of >= 1 Copyright 2016 JNResearch, All Rights Reserved
  • 17. Stacking Convolution Layers Fig Credit: A Karpathy, CS231n
  • 19. Padding • The spatial (x, y) extent of the output produced by the convolutional layer is less than the respective dimensions of the input (except for the special case of 1 x 1 filter with a stride 1). • As we add more layers and use larger strides, the output surface dimensions keep reducing and this may impact the accuracy. • Often, we may want to preserve the spatial extent during the initial layers and downsample them at a later time. • Padding the input with suitable values (padding with zero is common) helps to preserve the spatial size
  • 20. Zero Padding the border Fig Credit: A Karpathy, CS231n
  • 21. Hyperparameters of the convolution layer • Filter Size • # Filters • Stride • Padding Fig Credit: A Karpathy, CS231n
  • 22. Pooling Layer • Pooling is a downsampling operation • The rationale is that the “meaning” embedded in a piece of image can be captured using a small subset of “important” pixels • Max pooling and average pooling are the two most common operations • Pooling layer doesn’t have any trainable parameters Fig Credit: A Karpathy, CS231n
  • 25. Current trend: Deeper Models • CNNs consistently outperform other approaches for the core tasks of CV • Deeper models work better • Increasing the number of parameters in layers of CNN without increasing their depth is not effective at increasing test set performance. • Shallow models overfit at around 20 million parameters while deep ones can benefit from having over 60 million. • Key insight: Model performs better when it is architected to reflect composition of simpler functions than a single complex function. This may also be explained off viewing the computation as a chain of dependencies
  • 30. Core Tasks of Computer Vision Core CV Task Task Description Output Metrics Classification Given an image, assign a label Class Label Accuracy Localization Determine the bounding box containing the object in the given image Box given by (x1, y1, x2, y2) Ratio of intersection to the union (Overlap) between the ground truth and bounding box Object Detection Given an image, detect all the objects and their locations in the image For each object: (Label, Box) Mean Avg Best Overlap (MABO,) mean Average Precision (mAP) Semantic Segmentation Given an image, assign each pixel to a class label, so that we can look at the image as a set of labelled segments A set of image segments Classification metrics, Intersection by Union overlap Instance Segmentation Same as semantic segmentation, but each instance of a segment class is determined uniquely A set of image segments
  • 31. Object Localization • Given an image containing an object of interest, determine the bounding box for the object • Classify the object
  • 32. Slide Credit: A Karpathy, CS231n
  • 34. Slide Credit: A Karpathy, CS231n
  • 43. Datasets for evaluation • Imagenet challenges provide a platform for researchers to benchmark their novel algorithms • PASCAL VOC 2010 is great for small scale experiments. About 1.3 GB download size. • MS COCO datasets are available for tasks like Image Captioning. Download size is huge but selective download is possible.