Properties of CNN models
2
3
8/22Sirine BEN AMMAR
➢Sparse interactions between NN units (through kernels of small
size)
✓fewer parameters to learn
✓less computation resources are required
➢Parameter sharing (same kernel is applied throughout the input)
✓Maintain the same feature detection throughout the
input.
➢Ability to (automatically) learn local structure
➢Can handle variable-sized inputs.
CNN Architecture
2
3
9/22Sirine BEN AMMAR
➢Typically, a CNN model consists of convolution layers, for feature selection,
followed by fully connected layers that perform the prediction task.
CNN Architecture
2
3
10/22Sirine BEN AMMAR
CNN Components
2
3
11/22Sirine BEN AMMAR
Convolution
Non Linearity
Pooling or Sub Sampling
Classification (Fully Connected Layer)
➢There are 4 components in the CNN:
2
3
13/22Sirine BEN AMMAR
Convolution Non Linearity Pooling Classification
1.Convolution :
➢TheprimarypurposeofconvolutionincaseofaCNNistoextract
featuresfromtheinputimage.
CNN Components
2
3
14/22Sirine BEN AMMAR
Convolution Non Linearity Pooling Classification
2.Non Linearity (ReLU):
➢ Replaces all negative pixel values in the
feature map by zero.
➢ The purpose of ReLUis to introduce
non-linearity in CNN, since most of the
real-world data would be non-linear.
➢ Other non-linear functions such as
tanh(-1, 1) or sigmoid (0, 1) can also
be used instead of ReLU(0, input).
CNN Components
2
3
15/22Sirine BEN AMMAR
Convolution Non Linearity Pooling Classification
3.Pooling:
➢ Reduces the dimensionality of each feature map but retains the most
important information.
CNN Components
3
12/22Sirine BEN AMMAR 16/ 22Sirine BEN AMMAR
Convolution Non Linearity Pooling Classification
4.Fully Connected Layer:
➢ The term “Fully Connected” implies that every neuron in the previous
layer is connected to every neuron on the next layer.
➢Theiractivationscanhencebecomputed
withamatrixmultiplicationfollowedbya
biasoffset.
➢Thepurposeofthefullyconnectedlayer
istousethehigh-levelfeaturesforclassifying
theinputimageintovariousclassesbasedon
thetrainingdataset.
Applications of CNN models
2
3
17/22Sirine BEN AMMAR
➢Image Processing
✓image classification
✓object detection
✓image segmentation
✓object tracking
✓face recognition…
➢Speech Processing
➢Text Detections and Recognition (OCR)
➢Natural Language Processing
➢Drug Discovery
➢TimeseriesAnalysis
✓Health risk assessment
✓Electromyography (EMG)
recognition…
Implementation
2
3
18/22Sirine BEN AMMAR
Link: https://colab.research.google.com/drive/17Svx0pQE_0g-
4uz22W_F0nFdsySiurt0