Fundamentals of ConvNets
ConvNets are at the heart of image recognition and computer vision. One of the most fascinating things about this is how a sequence of raw mathematical operations like multiplication and addition goes all the way to process and recognize complex visuals. In this episode, we talk about a few fundamental concepts of computer vision, define and illustrate the working procedure of ConvNets and jot down some technical terms associated with that. First, let's talk of the idea since they are bulletproof(!)

The idea

The idea is simple, detect what’s inside an image, playback video, or a live recording (since all videos are at the most rudimentary level a sequence of fast-changing images). Technically speaking, computer vision is the science of programming a computer to gain a high-level understanding of digital imagery by replicating the working strategy of the human visual system. We use a variation of artificial neural networks called Convoluted Neural Network to achieve this. From here on, I’ll be referring to the technology as CNN. The core task of a CNN is to detect the valuable features in an image so that the image can itself be represented mathematically in the form of a vector of numerical figures which can, in turn, be compared against that of a labelled image to confirm to which class the subject belongs or what's in it depending on the initial requirements.

Now, CNN may have numerous layers, each of a different type — which I’ll not be discussing in this episode. The layer we’ll be focusing here today is the convolution layer.

The Convolution Layer

The convolution layer as the name suggests performs the convolution operation. To begin with, let point out the fact that digital images arrays of numbers (typically ranging between 0 to 256) denoting the colour combination of each pixel. For instance, an1 KB grayscale square image is in binary an array of size 1024 x 1024. Please note that coloured images use a third dimension called the colour channel and that for simplicity, we’ll be dealing with grayscale images in this lecture.

The primary job of a convolution layer is to detect significant features in an image. We begin with edge detection. An edge (no, not the WWE one!) in an image is a line, straight or curved, both sides which have a sharp change colour contrast. To detect one, a filter window is slid over the original image that attempts to look for an edge within its scope. Here’s how the convolution is done,

Take an image of dimensions nh x nw

A filter of fh x fw

Slide the filter over the image, one step at a time, and on each step, perform an element-wise multiplication of each element of the image with that of the filter, within the scope of the window and finally add the products and store the sum in a 2d resultant array, we’ll talk about the dimensions of the resultant array in a short while.

Here’s a pictorial view,
['Hussain Safwan']
['Machine Learning', 'Cnn', 'Convolutional Network', 'Computer Vision']