‫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's 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 have a 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 slide, I have an image of our favorite video game character, Mario.
‫It's a 16 by 16 pixel image.
‫Now, 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 our neural network sees.
‫So if our neural network sees this first image, do you think it will be able to identify the character
‫and this image or this second image?
‫Same goes with 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 can recognize pattern in group of points or pixels.
‫In fact, cells in our 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 our 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 slide 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.
‫In 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 slide 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 slide 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 is 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 in science.
‫We have a convolutional layer.
‫A convolutional layer comprises of neurons which take in information from a group of pixels in the previous
‫layer.
‫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 when the first layer is taken as input by this neuron.
‫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 or the receptive field of these neurons.
‫So this window is also known as the receptive field of that particular neuron.
‫This window has two dimensions height and width.
‫In this image, you can see that the height of the window we have taken is five pixels and which is
‫also five pixels.
‫So we say that this is a five cross five window.
‫We can also have three cross, three window or a two cross three window or any such dimension.
‫Most commonly used dimensions are three cross three or five cross five.
‫So this particular window, the information stored in all the pixels of this window, will go into one
‫particular neuron in the upper convolutional layer.