1
00:00:00,150 --> 00:00:06,300
Hello, everyone, and welcome to this new and exciting session in which we are going to see how to

2
00:00:06,300 --> 00:00:14,600
implement the great cam technique which permits us visually explain how the deep neural networks work.

3
00:00:14,610 --> 00:00:22,980
This was first developed in this paper by Ramprasad et al and entitled Grant come a visual explanations

4
00:00:22,980 --> 00:00:27,500
from deep networks via gradient based localization.

5
00:00:27,570 --> 00:00:32,100
So as you could see here, we have this input.

6
00:00:32,100 --> 00:00:38,040
For example, let's reduce this, we have this original image and then we can see this grad cam output.

7
00:00:38,070 --> 00:00:43,380
Now the task here is a classification task where we're trying to say whether there's a cat or dog in

8
00:00:43,410 --> 00:00:52,200
the image and then with a grad cam for the cat were able to detect the portion of the image which influenced

9
00:00:52,200 --> 00:00:55,890
the model to say that there is a cat in the image.

10
00:00:55,890 --> 00:01:04,080
And also for the grad cam dog, we have this part here which shows us that this portion influences the

11
00:01:04,080 --> 00:01:11,330
model the most in detecting or seeing that there is a dog in the image.

12
00:01:11,340 --> 00:01:14,280
Now we also have the grad cam for different models.

13
00:01:14,280 --> 00:01:20,820
You see this grad cam for the VG model, and we have this Reznick grad Cam right here.

14
00:01:20,820 --> 00:01:27,720
So we see that two different models can produce two different grad cams, though generally they should

15
00:01:27,720 --> 00:01:28,560
be similar.

16
00:01:28,560 --> 00:01:35,910
We see that with the rest net we have this larger surface as compared to this VG And we could also see

17
00:01:35,910 --> 00:01:37,260
this for the cat.

18
00:01:37,290 --> 00:01:42,570
Now that said, we are going to implement the grab cam technique which generates our, which permits

19
00:01:42,570 --> 00:01:50,610
are to generate these kinds of visualizations which tell us what parts of the input influence the model

20
00:01:50,610 --> 00:01:52,260
in taking certain decisions.

21
00:01:52,800 --> 00:02:01,410
As we can see in this figure two from the paper, given an image and a class of interest, for example,

22
00:02:01,410 --> 00:02:04,920
the tiger cat or any other type of differentiable output.

23
00:02:04,920 --> 00:02:11,370
So like here we have this image, you see the image and we're giving the class tiger cat.

24
00:02:12,210 --> 00:02:15,960
So yeah, the task is classic image classification.

25
00:02:15,960 --> 00:02:19,110
So here we have this class tiger cat.

26
00:02:19,140 --> 00:02:25,860
Now, for now, we'll keep our this here, we'll focus only on this image classification.

27
00:02:25,860 --> 00:02:31,500
So essentially we have this image, as we've said already, we we have the class, then we pass this

28
00:02:31,500 --> 00:02:32,760
through a CNN.

29
00:02:32,760 --> 00:02:34,890
That's a convolutional neural network.

30
00:02:35,520 --> 00:02:41,790
You have that right here where let's say we forward propagate the image to the scene part of the model.

31
00:02:41,790 --> 00:02:44,760
Remember this, CNN has already been trained.

32
00:02:44,760 --> 00:02:51,120
So with all this to the CNN part of the model and then through the text specific competitions to obtain

33
00:02:51,120 --> 00:02:53,220
an raw score for the category.

34
00:02:53,220 --> 00:02:57,540
So task specific here, in our case, our task is image classification.

35
00:02:57,540 --> 00:03:03,440
So this year is specific to our task, which is that of image classification.

36
00:03:03,450 --> 00:03:09,090
Now the gradients are set to zero for all classes except the desired class.

37
00:03:09,990 --> 00:03:17,190
Then the signal is then back propagated to the rectified convolutional feature maps of interest.

38
00:03:17,880 --> 00:03:25,590
So you can see from here that when we follow propagate this to our CNN, we have this output feature

39
00:03:25,590 --> 00:03:26,070
maps.

40
00:03:26,070 --> 00:03:28,740
Here you have rectified conf feature maps.

41
00:03:28,740 --> 00:03:34,500
So these are feature maps and then we pass this through this fully connected layers.

42
00:03:34,500 --> 00:03:42,510
Then we obtain the outputs from here, we bind, propagate, as we said already to this rectified feature

