What is a Convolutional Neural Network, CNNs?
— A Beginner Guide —
What is this CNN? and Why We came up with such a new concept while we have our regular neural network?
First lets us bring a short introduction to stage, the regular neural network is an architecture when there are input layer, hidden layer, and the output layer. Each neuron of the layer in connected to the neuron from the next layer, which provide us a fully connected architecture. Also, the regular neural networks are called “Fully Connected Network”.
On the other hand, we have the CNNs, the Convolutional Neural Network. We have the input data, the convolutional layer(what we can call the hidden layers), and the output feature maps. The input data is often a multi-dimensional array, and that is related to the type of data CNNs usually process. The convolutional layer contains filters, and each one of those filters (also called kernels) is responsible for extracting a specific/special feature from a local region of the input.
Which bring us to the main reason why the concept of CNNs has arises; basically, CNNs are designed to work on grid-like data; which includes images, videos frames or 3D volumes. Cause the typical input data for CNNs is the one that has image-related tasks.
CNNs are allowing us to work proficiency on such complicated data. One of the main principles in this type of neural network is “the convolutional layers”. So that leave us with a great question, how does this convolutional layer's work?
One or more convolutional layer is applied to our data, each layer has filters (which are called kernels), and those filters are like a small grid sliding over our input data. We use the “convolution solution” (it is mathematical operation), —Also known for Dot Product— to succeed this application on the local regions. This operation computes a dot product between the filter and a region of the input, which produce us a feature map.
—That’s Good! But What are The Actual Steps for How Does This Convolutional Layer Work? —
This might be challenging for the first time, but it is quite interesting digging into it, as it trying to imitate the actual cerebral neurons. OK, Let’s bring it in a simple way!
1- Insert The Input Data:
we start with inserting our input data, which might be images or any other related types, represented as a grid of pixels values.
2- Convolutional Filter (The Kernel):
This convo filter contains a small grid-like filter with certain numerical values, the filter detects a special feature from the inserted data, such as textures or edges.
3- Sliding The Filter:
To start applying it, we place the filter in the top-left corner of the input, then we multiply the values in the filter with the pixel values in the overlapping region of the input. To end, we sum up these products to get a single number.
4- Moving The Filter:
We move the filter to the right, taking small steps (Called Stride), step by step, until we reach the end of the row horizontally, then we re-place it at the beginning of the next row and re-do the “Sliding the Filter Section”.
5-Feature Map:
After finishing, we obtain a new grid of numbers called feature map. In this map, each number represents how much the filter’s pattern matches the corresponding region of our input data.
For your information, the convolutional layer contains several filters, each filter is designed to detect a different pattern or feature like vertical edges for example, and each filter produces at the end its own feature map. We stuck these feature maps together, to create the output of the convolutional layer.
The output of one convolutional layer becomes the input of the next, allowing the network to learn increasingly complex features.
We can apply some useful functions on our data, called “Activation Function”, that help us reduce the non-linearity of the feature maps. — Share with me if you need a chapter for this one too —
We will continue on next chapters more details about the CNNs and they’re own special way of impacting. Stay tuned! :)
I greatly appreciate your kind words and support for my responses, interactions, and passion for what I do. It fills me with joy and excitement knowing that you appreciate and enjoy what I write.
Your encouragement means a lot, and I am thrilled to know that my work resonates with you. Thank you for your heartfelt appreciation! If you would like to buy me coffee: VoiceVibes (buymeacoffee.com)
Note: Hi Beautiful Soul! As a freelance software engineer and content writer, I specialize in creating compelling articles that resonate with audiences using my expertise in tech industry. If you appreciate my writing approach, don’t hesitate to get in touch for your content needs: okworld90@gmail.com