Okay, that title might be a little bit misleading, because let’s face it no 5 year old will try to find out what a Convolutional Neural Network 🤣. This guide is targeted for beginners in deep learning who want to learn more about Image Processing, but feels pressured when seeing papers and other writing that seems a little bit too hard to understand 😂.
Artificial Intelligence or AI is a monumental breakthrough that bridges the gap between what humans can do and what machine can do. One of many areas that was affected by the development of AI was Computer Vision. Those advancement created an algorithm for the Computer Vision domain that was known as Convolutional Neural Network or CNN for short.
CNNs, like neural networks, are made up of neurons with learnable weights and biases. Hummm, wait what are neural networks? Wasn’t this guide supposed to teach a 5 year old ?? 😢. Yes, I hate to break it to you, but to understand CNN, you have to know what a neural network is first. You can refer to this reference though 😁. Each neuron in CNN will receive several inputs, takes a weighted sum over them, passes it through an activation function and responds with an output. The whole network has a loss function and all the tips and tricks that we developed for neural networks still apply on CNNs. Okay, that’s enough of the hard part 😊.
So, CNN is basically a deep learning algorithm that can take images as its input and by some process of learning able to differentiate one image from another. This result could be achieved by changing the parameters (learnable weights and biases) of the model itself.
Representation of CNN Architecture
What makes CNN stand out from other classification techniques for classification of images is the total number of pre-processing required for the CNN / ConvNet is much lower as compared to other classification algorithms. Fun fact, the architecture of CNN and the majority of neural networks itself are really similar to the connectivity pattern inside of human brains and was inspired by the Visual Cortex of humans itself.
Okay, if you are still reading this post till this section, you may realize that I was lying to you guys about a guide for a 5 year old 🤣. Truthfully, this post was made for beginners who are scared to learn about CNN and neural networks (not for 5 year olds). Understanding a few concepts about CNN may also open your eyes about how fascinating this neural network is. So without further ado, brace yourself for the concept needed to truly understand CNN 😉
CNN Layer for classification
Image as an input
An image is a matrix of matrix value that indicates the pixel value for the image. One of the main reasons CNN is really good with classification based on image was because CNN is able to capture the Spatial and Temporal dependencies in an image through the application of relevant filters. Remember, the role of the CNN is to reduce the image into a form that is simpler for the algorithm to process, while still retaining the information of the images. Because of this, CNN takes less time to process images than other algorithms, making it one of the best algorithms to use when trying to tackle image problems.
#eli5 #machine-learning #deep-learning #deep learning
If you can’t explain it simply, you don’t understand it well enough - Einstein, the Man and His Achievement By G. J. Whitrow, Dover Press 1973.
CNN Model made from scratch, using the most popular Kaggle dataset Fruits-360 and obtaining 98% accuracy.
Step 1- Importing Dataset From Kaggle to Google Colab
Login to your Kaggle account and go to My Account, and download Kaggle.json file by clicking on CREATE NEW API. Then on Google colab upload the same API by following this code gist
!pip install -q kaggle from google.colab import files files.upload() #upload your kaggle.json kaggle api
! mkdir ~/.kaggle ! cp kaggle.json ~/.kaggle/ ! chmod 600 ~/.kaggle/kaggle.json ! kaggle datasets download -d moltean/fruits ! mkdir fruits ! unzip fruits.zip -d fruits
#image-recognition #cnn #data-science #convolutional-neural-net #neural-networks
In this article, we will learn about how computers see images & the issues faced while performing a computer vision task. We will see how deep learning comes into the picture & how with the power of neural networks, we can build a powerful computer vision system capable of solving extraordinary problems.
One example of how deep learning is transforming computer vision is facial recognition or face detection. On the top left, you can see the icon of the human eye which visually represents vision coming into the deep neural network in the form of images, pixels, videos & on the output on the bottom you can see a depiction of the human face or detection of the human face or this could also be recognizing different human faces or emotions on the face and also the key facial features, etc.
#convolution-neural-net #computer-vision #neural-networks #cnn #convolutional-network #series
A Convolutional Neural Network, also known as CNN or ConvNet, is a class of neural networks that specializes in processing data that has a grid-like topology, such as an image. A digital image is a binary representation of visual data. It contains a series of pixels arranged in a grid-like fashion that contains pixel values to denote how bright and what color each pixel should be.
Figure 1: Representation of image as a grid of pixels (Source)
The human brain processes a huge amount of information the second we see an image. Each neuron works in its own receptive field and is connected to other neurons in a way that they cover the entire visual field. Just as each neuron responds to stimuli only in the restricted region of the visual field called the receptive field in the biological vision system, each neuron in a CNN processes data only in its receptive field as well. The layers are arranged in such a way so that they detect simpler patterns first (lines, curves, etc.) and more complex patterns (faces, objects, etc.) further along. By using a CNN, one can enable sight to computers.
A CNN typically has three layers: a convolutional layer, a pooling layer, and a fully connected layer.
Figure 2: Architecture of a CNN (Source)
The convolution layer is the core building block of the CNN. It carries the main portion of the network’s computational load.
This layer performs a dot product between two matrices, where one matrix is the set of learnable parameters otherwise known as a kernel, and the other matrix is the restricted portion of the receptive field. The kernel is spatially smaller than an image but is more in-depth. This means that, if the image is composed of three (RGB) channels, the kernel height and width will be spatially small, but the depth extends up to all three channels.
#computer-vision #writing-nn #convolution-network #cnn #fashion-mnist #neural networks
C onvolutional Neural Networks (CNNs) are one of the most important neural network algorithms in the present scenario. Tech giants like Google, Facebook, Amazon have been thoroughly using this neural network to perform and achieve a number of image-related tasks.
The applications of CNNs mostly includes the field of computer vision for image recognition, object detection, among others, This neural network is also being used for video inputs, speech recognition, sentence modelling, etc. in NLP models and more.
Below, we have curated a list of 10 best free online resources, in no particular order, to learn Convolutional Neural Networks (CNNs).
About: This course is a part of the Deep Learning Specialisation at Coursera. Here, you will learn how to build convolutional neural networks and apply them to image data. You will understand how to build a CNN model, understand the recent variations, know how to apply convolutional networks to visual detection as well as recognition tasks and more.
Know more here.
**About: **This tutorial is curated by the developers at Google. This tutorial, encompasses a brief introduction on convolution neural networks (CNNs), how it works, including hands-on training. You will learn topics like ReLU, pooling, fully connected layers and more.
Know more here.
**About: **This is a free course where you will learn about convolution neural networks and how they can be used in visual recognition. The tutorial starts with an architecture overview and then moves into ConvNet layers such as normalisation layer, fully connected layer, etc. including its architectures, such as layer patterns, computational considerations and more.
Know more here.
#cnn neural network #cnns #convolutional neural networks
A simple yet comprehensive approach to the concepts
Convolutional Neural Networks
Artificial intelligence has seen a tremendous growth over the last few years, The gap between machines and humans is slowly but steadily decreasing. One important difference between humans and machines is (or rather was!) with regards to human’s perception of images and sound.How do we train a machine to recognize images and sound as we do?
At this point we can ask ourselves a few questions!!!
How would the machines perceive images and sound ?
How would the machines be able to differentiate between different images for example say between a cat and a dog?
Can machines identify and differentiate between different human beings for example lets say differentiate a male from a female or identify Leonardo Di Caprio or Brad Pitt by just feeding their images to it?
Let’s attempt to find out!!!
The Colour coding system:
Lets get a basic idea of what the colour coding system for machines is
RGB decimal system: It is denoted as rgb(255, 0, 0). It consists of three channels representing RED , BLUE and GREEN respectively . RGB defines how much red, green or blue value you’d like to have displayed in a decimal value somewhere between 0, which is no representation of the color, and 255, the highest possible concentration of the color. So, in the example rgb(255, 0, 0), we’d get a very bright red. If we wanted all green, our RGB would be rgb(0, 255, 0). For a simple blue, it would be rgb(0, 0, 255).As we know all colours can be obtained as a combination of Red , Green and Blue , we can obtain the coding for any colour we want.
Gray scale: Gray scale consists of just 1 channel (0 to 255)with 0 representing black and 255 representing white. The colors in between represent the different shades of Gray.
Computers ‘see’ in a different way than we do. Their world consists of only numbers.
Every image can be represented as 2-dimensional arrays of numbers, known as pixels.
But the fact that they perceive images in a different way, doesn’t mean we can’t train them to recognize patterns, like we do. We just have to think of what an image is in a different way.
Now that we have a basic idea of how images can be represented , let us try and understand The architecture of a CNN
Convolutional Neural Networks have a different architecture than regular Neural Networks. Regular Neural Networks transform an input by putting it through a series of hidden layers. Every layer is made up of a set of neurons, where each layer is fully connected to all neurons in the layer before. Finally, there is a last fully-connected layer — the output layer — that represent the predictions.
Convolutional Neural Networks are a bit different. First of all, the layers are organised in 3 dimensions: width, height and depth. Further, the neurons in one layer do not connect to all the neurons in the next layer but only to a small region of it. Lastly, the final output will be reduced to a single vector of probability scores, organized along the depth dimension
A typical CNN architecture
As can be seen above CNNs have two components:
In this part, the network will perform a series of **convolutions **and pooling operations during which the features are detected. If you had a picture of a tiger , this is the part where the network would recognize the stripes , 4 legs , 2 eyes , one nose , distinctive orange colour etc.
Here, the fully connected layers will serve as a classifier on top of these extracted features. They will assign a** probability** for the object on the image being what the algorithm predicts it is.
Before we proceed any further we need to understand what is “convolution”, we will come back to the architecture later:
What do we mean by the “convolution” in Convolutional Neural Networks?
Let us decode!!!
#convolutional-neural-net #convolution #computer-vision #neural networks