43
00:03:42,510 --> 00:03:43,200
maps.

44
00:03:44,900 --> 00:03:49,670
I could see that the result end of this back propagation is what we have here.

45
00:03:50,000 --> 00:03:53,150
Notice how this is colored compared to this.

46
00:03:53,150 --> 00:04:00,590
So the years of future maps here is the output from back propagation from this output backed up to this

47
00:04:00,590 --> 00:04:01,490
feature maps.

48
00:04:01,490 --> 00:04:07,140
So we we obtained this by doing the derivative of this output.

49
00:04:07,160 --> 00:04:13,120
Let's say y, let's say y tiger, let's call it tc y tc y tiger cat.

50
00:04:13,130 --> 00:04:19,460
With respect to x feature maps, let's call it FM.

51
00:04:20,730 --> 00:04:31,290
So what we find in our we compute in this derivatives of the output with respect to each and every value

52
00:04:31,290 --> 00:04:33,120
we have here for the feature maps.

53
00:04:33,120 --> 00:04:39,180
And obviously this would give us a corresponding feature map, just like having let's, let's pick any

54
00:04:39,180 --> 00:04:41,220
position, let's say this one on position here.

55
00:04:41,220 --> 00:04:46,620
We take the output respect to this, we take the output respect to another position, to the output,

56
00:04:46,620 --> 00:04:48,750
respect on that position and so on and so forth.

57
00:04:48,750 --> 00:04:52,830
And by doing this, we reconstruct somehow this feature maps.

58
00:04:52,830 --> 00:04:58,980
But this time around it's going to be the derivatives of the output respect to each and every position.

59
00:04:59,910 --> 00:05:04,470
Then from here, as you could see, let's take this off from here.

60
00:05:04,470 --> 00:05:10,560
What we do is we are going to obtain the mean for each and every one of those features.

61
00:05:10,560 --> 00:05:14,340
So you see this one, this one does pinkish you have this here.

62
00:05:14,340 --> 00:05:24,900
So we obtained the mean of for this we take for this we obtain this mean this and so on and so forth.

63
00:05:24,900 --> 00:05:32,670
So we obtain all this and so all this mean values now are going to be multiplied by this feature maps.

64
00:05:32,760 --> 00:05:40,740
So for this, for example, this one year we will take this and multiply this features.

65
00:05:40,740 --> 00:05:43,410
We take this multiply.

66
00:05:44,490 --> 00:05:46,650
Those features and so on and so forth.

67
00:05:46,680 --> 00:05:56,220
Then once we get this, we are going to combine all this or add all these features up and then pass

68
00:05:56,220 --> 00:06:02,040
this through a low function, which then produces our grad camp.

69
00:06:02,730 --> 00:06:06,960
And so that's how this works in theory, that's how we obtain this grant.

70
00:06:06,960 --> 00:06:11,520
Can we have here let's dive into the code and get this practically.

71
00:06:11,940 --> 00:06:17,430
So first, since first we have this efficient net B five model, which we had trained already.

72
00:06:17,430 --> 00:06:20,190
So we'll just load the weights.

73
00:06:20,490 --> 00:06:24,030
Let's go ahead and load this weights.

74
00:06:24,030 --> 00:06:30,090
So we have pre-trained model load weights and there we go from here, we could test out the model.

75
00:06:30,090 --> 00:06:31,650
So we have this image.

76
00:06:31,650 --> 00:06:34,170
Here is basically what we've seen already in testing.

77
00:06:34,170 --> 00:06:42,810
So we have the test image, we expand dimensions and then we have the Pre-trained model, which now

78
00:06:42,810 --> 00:06:44,540
takes in our image array.

79
00:06:44,550 --> 00:06:46,650
So this is the output right here.

80
00:06:46,650 --> 00:06:55,680
You could see that the max is at this index one, which is logical because it's a happy image.

81
00:06:55,680 --> 00:06:58,800
We could see that right here.

82
00:06:58,800 --> 00:06:59,820
The person is happy.

83
00:06:59,820 --> 00:07:04,770
So this is our image and here's what our model produces.

84
00:07:05,190 --> 00:07:08,100
Remember, as we've seen already, we have actually three classes.

85
00:07:08,100 --> 00:07:11,580
We have angry, happy and sad.

86
00:07:11,580 --> 00:07:17,610
And this is a zero index index one and the index two.

87
00:07:17,610 --> 00:07:21,630
So our output is index one, meaning this prediction is correct.

