Introduction To Convolutional Neural Network


It is a type of neural network architecture designed for doing specific tasks like Image Classification, Facial Recognition andObject Detection.CNN are specifically designed to process and analyze visual data. Like a fully connected neural network, A CNN is also composed of an input layer, an output layer and several hidden layers between the two.


Instead of the traditional activation functions used in feedforward neural network, CNNs employ Convolutional layers and Pooling layer for feature extraction. The input of a CNN is typically a two-dimensional array of neurons corresponding to the pixels of an image. The Network utilizes its hidden layers to extract features and identify patterns from the input data or images.



CNN Simple Architecture




CNN Working :-


1. Convolutional Layer :-CNN uses convolutional layer to automatically learn and extract features from the input layer or input data. these layer consists of small filters also called kernel that slide across the input data and produces feature maps. these feature maps capture different patterns and features in the input data.


The Convolutional layer has two parameter named stride and padding. Stride determines how the filter moves across the input data, controlling the step size, and padding adds additional pixels around the input to manage the spatial dimension of the feature maps.


2. Pooling Layer :-This layer downsamples the feature maps or you can say it reduces the size or dimension of the feature maps. this process helps make the data smaller, which can lead to computational efficiency and help the network focus on the most important features. it like taking large image and making it smaller while retaining the most critical information, allowing the network to process information more efficiently with fewer parameters.


There are two types of Pooling :-


1) Max pooling : It returns the maximum value from a selected region after convolution. In the image below the stride is 2.




2) Min pooling : It returns the minimum value from a selected region after convolution.





3. Dense Layer :-Also known as fully connected layer, after convolution layer and pooling layer , CNNs often uses one or more fully connected layer for classification. These layer take the high-level features learned from previous input layer and map them to the final output value.


CNN also uses activation function like ReLu which are applied to the feature maps to introduce non-linearity into the network, enabling the model to learn complex relationship between data points.


To Improve the generalization of CNN, we use Data Augmentation techniques. These techniques involve applying random transformation to the input data during training, such as rotations, flips and scaling.


Advantages of CNN :-


1. Good at detecting patterns and features in images, videos and audio.


2. Can handle large amounts of data and achieve high accuracy.


3. No need for manual features extraction.


Disadvantages of CNN :-


1. Computationally Expensive to train.


2. Can be prone to overfitting.


3. Require large amounts of labelled data.


Previous Page