So the first layer we see in convolutional neural network is called the convolutional layer.
Now, this lawyer is used to extract the distinguishable features that we seen an image like in our
case of the car.
We will see the wheels, we will see the edges of the wheels, all of this distinguishable features.
We're going to see them.
But how does this exactly work?
Let's say we have an image.
This is my image.
Convolutional layer has filters heavily.
Convolutional leather has a filter with a certain size.
Let's say this filter has a size of three by three.
And let's say that my image is six by six image, OK?
So this filter is going to scan our image and it's going to produce some output here, which is the
feature.
OK, so how does this work exactly?
Now this is your image, right?
This filter is going to convolve with the first block in the image.
This filters three by three.
So it will start by the first the three by three bits or pixels in the image.
OK, so all of these are pixels and we are going to convolve the filter here.
So what does Convolve being mean exactly?
It's very simple.
It's like it's going to multiply, let's say, one times ten plus zero times ten plus 10.
Times minus one plus.
Then.
Times one plus 10 times zero plus 10 times minus one plus 10 times one plus 10 times zero plus 10 times
minus one.
And if you do this calculation, you will get a zero here and we're going to store it at the output
here.
This is the output of my convolutional layer.
OK, so my convolutional layer has a filter.
It has the image itself.
It convos these and it gives you a result.
Then it moves to the second block and it does the same thing, but it stores the result in the next
block right here.
Then it goes here again.
It convolve these two blocks, stores the result, then it goes here and stores the result.
And this goes for the whole image one by one until the end, where we get this matrix here, which is
the output of the convolutional layer.
OK, and if we can represent it a little bit, this filter is trying to detect stuff in this image.
Now, this image is actually looking like this.
Just two colors, as you can see.
You can check from the pixels here.
This is a gray scale picture.
And here we have all of these has value of ten.
And all of this has a value, let's say, of a zero, for example.
And this filter is trying to find some features here.
And the feature, it's found that if I see a very simple image of white and gray that looks like this,
it means that I found this image and I will get a match.
Can you see what's happening here?
We have a filter and this will be good as any shape inside it.
And you have the image and it tries to detect features.
And in our case, it detected that this is a white and a gray, OK?
And it says, OK, my result is white and gray and this is the closest I can get to this image.
Now, you might ask, where do I get these filters from?
Well, these filters are the way we have talked about in the neural network.
This is the equivalent of it in the convolutional neural network.
OK, so those will be also updated in back propagation, as we will see later.
But for now, I just wanted to understand, when you hear convolutional layer, what's happening exactly
there you have an image, a filter being involved and just running on the image to produce a matrix
of output which will represent a feature of the image.