88
00:07:23,190 --> 00:07:24,030
At this point.

89
00:07:24,030 --> 00:07:28,620
If you could recall from here, this model was broken up into two parts.

90
00:07:28,620 --> 00:07:31,200
So we have let's take this off.

91
00:07:31,200 --> 00:07:38,490
We have this first part which generates this feature maps and then this other parts, which takes in

92
00:07:38,490 --> 00:07:41,460
the feature maps and then outputs.

93
00:07:42,610 --> 00:07:46,270
The specific class of this input image.

94
00:07:46,960 --> 00:07:55,510
But given that when defining our model, this was in a block that is we basically defined this as one,

95
00:07:55,510 --> 00:08:02,140
not as two separate entities like this, we are going to look at how to separate this or better still,

96
00:08:02,140 --> 00:08:07,900
how to create a model which is made up of only the first part and then the model matter of this other

97
00:08:07,900 --> 00:08:08,230
part.

98
00:08:09,250 --> 00:08:16,180
And then one thing you should note is that the way we created this model was a bit different from what

99
00:08:16,180 --> 00:08:17,390
we had seen so far.

100
00:08:17,410 --> 00:08:23,830
So previously, if we get back here with those Pre-trained models, let's get back modeling.

101
00:08:24,070 --> 00:08:28,990
We have pre trained well, let's pick this one chance for learning with this.

102
00:08:28,990 --> 00:08:36,340
You see that we had a backbone defined and then we have the backbone, we have global average pulling

103
00:08:36,340 --> 00:08:37,420
and so on and so forth.

104
00:08:37,430 --> 00:08:43,210
And then when you look at the summary, if you look at the summary, you have all this represented as

105
00:08:43,210 --> 00:08:43,600
one.

106
00:08:43,600 --> 00:08:49,300
So the backbone was or you don't get into the details of what is contained in the backbone.

107
00:08:49,300 --> 00:08:55,810
But now when you look at this order summary, let's get down to Occam.

108
00:08:55,810 --> 00:09:00,880
When you look at this model summary now, you would find that all the details of the backbone are given.

109
00:09:00,880 --> 00:09:08,950
And this is gotten differently because now what we do is the input of our X, which is passing to the

110
00:09:08,950 --> 00:09:09,550
global average.

111
00:09:09,550 --> 00:09:13,550
Pulling is simply this backbone dot output.

112
00:09:13,570 --> 00:09:22,180
So when we say when we specify that you want to get the backbone output, this permits us get a summary

113
00:09:22,180 --> 00:09:24,040
with all the details like this.

114
00:09:24,040 --> 00:09:29,260
And then when it comes to the inputs here, you would say you want to have the backbone inputs.

115
00:09:29,260 --> 00:09:33,130
So let's this input right here is actually useless.

116
00:09:33,130 --> 00:09:34,720
You need to take you could take this off.

117
00:09:34,720 --> 00:09:35,440
So that's it.

118
00:09:35,440 --> 00:09:40,870
So once you specify this and then you have your usual output, then you would get this full summary.

119
00:09:41,110 --> 00:09:41,530
Okay.

120
00:09:41,530 --> 00:09:51,220
So that said, now let's go ahead and create our make this model out of this full model we have here.

121
00:09:51,940 --> 00:09:59,650
So in order to create this last conf layer model, which is essentially this model, here's where we'll

122
00:09:59,650 --> 00:10:08,860
get the output to be this rectified code feature maps, we have this Keras model which takes us input

123
00:10:08,860 --> 00:10:10,510
the Pre-trained model inputs.

124
00:10:10,510 --> 00:10:17,520
So it's quite similar to what we had already here where we just take the inputs to be the backbone inputs.

125
00:10:17,530 --> 00:10:24,520
Now our inputs is the full pre-trained model inputs, but then the outputs take notice.

126
00:10:24,520 --> 00:10:29,470
The output is this last count layer output.

127
00:10:29,500 --> 00:10:38,260
Now what is this last conf layer, the last const, The last conf layer is that layer whose name is

128
00:10:38,260 --> 00:10:40,210
given as top activation.

129
00:10:40,210 --> 00:10:45,880
You'll notice that this is this last conf layer where we have this feature maps, it's eight by eight

130
00:10:45,880 --> 00:10:47,290
by 2048.

131
00:10:47,290 --> 00:10:52,540
And then from here we move on to the global average pulling, then there's one, then two, and then

132
00:10:52,540 --> 00:10:53,620
we have our output.

