Structure of Convolutional Neural Networks - Deep Learning
Structure of Convolutional Neural Networks - Deep Learning
Before we build a CNN, the image data we have must be pre-processed to ensure
it is ready to be used by the neural network.
1) Re-sizing images
⟶ The images of different sizes are converted to one uniform size (usually to 224 x 224).
⟶ Since pixels can have varying values of density, we normalize them to one range, usually
between 0 and 1, or -1 and +1.
3) Data Augmentation :
⟶ The training data is thus increased from existing data, and the CNN will
work on variations of the same image and generalize better.
Pre-processing of images can also be done within the neural network by using
the tf.keras.preprocessing.image module,
with which we can define some layers which process the images before they
reach the convolutional layer.
Structure of Convolutional Neural Networks
2) Pooling Layers : Extract information from feature maps and reduce their
size.
4) Fully Connected Layer : To process the flattened image data and carry
out the classification.
⟶ This layer applies kernels to images, extracts features from them and
generates feature maps.
https://learnopencv.com/understanding-convolutional-neural-networks-cnn/
https://towardsdatascience.com/batch-norm-explained-visually-how-it-works-and-why-neural-networks-need-it-b18919692739
3) Pooling Layer :
⟶ This layer can apply different types of pooling methods, like average
pooling, max pooling etc.
https://towardsai.net/p/l/introduction-to-pooling-layers-in-cnn
⟶ This layer drops out a fraction of neurons from the previous layer, reducing
the number of units, to make the network learn more robust features.
https://www.researchgate.net/figure/Example-of-dropout-layer-probability-of-50-appears-on-the-right_fig8_333411007
5) Flatten Layer :
https://www.superdatascience.com/blogs/convolutional-neural-networks-cnn-step-3-flattening
6) Fully Connected Layers :
⟶ The normal fully-connected layers takes input from the Flatten layer and
carries out the classification/prediction task.
⟶ The output layer, has the appropriate function like Softmax, Sigmoid etc.
based on the task, which is usually multi-class or binary classification.
In a manner of understanding,
the fully connected layers can be interpreted as separate neural network for which the input is the
feature maps generated by the convolutional portion of the network.
We combine all the parts sequentially
to build a complete convolutional neural
network.
Some examples :
https://www.mdpi.com/2071-1050/15/23/16292
https://www.linkedin.com/pulse/what-convolutional-neural-network-cnn-deep-learning-nafiz-shahriar/
https://www.researchgate.net/figure/Functional-structure-of-the-proposed-convolutional-neural-network-architecture-Conv_fig2_350284279