Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Introduction to Convolutional Neural Networks

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Topics you have covered in week 1 videos
● Image data structures and types
● Convolution of Filters/kernels on Images
● Convolutional neural networks vs Fully connected networks
● Convolutional layers
● Average and Max Pooling layers
● Forward prop and Backprop in CNNs
● Implementation of CNNs in Keras

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Session agenda
● Basics of Image handling in python
● Understanding filtering
● Understanding CNNs
● Case study
● Questions

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Image bas ics

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Digital Images

Digital Images are 2D or 3D matrices depending upon if they are greys cale or colour images . An entire image is
dis cretized into s mall units called pixels . Each pixel is identified by it’s row and column number. Each pixel in a grays cale
or black and white image has a s ingle value (Range 0~255) denoting the intens ity of the image at that pixel location.
Each pixel in a colour image has res pectively 3 values (Range 0~255) denoting the intens ities of Red, Blue and Green
channels .
The s ize of the image is generally denoted by the number of rows and columns .

Image and text source: dzone Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Digital Images

Image and text source: dzone Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Image filtering

Image source: towardsdatascience Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Convolution vs Correlation

Convolution:

Correlation:

Convolution is basically flipping the kernel via X -axis and Y-axis and then performing a
correlation with the resultant kernel

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Features from kernels

Image source: towardsdatascience Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Features from kernels

Original Sharpen Edge Stronger Edge


Detect Detect

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Features from kernels

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Convolutional neural networks

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Convolutional layer

Image source: cs231 notes Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Convolutional layer

Image source: towardsdatascience Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Convolutional layers

2x2x8
2x2x4 (s=2) 2x2x32 (s=2)
(s=2)

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Padding

Image source: towardsdatascience Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Pooling Layers

Image source: towardsdatascience Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Flatten and fully connected layers

Image source: towardsdatascience Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
CNNs for classification

Image source: towardsdatascience Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Summary

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
In summary - Deep CNNs
• Kernels are feature extractors

• CNNs are trained to learn the features

• Convolutional Layers

• Stride and Padding

• Max and Average Pooling Layers

• Flattening and Fully connected final layers

• CNN Classifier

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Thank you! :)
Questions are always welcome

Proprietary content. © Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.

You might also like