133
00:10:53,620 --> 00:11:03,130
So this part from your upwards is this initial conv layer, all this convolutional neural network.

134
00:11:03,130 --> 00:11:07,870
And then this here is this classifier unit to the right.

135
00:11:08,530 --> 00:11:14,530
And so now that we have this name of this last conv layer, that is the top activation, we are going

136
00:11:14,530 --> 00:11:18,940
to make use of that to produce our outputs.

137
00:11:18,940 --> 00:11:26,050
You see, last layer is simply the Pre-trained model and we get the layer whose name is last conf layer

138
00:11:26,080 --> 00:11:28,270
name and last name is top activation.

139
00:11:28,270 --> 00:11:32,080
So we understand where we get this top activation from.

140
00:11:32,080 --> 00:11:33,820
So now we have our last layer.

141
00:11:33,820 --> 00:11:42,550
As we've said already, we are now able to have this last Conv layer model or this initial CNN model

142
00:11:42,550 --> 00:11:48,610
year which has as input the image and as output the feature maps.

143
00:11:48,610 --> 00:11:52,140
So let's run this and see what we get.

144
00:11:52,150 --> 00:11:52,990
There we go.

145
00:11:52,990 --> 00:12:02,200
We could, we could do last conv layer model, model and check out the summary.

146
00:12:02,950 --> 00:12:04,090
There you go.

147
00:12:04,090 --> 00:12:06,340
We have this model.

148
00:12:06,790 --> 00:12:10,900
Let's check out the output you see here the model output.

149
00:12:10,900 --> 00:12:14,890
And here is the model's input.

150
00:12:16,200 --> 00:12:18,810
See 256 by two by three.

151
00:12:18,810 --> 00:12:23,010
So we have the the input is the image and the output, the feature maps.

152
00:12:23,790 --> 00:12:29,610
Now we've built this first model or we've created this first model from our overall model.

153
00:12:29,640 --> 00:12:34,360
Let's go ahead and check out on our classifier model.

154
00:12:34,380 --> 00:12:37,830
So for the classifier model, you see we have this inputs.

155
00:12:38,010 --> 00:12:40,770
The input now is going to be this feature maps.

156
00:12:40,770 --> 00:12:47,270
Remember, the output of this was the feature maps and the input of this is the feature maps from here.

157
00:12:47,280 --> 00:12:54,270
Given that we have the inputs to this classifier model, we are going to simply pass this through each

158
00:12:54,270 --> 00:13:00,630
and every layer which makes up the classification part of the Pre-trained model.

159
00:13:00,630 --> 00:13:04,750
So if we get back up here, let's scroll back up.

160
00:13:04,770 --> 00:13:07,950
You'll notice that we had this global average pulling.

161
00:13:07,950 --> 00:13:13,800
We had this dense we had dense one, we had this dense two, which all make up the classifier path.

162
00:13:13,800 --> 00:13:21,300
So let's get back here and then you see this classifier layer name is given here, so we understand

163
00:13:21,300 --> 00:13:22,920
where these names are coming from.

164
00:13:22,920 --> 00:13:29,280
And then we simply go through for every layer name in our classifier layer names.

165
00:13:29,280 --> 00:13:31,230
So let's have this.

166
00:13:31,230 --> 00:13:36,300
So for every layer name in our classifier layer names, we are going to pass the inputs.

167
00:13:36,300 --> 00:13:41,580
This input classifier classifier inputs into this layers.

168
00:13:41,580 --> 00:13:45,330
So we take this input pass into the global average pooling.

169
00:13:45,360 --> 00:13:51,000
Then the output will be x, we take that again, pass this into the dense, then we'll take that again

170
00:13:51,000 --> 00:13:53,430
passing to dense one and then pass into dense two.

171
00:13:53,430 --> 00:13:56,550
And then we have the outputs, which is in this case X.

172
00:13:56,550 --> 00:14:01,530
So our input is the classifier input which is this and our output is the output.

173
00:14:01,530 --> 00:14:09,570
After we pass this input through this different layers, the comb block and the classification unit

174
00:14:09,570 --> 00:14:17,970
designed, the next step will be to compute the partial derivatives of the output with respect to the

175
00:14:17,970 --> 00:14:19,320
features here.

176
00:14:19,650 --> 00:14:26,310
Now, we could compute this partial derivatives of this gradients making use of this gradient method,

177
00:14:26,310 --> 00:14:33,830
which takes in the top class channel and the last conv layer output.

