Now, we are going to start with convolutional neural networks.
And in this section, we are going to understand some of the building blocks of CNN's.
First of all, let us understand the motivation behind CNN.
What is it that CNN do better than a normal artificial neural network?
Seniors are mostly used for problems like image recognition or speech recognition.
The reason for this is that CNN is outperform normal artificial neural networks in these types of problems.
In fact, the accuracy of some CNN models at image recognition is even better than humans.
Let us try to see the limitation in a normal artificial neural network.
As we understand, an artificial neural network gets the data of each pixel as input into the first
layer of neurons.
So if you ever 16 by 16 pixel image and I want to find what is in that image, I will feed the information
of all these 256 pixels into the first layer.
But here's the problem.
If you see the pixels randomly with no order, can you identify what this image is?
For example, in this late, I have an image of our favorite video game character, Mario.
It's a 16 by 16 pix element
to demonstrate how our neural network sees this image.
I have covered all of the pixels with blue squares and have revealed 25 random pixels in each of the
four images.
This is similar to what a neural network sees.
So if a neural network sees this first image, do you think it'll be able to identify the character
in this image or the second image?
Same goes the third and fourth image.
The point that I'm trying to make here is we are not considering the effect of neighboring pixels.
If we randomly pick pixels, we do not understand what is the image behind it.
If we consider the order of pixels only, then we are able to identify what is the object in that image.
So identifying the object by looking at such images is a very difficult task because this is not how
the human brain works.
We do not look at individual points or pixels.
We could recognize pattern in group of points or pixels.
In fact, served in the visual cortex respond to different patterns.
Some respond to horizontal lines.
Some respond to vertical lines.
Some respond to other complex patterns.
The output of the lower level neurons is then processed by higher level neurons to identify objects
in that visual field.
Convolutional neural networks are inspired from this concept.
In CNN's instead of looking at each individual pixel, we look at a group of pixel.
If we look at a group of pixels, we are more likely to pick up different features of the objects in
the image.
And once we know the features, it is more likely that we can predict the object in the image.
So in this light, you can see that by using a window on the image or by looking at a group of pixels,
we can identify certain features.
So you can see Mario's ear here in the first image.
And this image, you can see Mario's red collared shirt and probably a shoulder.
And the next image, you find out some very important features of the character.
Eyes, nose and a mustache.
The last window tells us that the character is wearing blue colored pants on the legs with these features
identified.
It is easier for our network to identify the object in our image.
So if you compare it with the previous slaid in which we randomly showed you 25 pixels out of 256 pixels,
you can easily see that in the second slide.
You can identify features because the group of pixels is together as compared to the one in previous
light where the pixels were randomly picked up.
So this is the main idea here.
Instead of looking at each individual pixel, we will look at a group of pixels.
Now let us see how this is implemented.
So here does that image at the bottom.
This is the input image to our network.
Now, on top of it, we will have a convolutional layer.
This is the most important concept, Antionette.
We have a convolutional leered.
A convolutional layer comprises of neurons, which Daken information from a group of pixels in the previous
lit.
So in this first layer.
This neuron gets information stored in the pixels within this rectangular box.
Only this other neuron gets information from pixels of this rectangle only.
Similarly, in the second convolutional layer, information of all the neurons in this small rectangle.
That is on the first Fosler is taken as input by this Meuron.
This architecture allows the network to concentrate on lower level features in the first layer and then
assemble these features into larger, higher level features in the next hidden layer and so on.
Now, let us focus more on this window at the receptive field of these neurons.
So this window is also known as the receptively of that particular neuron.
This window has two dimensions, height and weight.
In this image, you can see that the height of the window we have taken is five pixels and it is also
five pixels.
So we say that this is a five Crossfade window.
We can also have t close three window.
Order to cross three window or any such damage.
Most commonly used dimensions are three, three or five Crossfade.
So this particular window, the information stored in all the pixels of this window will go into one
particular neuron in the upper convolutional leered.