1. Home
2. Training Library
3. Big Data
4. Courses
5. Getting Started With Deep Learning: Convolutional Neural Networks

# Convolution in 2 D

1
Introduction
PREVIEW1m 35s
2
10
12
15
19
21

## The course is part of this learning path

Start course
Overview
DifficultyBeginner
Duration1h 19m
Students243
Ratings
5/5

### Description

In this course, discover convolutions and the convolutional neural networks involved in Data and Machine Learning. Introducing the concept of tensor, which is essential for everything that follows.

Learn to apply the right kind of data such as images. Images store their information in pixels, but you will discover that it is not the value of each pixel that matters.

Learning Objectives

• Understand how convolutional neural networks are essential to the fundamentals of Data and Machine Learning.

Intended Audience

### Transcript

Hello and welcome to this video on two-dimensional convolution. In this video, we will talk about two-dimensional convolution. Let's say we have a nine-by-nine image like the one here. And let's say we're looking for diagonal patterns like the one that is represented here. In this image, there are four three-by-three windows that match exactly the pattern displayed here in the few other places where similar patten can be found. Let's see how a convolution helps us identify those four locations. We perform a convolution of two images by multiplying the three-by-three filter with a three-by-three patch in the image and then shifting the patch like in the one-dimensional case. Let's do this pixel by pixels. We started the first pixel and stored the multiplication in a temporary three-by-three array.

Then move on to the second pixel. Then the third. Then the fourth and so on until we've reached the end of the filter. At this point, we have multiplied each of the nine pixels and we can take the sum of all the products and while we're at it, we also divide by the number of elements in the patch, which means we normalize the sum by the area of the patch. We have effectively averaged the product of the patch with the filter and in this particular case we obtain a value of one as our final result. We can perform the same operation using a different patch in the image. In this case, some pixel product will turn out to be negative because the patch is not identical to our filter. When we're done, we do the sum and divide by nine and we obtain a different smaller value for the corresponding pixel in the convolution result.

If we repeat this process for every possible three-by-three patch in the original image, we obtain the 2D convolution of the image with the filter. Notice that four pixels in the resulting convolution are exactly equal to one and they correspond to a perfect match of the filter with the image at that location. The other pixels have smaller values with varying degrees indicating partial match only. We will indicate the convolution with the symbol of a cross circle. And by now we know that the result of the operation is again an image whose pixels indicate the degree of matching between the original image and the convolutional filter. In conclusion in this video, we've talked about 2D convolution for images and how can they be used to do pattern matching in an image. Thank you for watching and see you in the next video.