178
00:14:33,840 --> 00:14:37,920
So this year is our top class.

179
00:14:38,040 --> 00:14:46,380
And then here we have our feature maps to obtain this feature mapped As this class conv layer output,

180
00:14:46,380 --> 00:14:54,030
we simply pass the inputs as the image into our last of layer model allows configure model this kind

181
00:14:54,030 --> 00:14:54,510
of layer.

182
00:14:54,510 --> 00:14:58,890
All this conf model right here, take the input pass in here, opt in the feature map.

183
00:14:58,890 --> 00:15:05,250
So use our feature maps and then from the feature maps we pass this to our classifier model.

184
00:15:05,250 --> 00:15:10,650
So we take the classifier, we take the feature maps, pass the classifier model, obtain the predictions

185
00:15:10,830 --> 00:15:16,440
here, then those predictions, and then get the top prediction index.

186
00:15:16,440 --> 00:15:20,490
Now the START prediction index will depend on our example.

187
00:15:20,490 --> 00:15:25,800
Now, given that the person is happy, we expect this index value to be equal one.

188
00:15:25,800 --> 00:15:28,140
So we could we could even print this out.

189
00:15:28,530 --> 00:15:30,930
Let's print this out.

190
00:15:30,930 --> 00:15:33,330
Top prediction index.

191
00:15:33,480 --> 00:15:34,320
There we go.

192
00:15:34,320 --> 00:15:42,630
So we will have this top prediction index and then to obtain the exact score, we are going to simply

193
00:15:42,750 --> 00:15:46,590
pick that score from the predictions.

194
00:15:46,590 --> 00:15:50,190
So here we have the Preds, obviously the prices from this.

195
00:15:50,190 --> 00:15:51,420
So we have the Preds.

196
00:15:51,420 --> 00:15:57,270
And then by specifying top red index or by simply specifying one, what we're saying is want to get

197
00:15:57,270 --> 00:16:06,390
this car when we pass this input into this classifier model and now this car we're talking about here

198
00:16:06,390 --> 00:16:08,340
should be what we had right here.

199
00:16:08,340 --> 00:16:11,010
So it should be this value right here.

200
00:16:11,010 --> 00:16:16,890
So we compete in the partial derivative of the output with respect to the feature maps, and we're making

201
00:16:16,890 --> 00:16:19,980
use of this gradient method to help us do that.

202
00:16:19,980 --> 00:16:21,270
So let's take this off.

203
00:16:21,270 --> 00:16:27,270
You see here we have this year, there we go, we run this and then we obtain this output shape you

204
00:16:27,270 --> 00:16:29,820
see takes the exact shape of the feature maps.

205
00:16:30,610 --> 00:16:37,980
Then once we have this year does this gradients, the next thing we could do is simply obtain the mean

206
00:16:37,980 --> 00:16:41,130
values at every position right here.

207
00:16:41,130 --> 00:16:47,040
So we'll simply make use of this reduce mean while specifying the axis.

208
00:16:47,040 --> 00:16:54,120
So let's run this and print out our pulled Gratz ship.

209
00:16:55,290 --> 00:16:56,490
There we go.

210
00:16:56,520 --> 00:16:59,100
You see we have 2048.

211
00:16:59,100 --> 00:17:06,920
So it's basically this vector now where each position is a mean of a single channel.

212
00:17:06,930 --> 00:17:14,910
Remember, from here we had 2048 channels and each and every one of them was eight by eight.

213
00:17:14,910 --> 00:17:15,420
So.

214
00:17:15,700 --> 00:17:17,800
He should all because he won by eight by eight.

215
00:17:17,830 --> 00:17:22,060
So we had this for each and every channel.

216
00:17:22,060 --> 00:17:25,930
And now we've reduced each and every one of this into a single value.

217
00:17:25,930 --> 00:17:27,910
So this is just a single value.

218
00:17:27,940 --> 00:17:30,220
This is a single value which we have here.

219
00:17:30,220 --> 00:17:31,810
We should see here, essentially.

220
00:17:31,810 --> 00:17:39,370
And so now we have this 2048 dimensional vector, and that's what we've seen here.

221
00:17:39,370 --> 00:17:41,630
So this is essentially this.

222
00:17:41,650 --> 00:17:47,230
Now, the next step will be to take this here and multiply by our feature maps.

223
00:17:48,730 --> 00:17:50,380
To carry out the multiplication.

