In this article, we are going to discuss Convolutional Neural Networks (ConVNet or CNN). This network is generally used to deal with input data of matrix type (images). This article will try to give you a better understanding of how CNNs works and how to implement them using TensorFlow at the end we will see how to use some of the pre-made architectures of CNN to build a new CNN model. This article has the following section.
Convolutional Neural Network structure.
Apply the above in a sample image from a handwritten digit.
Handwritten digit recognition implementation.
Using transfer learning to make cats and dogs recognizer.
In CNN we deal with images and in computers, images are nothing but a matrix of numbers ranging from 0 to 255. For a colored image, we have a bunch of three matrices (‘RGB’) corresponding to Red, Green, and Blue color at each point corresponding to the pixel value. For eg.
This above image is a greyscale image and its matrix looks like…
The basic structure of CNNs is some convolutional layers accompanied by the pooling layer followed by some fully connected layers then finally classification layer.
— — — — — — — — — — — — -
Classification layers may have two (binary) or more than two classes (multiclass classification). For binary classification layers, we use sigmoid whereas for multiclass classification we use softmax as activation.
*Convolutional layers and pooling layers
Convolutional layers play the role of feature extractors in the CNNs models. Say a dog and cat classifier is trying to analyze a picture of a dog in a grass field. For a classifier, it is not a deal of observation that whether the dog standing in the garden, lying, etc. It needs to capture the features of the dog, like fluffy ears, etc. Convolutional layers reduce the computational expense drastically as it shares the same weights in the entire image. Also, this gives the flexibility of situating the prime object anywhere in the image. So how does a convolutional on an image carried out?
In the above case, there are D(f) no. of feature detector that we apply on the image separately.
## One numerical method to compute convolution:-
Hence, in order to convolve this, we take the elements of box A1 and make it as,
similarly, as per the specified slide, we move the box and the box becomes A2 and we get,
#transfer-learning #mobilenetv2 #towards-data-science #convolutional-network #machine-learning #deep learning