1
00:00:00,840 --> 00:00:01,220
Hello.

2
00:00:01,230 --> 00:00:02,660
Welcome back.

3
00:00:02,670 --> 00:00:06,930
The mathematical definition of convolution is defined like this.

4
00:00:07,020 --> 00:00:10,110
This equation G of X Y appear.

5
00:00:10,980 --> 00:00:18,900
However in practice it is written like this one down here where the minus infinity to infinity is replaced

6
00:00:18,900 --> 00:00:26,630
with an subscript two and m subscript 2 what m subscript to represent.

7
00:00:26,640 --> 00:00:34,410
D have masks with and the N subscript to represent the half the masks height you can think of the mask

8
00:00:35,070 --> 00:00:42,000
as a filter or a smaller matrix remember the image itself is a matrix and a mask is a smaller matrix

9
00:00:42,510 --> 00:00:50,850
that we can evolve the image with and the basic mechanism used to understand one convolution can be

10
00:00:50,910 --> 00:00:54,050
expanded to the 2D domain as well.

11
00:00:54,180 --> 00:01:05,070
In this case the 2D array a is usually the input image and B is a small mask or matrix is a small matrix

12
00:01:05,100 --> 00:01:06,920
usually 3 by 3.

13
00:01:07,020 --> 00:01:15,380
The idea of mirroring and B and shifting it across it can also be adapted to that 2D case however mirror

14
00:01:15,450 --> 00:01:22,680
iron will now take place in both X and Y dimensions and shift and will be done starting from the top

15
00:01:22,680 --> 00:01:24,390
left points in the image.

16
00:01:24,510 --> 00:01:32,730
Moving along each line on to the bottom right pixel in a has been processed let's see one example let's

17
00:01:32,730 --> 00:01:40,920
say we have an image a represented by this matrix over here and a mask be represented by this three

18
00:01:40,920 --> 00:01:45,000
by three matrix when we perform a convolution B.

19
00:01:45,120 --> 00:01:53,850
This is where we get this other matrix here over here we must note that he has been flipped in both

20
00:01:54,030 --> 00:02:02,640
X and Y dimensions before the sum of the product is calculated as we can see from this image here as

21
00:02:02,640 --> 00:02:07,660
well as in the calculation to becomes minus 2 1 becomes minus 1.

22
00:02:07,950 --> 00:02:16,410
And of course flipping so remains the same convolution that masks that's a very common image processing

23
00:02:16,410 --> 00:02:23,900
technique and depending on the choice of mask coefficient entirely different result can be obtained.

24
00:02:23,970 --> 00:02:34,170
For example we can achieve results such as blurring sharpening edge detection etc. Now about correlation

25
00:02:34,230 --> 00:02:37,750
we express one dimensional correlation like this.

26
00:02:38,070 --> 00:02:43,700
You will realize that the correlation equation is just exactly like the convolution except that over

27
00:02:43,720 --> 00:02:46,810
here that minus sign is changed to a plus side.

28
00:02:46,830 --> 00:02:55,580
Similarly we can express to the correlation like this just like we saw in convolution again or that

29
00:02:55,610 --> 00:02:57,670
he had a minus sign he's changed to plus.

30
00:02:58,090 --> 00:03:06,310
So in a nutshell correlation is the same as convolution without flip in the mask before the sum of products

31
00:03:06,510 --> 00:03:07,840
are computed.

32
00:03:07,960 --> 00:03:14,380
The difference between using correlation and convolution intuiting neighborhood process operations is

33
00:03:14,440 --> 00:03:21,730
often irrelevant because many popular masks or floaters used an image process and are symmetrical around

34
00:03:21,730 --> 00:03:22,840
the origin.

35
00:03:22,840 --> 00:03:29,530
This diagram here shows the convolution process of an image and a candle in a much more generalized

36
00:03:29,590 --> 00:03:30,650
form.

37
00:03:30,800 --> 00:03:35,290
Over here we have come forward and a three by four image with a two by two candle.

38
00:03:35,630 --> 00:03:43,630
And the outputs is produce the output produced is a two by three matrix or image.

39
00:03:43,630 --> 00:03:50,290
We will see an equation later on for deriving the output size given the size of the image and the size

40
00:03:50,290 --> 00:03:51,030
of the filter.

41
00:03:51,050 --> 00:03:59,140
Kanno kind of post the video to see how you know what the calculation is performed here right.

42
00:03:59,170 --> 00:04:04,450
We can also convert of a single input image with multiple filters.

43
00:04:04,680 --> 00:04:12,640
Over here we see a single input image confused with Kana 1 the same image confused with filter Cano

44
00:04:12,670 --> 00:04:16,570
2 and then the same image involved with filter can 0 3.

45
00:04:17,500 --> 00:04:24,830
We find the output by adding the results from the 3 different filter can no convolutions.

46
00:04:24,970 --> 00:04:30,300
And then we add out a bias which is 1 when we are working in deep learning.

47
00:04:30,310 --> 00:04:37,120
We've got to admit bias as we can see demonstrated in this animation you can post the video or slow

48
00:04:37,120 --> 00:04:43,030
the video down to see how the animation is showing how the calculation is performed.

49
00:04:43,750 --> 00:04:49,130
We shall take a look at the reason why this animation is moving the way it is moving and why.

50
00:04:49,910 --> 00:04:54,890
And yeah the reason why it's moving the way it is moving and why he's taken these number of steps.

51
00:04:54,910 --> 00:04:57,830
When we start talking about what is known as strides

52
00:05:00,250 --> 00:05:00,580
right.

53
00:05:00,610 --> 00:05:05,360
So that's all there is in the next lesson we should describe the convolution layer.