224
00:17:50,380 --> 00:17:54,040
We'll simply go for Iron Range 2048.

225
00:17:54,040 --> 00:18:00,910
So for each and every one of the different positions we have here, we are going to take the corresponding

226
00:18:00,910 --> 00:18:04,120
last conflict output, which is essentially this feature maps.

227
00:18:04,120 --> 00:18:06,710
So we take the feature map, you see, we specify.

228
00:18:06,820 --> 00:18:13,480
So if zero, then we take in this feature map of this channel and then multiplying by its corresponding

229
00:18:13,480 --> 00:18:21,340
pooled grats, which we've seen already to be the mean of each and every channel we have here for this

230
00:18:21,340 --> 00:18:22,150
gradients.

231
00:18:22,150 --> 00:18:24,050
So that's how we obtain this.

232
00:18:24,070 --> 00:18:31,510
Now note that we specify that one does zero element because this is one by eight by eight by 2048 and

233
00:18:31,510 --> 00:18:36,490
specifying this will leave us with a tensor of shape eight by eight by 2048.

234
00:18:36,490 --> 00:18:38,110
So we get rid of this here.

235
00:18:38,110 --> 00:18:45,880
So that said, we now run this and we obtain our last conflict output.

236
00:18:45,880 --> 00:18:48,980
So it's going to be obviously the same shape you could see.

237
00:18:49,000 --> 00:18:50,050
Check that out.

238
00:18:50,200 --> 00:18:53,950
Last conflict, output shape.

239
00:18:55,150 --> 00:18:56,320
And there we go.

240
00:18:56,650 --> 00:19:04,300
Now, to obtain the heatmap, we are going to sum up the values at different positions for all the channels.

241
00:19:04,300 --> 00:19:07,360
So let's suppose that we have something like this.

242
00:19:07,590 --> 00:19:09,730
Let's say it's, for example, three channels.

243
00:19:09,820 --> 00:19:18,970
Then this position C we have this position, we'll take this, plus this, plus this, and then we will

244
00:19:18,970 --> 00:19:20,170
have this output.

245
00:19:20,170 --> 00:19:27,850
Then we move to the next position, this, plus this, plus this, and then we have this and so on and

246
00:19:27,850 --> 00:19:28,380
so forth.

247
00:19:28,390 --> 00:19:35,020
So that's how we're going to go from this eight by eight by number of channels, output or let's say

248
00:19:35,020 --> 00:19:40,750
2048 output to an eight by eight heatmap.

249
00:19:40,750 --> 00:19:42,100
So this is what we have here.

250
00:19:42,100 --> 00:19:45,910
We're going to sum this and specify that axis is the channel axis.

251
00:19:45,910 --> 00:19:51,040
So we run this already and then now we could visualize our heatmap.

252
00:19:51,040 --> 00:19:53,740
But notice that there's also this railroad right here.

253
00:19:53,740 --> 00:19:58,330
So we have the rail before we visualize the heatmap.

254
00:19:58,870 --> 00:19:59,680
There we go.

255
00:19:59,710 --> 00:20:04,690
Here's our heatmap which we then resize using upon this resize method.

256
00:20:05,440 --> 00:20:11,830
So you see how we get from this heatmap, which was hit by eight to this one, which is 256 by 256.

257
00:20:11,830 --> 00:20:17,500
And the reason why we're doing this is because we want to add this with the image or purpose this on

258
00:20:17,500 --> 00:20:28,120
the image such that we have an output which shows us clearly where all better still regions of the image

259
00:20:28,120 --> 00:20:34,900
where we have the highest contribution to our output, which is that of a happy person.

260
00:20:34,900 --> 00:20:41,500
So the model places that this person is happy and now we know which parts of the image contributed the

261
00:20:41,500 --> 00:20:43,900
most to that prediction.

262
00:20:44,260 --> 00:20:52,180
Now try out with a different image and modifying this slightly so that we could get this image.

263
00:20:52,180 --> 00:20:54,970
Here we find that is this part.

264
00:20:54,970 --> 00:20:57,520
So previously it was a small region.

265
00:20:57,520 --> 00:21:02,860
Now is this reason we you see this wrinkles right here.

266
00:21:02,980 --> 00:21:08,110
We have this zone and this zone which influenced the prediction.

267
00:21:08,590 --> 00:21:11,710
And with this we've just implemented this great camera.

268
00:21:11,740 --> 00:21:14,980
Thank you for getting right up to this point and see you in the next section.
