Convolutional Neural Network Tutorial (CNN / ConvNets)

Here we will learn about Convolutional Neural Network Tutorial. So, First of all, you should know about, what is Convolutional Neural Network. And How the Convolutional Neural Network works.

“Convolutional Neural Network (CNN / ConvNets) is a class of deep neural networks by which image classification, image recognition, face recognition, Object detection, etc. can be done. And the use of Convolutional Neural Network is widely used in today‚Äôs technologies. Convolutional Neural Network is also known as ConvNets.”

Convolutional-Neural-Network-tutorial
Convolutional Neural Network

What is Convolutional Neural Networks (CNN / ConvNets)?

Convolutional Neural Network is a part of the Deep Neural Network to analyzing and classifying the visual images. It is used in the areas of image classification and image recognition of the object, faces, handwritten character, traffic signs, and many more. Convolutional Neural Network(CNN / ConvNets) is widely used in powering vision in robots and self-driving cars.

Application of Convolutional Neural Networks (CNN / ConvNets):

The real-life application of Convolutional Neural Network (CNN) are:

  • Face Recognition
  • Image Classification
  • Object Detection
  • Segmentation
  • Computer Vision
  • Self-driving cars that leverage CNN based vision systems.
  • Classification of crystal structure
  • And many More.

Working Process of Convolutional Neural Networks (CNN / ConvNets)

Convolutional Neural Network is based on the neural network first takes the input as an image, process it, and classifies to produce the category of the image with full information (Eg. Cat, Dog, Man, Women, etc).

 Convolutional-Neural-Network-Diagram
Working Process of Convolutional Neural Networks (ConvNets)

The input image resolution has an array of a pixel which have Height Weight and Dimension). Normally RGB image has 6 x 6 x 3 array of a matrix in which 3 refers as the RGB value and for the grayscale image have 4 x 4 x 1 array of a matrix in which 1 refers as the Gray color.

First, to create the model of Convolutional Neural Networks (ConvNets) by training and testing the related dataset to produce an efficient model. Each image is passed through the series of convolution layers with filters (kernels) and pooling (Max-Pooling), fully connected layers, and at last apply classifiers as SoftMax function to classify an object with a probabilistic value between 0 and 1.

Convolutional Neural Network is implemented by using a convolution Layer, Max Pooling, fully connected, and SoftMax for classification. The details of the layers are given below.

Convolution Layer

The convolution layer is also known as the Kernel layer and shortly named as Conv layer. In this layer, the input image has the dimension of 5 x 5 x 1 which means the image is in grayscale and have the dimension 5 x 5 pixel.

  • 1 0 1 = Kernal / Filter
    0 1 0
  • 1 0 1
Convolution of 5x5x1 image with kernel 3x3
Convolution of 5x5x1 image with kernel 3×3

Let’s discuss the convolution layer, convolution layer is the building block of convolutional neural network. The convolution layer has the filter layer for filtering the image pixel. The convolution layer computes the output of the neurons which is connected to the receptive field in the input, each computing a dot product between their weights and a small receptive field. For example, in the above figure 3 and figure 4.

The image represents the 5 x 5 matrix value and the kernel matrix takes a 3 x 3 filter. At each position, the window has multiplied the values of the 3 x 3 in the window. When all the positions is produced a value then the matrix called a rectified feature map. The feature map goes to the Pooling layer for pooling.

Pooling Layer

In the pooling the highest pixel value from the region depending on the size from the rectified feature map. In other words, pooling takes the largest value from the window of the image currently covered by the kernel. The pooling layer is used to reduce the dimensions, which help in reducing the overfitting.

The spatial pooling is also known as sub sampling or down sampling. The spatial pooling of different type:

  1. Max Pooling:- It gives the highest element from the rectified feature map.
  2. Average Pooling:- It gives the average of the rectified feature map.
  3. Sum Pooling:- It gives the sum of all the rectified feature map.

Generally, Max Pooling is used to reduce the dimensionality of each map but retains important information.

Max Pool with 2x2 filter with stride 2
Max Pool with 2×2 filter with stride 2

In this example, the convolved feature matrix is of 4 x 4, by max-pooling the largest value from the 2×2 filter matrix with stride 2. In the max-pooling, the highest element is selected and other elements are discarded. And then the final rectified feature map goes to the fully connected layer.

Fully Connected Layer (FC Layer)

First, the flattened the matrix into a vector and feed it into a fully connected layer. The fully connected layer like a neural network. The network is given below.

Fully Connected Layer
Fully Connected Layer

In the fully connected layer (FC Layer) the featured map matrix is converted into a vector as an input. And combine all these features to create a model. And at last, the activation function is used to classify the images (cat, dog, bat, man, apple, etc) by using SoftMax or sigmoid function. Generally, the SoftMax activation function is used for classification.

There are many architectures of Convolutional Neural Network like:

Convolutional Neural Network Tutorial

People also want to know in Convolutional Neural Network

What is convolutional neural network?

Convolutional Neural Network is also known as ConvNets. Convolutional Neural Network is a part of the Deep Neural Network to analyzing and classifying the visual images. It is used in the areas of image classification and image recognition of the object, faces, handwritten character, traffic signs, and many more.

How does convolutional neural network work?

Convolutional Neural Network works in layers. First, to create the model of Convolutional Neural Networks (ConvNets) by training and testing the related dataset to produce an efficient model. Each image is passed through the series of convolution layers with filters (kernels) and pooling (Max-Pooling), fully connected layers, and at last apply classifiers as SoftMax function to classify an object with a probabilistic value between 0 and 1.

Why convolutional neural network?

Convolutional Neural Network (ConvNets) is used in Computer vision for classification of the images by using the models of neural networks.

How to train convolutional neural network?

Convolutional Neural Network is trained by using a convolution Layer, Max Pooling, fully connected, and SoftMax for classification.

Do convolutional neural networks learn class hierarchy?

Yes, Convolutional Neural Network is learn the class by hierarchical because when a growing number of classes, the accuracy usually decreases, and the possibilities of confusion increase. So, the class confusion patterns follow the hierarchical structure over the classes.

When to use convolutional neural network?

Convolutional Neural Network is used in
Face Recognition
Image Classification
Object Detection
Segmentation
Computer Vision
Self-driving cars that leverage CNN based vision systems.
Classification of crystal structure
And many More.

Why convolutional neural network for image classification?

Convolutional Neural Network is used in Image Classification Because It classifies the image by using Deep Neural Network with good accuracy and easy to use.

Convolutional Neural Network Tutorial

Convolutional Neural Network Tutorial is a part of computer vision for image detection or image classification By using Deep Learning Technology.

10 thoughts on “Convolutional Neural Network Tutorial”

  1. Great work on Convolutional Neural Network, I too have a website and youtube channel “Electronic Clinic”. I have worked on different types of projects except for the Neural Network. Thanks for such high-quality content.

    Reply
  2. Hi great website! Does running a blog similar to this
    require a large amount of work? I have absolutely no understanding of
    programming however I had been hoping to start my own blog
    in the near future. Anyway, should you have any recommendations or tips for new
    blog owners please share. I know this is off topic nevertheless I simply
    needed to ask. Appreciate it!

    Reply

Leave a Comment

Share via
Copy link
Powered by Social Snap