1
00:00:00,330 --> 00:00:01,420
Hi and welcome back.

2
00:00:01,440 --> 00:00:08,580
So now let's take a look at the grad cam algorithm, which allows us to give a visual explanation of

3
00:00:08,580 --> 00:00:10,980
what a convolutional neural network is learning.

4
00:00:11,490 --> 00:00:13,970
So let's take a look at what grad camera looks like.

5
00:00:13,980 --> 00:00:18,390
So the output of grad cam looks like this, which is pretty cool.

6
00:00:18,550 --> 00:00:19,950
So what is it telling us?

7
00:00:20,430 --> 00:00:25,680
Well, good outcome is a very useful technique that basically tells us, well, model looking.

8
00:00:26,100 --> 00:00:33,270
So it uses a localized based algorithm with gradient ascent to basically highlight the portions of the

9
00:00:33,270 --> 00:00:39,330
image here that basically triggered that CNN to output that specific class.

10
00:00:40,080 --> 00:00:42,150
So let's take a look at some more breadcrumb.

11
00:00:42,720 --> 00:00:45,700
This is from a grad can paper, which you can access here to to SeaWorld.

12
00:00:46,500 --> 00:00:52,230
These are some of the basically how how the algorithm, some demonstrations of the algorithm from the

13
00:00:52,230 --> 00:00:52,590
paper.

14
00:00:53,160 --> 00:00:59,750
So you can see when Grad Cam was predicting that this is the areas of the image where cut was triggered,

15
00:00:59,760 --> 00:01:05,400
which makes sense because these are where the features are, the eyes and the ears, especially similarly

16
00:01:05,400 --> 00:01:07,770
for dogs, it was in this dog's face as well.

17
00:01:08,220 --> 00:01:12,760
So you can see the density, the heat map density basically overlaid onto the image.

18
00:01:12,780 --> 00:01:16,530
That's where grad cam, that's where the CNN model was focused on.

19
00:01:17,490 --> 00:01:24,270
So a grad covers a very, very useful as it provides a better understanding of what our model is basically

20
00:01:24,270 --> 00:01:27,540
showing areas of the image it use to make its decision.

21
00:01:28,050 --> 00:01:30,510
So how exactly does Grad Cam work?

22
00:01:30,840 --> 00:01:37,560
Well, basically Grad Cam exploits the spatial information that is preserved in the convolutional is

23
00:01:37,560 --> 00:01:39,330
that we have a known network here.

24
00:01:40,110 --> 00:01:45,300
Now what it does is it uses the feature maps produced by the last kind of conflict here.

25
00:01:45,330 --> 00:01:48,000
That's the one that we highlight in this pink box.

26
00:01:48,630 --> 00:01:54,660
And at this point, we can insert some differentiate double layers after that last conflict output.

27
00:01:55,200 --> 00:01:58,110
So this is so we can get the gradients out afterwards.

28
00:01:58,710 --> 00:02:00,750
So Ingrid, can we wait?

29
00:02:00,750 --> 00:02:04,860
The feature maps using alpha values that are calculated based on the gradient.

30
00:02:05,430 --> 00:02:06,810
This is used to make the heat map.

31
00:02:06,810 --> 00:02:08,490
That's how we get this nice heat map image.

32
00:02:08,490 --> 00:02:12,600
Here we can create one and we can create one for each class, which is quite cool.

33
00:02:12,600 --> 00:02:12,960
Cool.

34
00:02:13,350 --> 00:02:18,510
And then we can overlay those hip apps onto the image to get those those visualizations that we've seen

35
00:02:18,510 --> 00:02:19,470
in the previous slide.

36
00:02:20,010 --> 00:02:26,180
So we'll take a look at performing grad cam, as well as some various variations of grad can increase

37
00:02:26,580 --> 00:02:28,620
in the could soon in the lab notebook.

38
00:02:29,190 --> 00:02:36,210
Afterwards, we'll take a look at some basic CNN design principles just to kind of keep you up to date

39
00:02:36,330 --> 00:02:41,940
and also solidify some of the knowledge we learned before because it could be quite overwhelming sometimes.

40
00:02:42,360 --> 00:02:48,510
So this is a nice summary to basically kind of show you how how we design to see and what type of CNN,

41
00:02:48,540 --> 00:02:50,730
how many layers, that sort of thing.

42
00:02:50,940 --> 00:02:56,520
So I'll see you in the code lesson now and then we'll go back to the slides where we talk about CNN

43
00:02:56,520 --> 00:02:57,570
design principles.

44
00:02:58,140 --> 00:02:59,460
So stay tuned.

45
00:02:59,670 --> 00:02:59,890
Thank you.
