Convolutional Neural Networks

Another important set of neural networks in deep learning is CNN. They are designed specifically for image recognition and classification. CNNs have multiple layers of neural networks that extract information from images and determine the class they fall into.

For example, a CNN can detect whether the image is a cat or not if it is trained with a set of images of cats. We will see the architecture and working of CNN in this section.

For a program, any image is a just a set of RGB numbers in a vector format. If we can make a neural network understand the pattern, it can form a CNN and detect images.

Regular neural nets are universal mathematical approximators that take an input, transform it through a series of functions, and derive the output. However, these regular neural networks do not scale well for an image analysis. For a 32 x 32 pixel RGB image, the hidden layer would have 32*32*3=3072 weights. The regular neural nets work fine for this case. However, when the RGB image is scaled to size 200 x 200 pixel, the number of weights required in the hidden layer is 200*200*3=120,000 and the network does not perform well.

Enter CNN to solve this scalability problem. In CNN, the layers of a CNN have neurons arranged in three dimensions (height, width, and depth).

The following diagram shows a neural net and a CNN:

CNN is a sequence of layers of neural nets, wherein each layer transforms one volume of activations to another through a differentiable function. There are three types of layers that build the CNN:

  • Convolutional layer
  • Pooling layer
  • Fully connected layer
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset