1
00:00:00,090 --> 00:00:04,290
That's now generate this density maps from the Shanghai Tech dataset.

2
00:00:04,650 --> 00:00:12,530
The Shanghai tech dataset is made of images which are several hundred and 68 by 1024.

3
00:00:12,540 --> 00:00:16,150
So that's why we define this in X and in Y as such.

4
00:00:16,170 --> 00:00:23,610
Then we have our X and Y, which are the dimensions of our output, which happen to be the density maps

5
00:00:23,610 --> 00:00:25,310
we've seen already in the slides.

6
00:00:25,320 --> 00:00:36,600
So we are going to subsample this from 768 to 9 six and then this from 1024 to 128.

7
00:00:36,630 --> 00:00:41,310
Now dividing this by eight gives us this and then dividing this by eight gives us this.

8
00:00:41,310 --> 00:00:43,920
So it's been sub sampled by the same factor.

9
00:00:43,920 --> 00:00:56,130
So we have this sub sampling factor which will call or which we have as in x divided by our x or in

10
00:00:56,130 --> 00:00:57,840
Y, divided by our Y.

11
00:00:57,870 --> 00:00:59,220
Either way it works.

12
00:00:59,550 --> 00:01:00,990
So we'll take this off.

13
00:01:00,990 --> 00:01:07,380
And now we go ahead to define the Gaussian distribution, which we saw in the slides.

14
00:01:08,280 --> 00:01:09,960
This is defined quite simply.

15
00:01:09,960 --> 00:01:16,950
We have the mean of the distribution we have as standard deviation, which we define as sigma, and

16
00:01:16,950 --> 00:01:20,150
then we set it to this value of ten by default.

17
00:01:20,160 --> 00:01:25,850
Then we have the formula which we saw already, which is this we shall take this separate this portion.

18
00:01:25,860 --> 00:01:31,500
We have the first part, which is one divided by the square root of two pi sigma squared.

19
00:01:31,500 --> 00:01:40,590
So this is the first part and then the part which takes in the X is this E to the power of negative

20
00:01:40,590 --> 00:01:44,730
half times x minus mu divided by sigma squared.

21
00:01:44,760 --> 00:01:46,200
So basically that's it.

22
00:01:46,200 --> 00:01:49,680
Then we add this first dimension right here.

23
00:01:50,460 --> 00:01:55,890
Then the next thing we do is now to define a function which generates the density map.

24
00:01:55,890 --> 00:01:56,970
So there we go.

25
00:01:56,970 --> 00:02:03,630
We have this get density map, Gaussian function, which takes the image, It takes in all the points

26
00:02:03,630 --> 00:02:09,690
in that image which contain heads or the positions where we have heads.

27
00:02:09,690 --> 00:02:15,360
And then we have this sigma value right here, which is actually the Gaussian radius.

28
00:02:15,370 --> 00:02:17,310
So let's take this off.

29
00:02:17,310 --> 00:02:21,960
We have this as the Gaussian radius set.

30
00:02:21,960 --> 00:02:24,990
It's a default value of to take this off.

31
00:02:25,800 --> 00:02:26,680
That's fine.

32
00:02:26,700 --> 00:02:32,850
Now the role of this Gaussian radius is to determine the number of points which are used in generating

33
00:02:32,850 --> 00:02:39,990
for each of the heads its own local Gaussian map.

34
00:02:40,590 --> 00:02:42,390
Now we take this right here.

35
00:02:42,390 --> 00:02:48,450
We'll see that if we have this pixel, that's let's pick this pixel in the center which contains the

36
00:02:48,450 --> 00:02:48,800
head.

37
00:02:48,810 --> 00:02:53,450
We see that all these different points were used to generate a Gaussian map.

38
00:02:53,460 --> 00:02:59,600
If we increase the Gaussian radius when we have this occupying maybe the whole of this map.

39
00:02:59,610 --> 00:03:03,570
Now, this is a hyper parameter which is used to.

40
00:03:04,380 --> 00:03:09,700
Define how far each Gaussian map for each head extends.

41
00:03:09,720 --> 00:03:15,450
So like in this case, you see that this is a radius like this distance from this point to this.

42
00:03:15,450 --> 00:03:23,820
So this pixel, if you could actually count the number of pixels, would have one, two, three, four,

43
00:03:23,820 --> 00:03:27,900
five, six, seven, eight, nine, ten, 11.

44
00:03:27,900 --> 00:03:29,700
So we'll see that we have 11.

45
00:03:29,700 --> 00:03:33,600
So our Gaussian radius in this case is actually ten, not 11.

46
00:03:33,600 --> 00:03:40,650
So in our gotcha radius in this case is say ten, and that means that this ten points contribute in

47
00:03:40,650 --> 00:03:44,590
generating this Gaussian map for this head.

48
00:03:44,610 --> 00:03:49,500
Now if our Gaussian register is five, it means this patch we have right here is going to be smaller.

49
00:03:49,500 --> 00:03:53,070
So we're going to have just one, two, three, four, five points.

50
00:03:53,070 --> 00:03:56,610
So this blue paths right here will come right to this.

51
00:03:56,610 --> 00:03:59,680
This is going to become smaller than what we have right here.

52
00:03:59,700 --> 00:04:05,040
Now, if you increase this radius to say 20 instead of any year, we see that we're going to extend

53
00:04:05,040 --> 00:04:06,420
right up to somewhere around this.

54
00:04:06,420 --> 00:04:08,090
So we're going to have something like this.

55
00:04:08,100 --> 00:04:10,560
So that's actually the concept of the Gaussian radius.

56
00:04:10,560 --> 00:04:17,130
And it's a hyper parameter which you could actually turn to see whether or how it affects the model.

57
00:04:17,130 --> 00:04:24,390
And also in some cases, you may make this hyper parameter adaptive depending on how well it behaves

58
00:04:24,600 --> 00:04:28,650
or better still, how well it affects the model's predictions.

59
00:04:29,580 --> 00:04:30,570
So that's fine.

60
00:04:30,570 --> 00:04:34,830
We have the width and then the height, which is this.

61
00:04:34,830 --> 00:04:38,610
We have this as a weight and then this is the height of the image.

62
00:04:38,610 --> 00:04:43,590
The number of ground points is basically the length of this points right here.

63
00:04:43,620 --> 00:04:49,140
Now, this points, as we said earlier, is simply all the positions in the image, which is this not

64
00:04:49,140 --> 00:04:54,030
in this all the positions in this image right here which contain the heads.

65
00:04:54,060 --> 00:05:00,690
Now, in order to bring this points into the reference of this density map, we shall divide all these

66
00:05:00,690 --> 00:05:03,380
points by this factor right here.

67
00:05:03,390 --> 00:05:09,060
So in this case, we're going to define divide all these points by eight so that we'll leave from this

68
00:05:09,060 --> 00:05:12,990
refrains to this new, smaller refrains.

69
00:05:13,200 --> 00:05:21,390
We now continue with our Gaussian map generation, and we shall repeat that for each of the points that's

70
00:05:21,390 --> 00:05:23,550
for each of the heads we have in the image.

71
00:05:23,730 --> 00:05:25,260
So that's it.

72
00:05:26,160 --> 00:05:27,840
We see here we have the points.

73
00:05:27,840 --> 00:05:29,940
So we selected or we pick the first point.

74
00:05:29,940 --> 00:05:33,330
For example, we convert this into an integer.

75
00:05:33,360 --> 00:05:40,410
Now we get the x coordinate and the y coordinate of the points, or better still, the h coordinate

76
00:05:40,410 --> 00:05:48,120
and then the W current of the points, because this is the if we have an image like this one right here,

77
00:05:48,120 --> 00:05:53,880
this is the origin, we have the h axis and then we have the width axis.

78
00:05:53,880 --> 00:05:56,260
So this is the height and then this is the width.

79
00:05:56,280 --> 00:06:03,930
Now this point, for example, is gotten based on the distance from this origin to this given height.

80
00:06:03,930 --> 00:06:09,750
And then the distance from this origin to a given width right here to look at this point.

81
00:06:09,810 --> 00:06:15,870
Now, the reason why we have the minimum of the height, the maximum or the height minus one, and then

82
00:06:15,870 --> 00:06:23,940
the width minus one is actually because if this point happens to fall exactly at the last pixel h of

83
00:06:23,940 --> 00:06:26,070
the image or.

84
00:06:27,200 --> 00:06:31,280
Last pixel w of the image.

85
00:06:31,670 --> 00:06:38,180
Then we consider that it's located at a pixel before its actual position.

86
00:06:38,690 --> 00:06:46,490
Now once we have this, we go straight into the generation of Gaussian map using the Gaussian distribution,

87
00:06:46,490 --> 00:06:48,740
which we've defined already, which is this.

88
00:06:48,950 --> 00:06:50,580
Now let's look at this.

89
00:06:50,600 --> 00:06:54,380
Firstly, we have this Gaussian radius, so we have this lean space.

90
00:06:54,410 --> 00:06:56,620
Now let's do something like this.

91
00:06:56,630 --> 00:07:03,370
Let's print out MP dot in space of say minus four and then four.

92
00:07:03,380 --> 00:07:05,050
So we're suppose not a question.

93
00:07:05,210 --> 00:07:07,160
Radius is four.

94
00:07:07,160 --> 00:07:16,130
So in that case we have that and then we have now the Gaussian, or rather we have four times two plus

95
00:07:16,130 --> 00:07:16,730
one.

96
00:07:17,180 --> 00:07:18,410
Let's take this off.

97
00:07:18,800 --> 00:07:19,430
Run this.

98
00:07:19,460 --> 00:07:22,400
You see, we're going from -4 to 4.

99
00:07:23,240 --> 00:07:27,730
And the reason why we have this specify the number of points we shall consider.

100
00:07:27,740 --> 00:07:28,400
You see that?

101
00:07:28,400 --> 00:07:28,610
Yeah.

102
00:07:28,610 --> 00:07:29,810
We actually have nine points.

103
00:07:29,810 --> 00:07:33,220
One, two, three, four, five, six, seven, eight, nine.

104
00:07:33,230 --> 00:07:41,230
Now, without this, we'll have much more points, which we don't actually want to work with.

105
00:07:41,240 --> 00:07:43,310
We want to control the number of points we're working with.

106
00:07:43,310 --> 00:07:47,870
So let's let's have this four times two plus one.

107
00:07:47,870 --> 00:07:50,120
If we modify this, let's take this out, for example.

108
00:07:50,120 --> 00:07:52,400
You see we have now eight points.

109
00:07:52,400 --> 00:07:55,730
And now my plan this see?

110
00:07:58,180 --> 00:07:59,170
That's fine now.

111
00:07:59,980 --> 00:08:01,670
And that's exactly what we do right here.

112
00:08:01,690 --> 00:08:06,720
We're just putting up all those points we're going to use to generate our ocean map.

113
00:08:06,730 --> 00:08:12,610
Now, once this is done, we generate a Gaussian distribution from all these points.

114
00:08:12,610 --> 00:08:15,550
So let's take this, right?

115
00:08:15,550 --> 00:08:16,150
Yeah.

116
00:08:16,540 --> 00:08:24,190
We now say, for example, we have the Gaussian distribution of this run that you see that we have now,

117
00:08:24,190 --> 00:08:26,320
this Gaussian distribution right here.

118
00:08:26,350 --> 00:08:30,610
Notice that towards the center we have the highest values.

119
00:08:31,240 --> 00:08:34,680
We see how we go from this one, two, three, four, five.

120
00:08:34,690 --> 00:08:40,450
It actually picks at this center, that's at the mean and then it starts to drop back again.

121
00:08:40,450 --> 00:08:46,840
And then this is symmetrical because as we had here, we have our mean to be zero and then sigma ten.

122
00:08:46,840 --> 00:08:49,120
So obviously this is going to be symmetrical.

123
00:08:49,120 --> 00:08:59,800
So we look at this, you notice that this is exactly equals this, this exactly equals this, this exactly

124
00:08:59,800 --> 00:09:00,610
equals this.

125
00:09:00,610 --> 00:09:02,740
And then this is actually equals this.

126
00:09:02,890 --> 00:09:08,290
Now, next thing we could do is also to modify the sigma right here.

127
00:09:08,290 --> 00:09:10,720
So we have this, right.

128
00:09:10,720 --> 00:09:11,020
Yeah.

129
00:09:11,140 --> 00:09:14,830
Says sigma equals a let's say three.

130
00:09:14,830 --> 00:09:15,760
We have that.

131
00:09:15,760 --> 00:09:23,350
So we see now that we have this also again, we have this highest value .13, it starts to drop, drop,

132
00:09:23,350 --> 00:09:24,480
drop, drop.

133
00:09:24,490 --> 00:09:31,390
Now, if we increase this values, say we take 40 values for the for the run it again.

134
00:09:31,720 --> 00:09:34,810
You see that these values now become very, very small.

135
00:09:34,810 --> 00:09:36,340
So this is practically zero.

136
00:09:36,340 --> 00:09:40,660
And now if you go to a center like around this, you see okay, yeah.

137
00:09:40,660 --> 00:09:46,720
Like let's find that maximum value, 1.2, three, two.

138
00:09:46,720 --> 00:09:48,010
Yeah, this is it right here.

139
00:09:48,010 --> 00:09:50,230
So this is the center right here.

140
00:09:50,230 --> 00:09:52,990
So we have 1.3, two times ten, a negative one.

141
00:09:52,990 --> 00:09:55,350
That's actually 0.13.

142
00:09:55,360 --> 00:10:00,640
Now, this values which are towards this end right here, you see that there are practically zero.

143
00:10:00,880 --> 00:10:04,360
Now, let's put this out so we have something like this.

144
00:10:04,360 --> 00:10:05,770
Then we have this.

145
00:10:06,620 --> 00:10:06,920
Right?

146
00:10:06,920 --> 00:10:07,460
Yeah.

147
00:10:09,770 --> 00:10:11,880
When sigma is equals three.

148
00:10:11,900 --> 00:10:17,300
Notice how three steps we take the three values close to this peak value.

149
00:10:17,350 --> 00:10:21,010
You see, they are of reasonable magnitude.

150
00:10:21,020 --> 00:10:21,260
Yeah.

151
00:10:21,260 --> 00:10:24,830
We have, for example, this, this and this one.

152
00:10:24,830 --> 00:10:33,440
But as from this, like let's pinpoint this two as from this going downwards and then this going in

153
00:10:33,440 --> 00:10:34,220
this way.

154
00:10:34,250 --> 00:10:38,790
You see that the values become very, very small, up to the point where we get to the zero right here.

155
00:10:38,810 --> 00:10:46,670
Now let's modify the value for sigma to say two and now see how this is also going to make the even

156
00:10:46,670 --> 00:10:49,790
this third value right here become also very small.

157
00:10:50,900 --> 00:10:53,090
So put that to to run it again.

158
00:10:54,850 --> 00:10:56,110
Now let's check this out.

159
00:10:56,140 --> 00:11:00,760
You see that this now goes to practically 0.2.

160
00:11:00,970 --> 00:11:04,120
Now, this is at 0.17.

161
00:11:04,120 --> 00:11:12,420
And then from this, now we have 0.1 to 0.06 and so on and so forth.

162
00:11:12,430 --> 00:11:21,370
So unlike previously where we went up to -40, now we even go up to -88 to show that this draw we had

163
00:11:21,370 --> 00:11:23,080
previously now even goes faster.

164
00:11:23,080 --> 00:11:25,450
So instead of having that, we now have someone like this.

165
00:11:28,440 --> 00:11:29,100
So that's it.

166
00:11:29,130 --> 00:11:30,550
Now, let's take it back to this.

167
00:11:30,570 --> 00:11:37,170
We see, as we had seen previously, if our sigma is somewhere like this, let's say this is sigma or

168
00:11:37,170 --> 00:11:38,690
standard deviation of three.

169
00:11:38,700 --> 00:11:40,590
Now four standard deviation drops to two.

170
00:11:40,590 --> 00:11:45,870
So it means we are on this or rather drops to two.

171
00:11:45,870 --> 00:11:48,930
So it means we're going to have a new SAE.

172
00:11:49,170 --> 00:11:53,700
We're going to have something like this now, which is let's draw it like that.

173
00:11:53,700 --> 00:11:56,220
Okay, So we're going to have something like this now.

174
00:11:58,250 --> 00:12:07,430
So it means that in this case now, only very few neighbors around the mean get to have reasonable values.

175
00:12:07,940 --> 00:12:13,520
And then if we were to modify this to ten, you see that instead of having this kind of curve, we're

176
00:12:13,520 --> 00:12:14,990
going to have something like this now.

177
00:12:14,990 --> 00:12:17,600
So it's going to be something like this.

178
00:12:18,760 --> 00:12:23,230
And this is because in this case, we're extending our standard deviation.

179
00:12:23,230 --> 00:12:24,640
Let's take a value of five.

180
00:12:24,640 --> 00:12:25,750
So we have.

181
00:12:26,020 --> 00:12:27,780
So we match up with those values right here.

182
00:12:27,790 --> 00:12:29,410
So let's say six, for example.

183
00:12:29,410 --> 00:12:31,420
So now our standard deviation is six.

184
00:12:31,420 --> 00:12:36,790
So we see that it's going to be something like this and now this peak value that is the highest value

185
00:12:36,790 --> 00:12:44,080
is going to be reduced compared to the other highest values we had because now many of the values are

186
00:12:44,080 --> 00:12:45,340
shared with the neighbors.

187
00:12:45,850 --> 00:12:47,050
So that's it.

188
00:12:47,080 --> 00:12:53,050
Now, the next thing we'll look at is the fact that the question distribution we're trying to produce

189
00:12:53,080 --> 00:12:58,990
isn't actually a one dimensional Gaussian distribution where we have this input X and then we have this

190
00:12:58,990 --> 00:12:59,740
output.

191
00:12:59,740 --> 00:13:02,530
In this case, we actually have two points.

192
00:13:02,530 --> 00:13:10,900
So, all right, we have a point which takes two values, which we could say H and W, And so in this

193
00:13:10,900 --> 00:13:12,790
case it means we have something like this.

194
00:13:12,940 --> 00:13:13,990
We have.

195
00:13:14,920 --> 00:13:18,250
Instead of just having 1ch we have now H and W.

196
00:13:18,250 --> 00:13:23,680
So if we consider this to be the let's take this to the H axis, So let's do this.

197
00:13:23,680 --> 00:13:29,650
We have this as a H axis and then this as the W axis.

198
00:13:29,770 --> 00:13:36,910
Now in this case, instead of having just some two dimensional plot, Yeah, this is meant to be a three

199
00:13:36,910 --> 00:13:38,020
dimensional plot.

200
00:13:38,020 --> 00:13:42,070
So we're going to have let's take this we're going to have something like this.

201
00:13:47,540 --> 00:13:53,990
And this is such that for every H and W, we have it's probability distribution.

202
00:13:53,990 --> 00:13:59,900
And that is Now why, when you look at the the plot of the density quotient map, you have something

203
00:13:59,900 --> 00:14:05,920
like this, you have this, you have this, you have this, and so on and so forth.

204
00:14:05,930 --> 00:14:10,310
And that's because this is like the X and then the Y, and then we have P of x, y.

205
00:14:10,310 --> 00:14:14,750
So instead of having P of X as we define it, we now have P of x, y.

206
00:14:14,750 --> 00:14:19,220
But now note that we are going to actually approximate this.

207
00:14:21,270 --> 00:14:26,100
Multivariate Gaussian distribution to be just simply p of X.

208
00:14:27,800 --> 00:14:28,630
Times.

209
00:14:28,950 --> 00:14:30,140
PFI.

210
00:14:34,420 --> 00:14:38,860
So we suppose that p of x y is the same as p of x times p, f y.

211
00:14:39,250 --> 00:14:40,270
And that's why I write.

212
00:14:40,270 --> 00:14:47,200
Yeah, we have this non pi the multiplier where we take the x and then we have the Y.

213
00:14:47,230 --> 00:14:55,190
Now to obtain this Y that's supposed to take the H and then that is P of H and then times p of W.

214
00:14:55,210 --> 00:14:59,370
To obtain this, we simply find the transpose of what we got right here.

215
00:14:59,380 --> 00:15:00,820
So that's how we obtain this.

216
00:15:00,820 --> 00:15:03,330
And we obtain this Gaussian map right here.

217
00:15:03,340 --> 00:15:08,290
So unlike previously where we just had a vector of points, now we actually have a matrix.

218
00:15:08,290 --> 00:15:10,840
So let's take this, let's reduce this back to four.

219
00:15:11,780 --> 00:15:13,350
Have this back as far.

220
00:15:13,370 --> 00:15:14,300
Run this again.

221
00:15:14,330 --> 00:15:15,560
See, we have this.

222
00:15:16,790 --> 00:15:18,440
Let's let this to be g.

223
00:15:18,830 --> 00:15:21,590
So we have this as g is equals this.

224
00:15:22,010 --> 00:15:22,790
That's fine.

225
00:15:22,790 --> 00:15:31,310
We now say print out the multiply of g, comma, g transpose.

226
00:15:31,520 --> 00:15:32,420
Run that.

227
00:15:32,420 --> 00:15:33,260
And there we go.

228
00:15:33,260 --> 00:15:35,720
So instead of having this, let's print out a shape.

229
00:15:35,930 --> 00:15:44,600
So instead of having this nine dimensional vector for the Gaussian distribution, now we have this matrix

230
00:15:44,600 --> 00:15:47,240
right here, and soon we shall plot out this matrix.

231
00:15:47,240 --> 00:15:51,440
So you see exactly how it looks like when I moved to the next part.

232
00:15:51,470 --> 00:15:56,650
Now let's suppose we have this Gaussian radius of far right here, just as what we did here.

233
00:15:56,660 --> 00:16:05,840
So this gave us this nine by nine matrix for the Gaussian map, which we calculate right here.

234
00:16:08,150 --> 00:16:15,740
Now, the use of this term is to normalize this Gaussian map, because depending on the number of points

235
00:16:15,740 --> 00:16:18,230
we decide to work with right here.

236
00:16:18,900 --> 00:16:24,610
Women have a situation where the discussion map doesn't even sum up to one.

237
00:16:24,630 --> 00:16:31,800
So what we do is we take the Gaussian map and then divide by the sum of the goods and my values to make

238
00:16:31,800 --> 00:16:35,070
sure this Gaussian map has all those values.

239
00:16:35,070 --> 00:16:36,300
Summing up to one.

240
00:16:36,540 --> 00:16:45,210
Let's take this as an example where instead of having this, we have some so we print out and some run

241
00:16:45,210 --> 00:16:45,330
it.

242
00:16:45,330 --> 00:16:53,850
You see, we don't have exactly one, but if we divide this, that is if we take the sum as this.

243
00:16:55,640 --> 00:16:57,210
Take this from this.

244
00:16:57,230 --> 00:16:59,060
We divide by itself.

245
00:16:59,090 --> 00:17:05,150
Now let's have the emperor multiply, which is the Gucci map itself.

246
00:17:05,240 --> 00:17:06,080
We run it.

247
00:17:06,230 --> 00:17:09,800
And then we have the sum of all this.

248
00:17:09,950 --> 00:17:11,180
Anyway, let's separate this.

249
00:17:11,180 --> 00:17:16,910
So let's suppose we have this Gaussian map, which is equals this.

250
00:17:18,230 --> 00:17:24,260
And then we have this MP that some of the Gaussian map right here.

251
00:17:25,550 --> 00:17:27,380
So we have our Gaussian map.

252
00:17:30,500 --> 00:17:30,980
We now go?

253
00:17:30,980 --> 00:17:34,730
I had to print out the Goshen map.

254
00:17:35,870 --> 00:17:39,140
Divided by the sum of its values.

255
00:17:42,150 --> 00:17:43,320
So there we go.

256
00:17:43,620 --> 00:17:48,750
We run this and then we'll define a normalized quotient map.

257
00:17:48,750 --> 00:17:50,760
So this is actually a normalized

258
00:17:53,070 --> 00:17:57,480
Gaussian map, which is this, and then we print it out.

259
00:17:57,480 --> 00:17:59,040
So we have the print.

260
00:18:00,420 --> 00:18:01,560
Okay, that's fine.

261
00:18:01,560 --> 00:18:09,720
We know that some of this normalized Gaussian map C we have is actually one because we've taken a regression

262
00:18:09,720 --> 00:18:17,430
map and then divide it by the sum of all the normalization map or the sum of all the map values.

263
00:18:17,430 --> 00:18:21,550
So that's what exactly what we do right here to normalize how good map.

264
00:18:21,570 --> 00:18:30,120
Now, once we have this, we are trying to create a patch on the output image on the output map.

265
00:18:30,120 --> 00:18:35,790
So what we're going to do is from this nine by nine matrix, which is this Gaussian map and the case

266
00:18:35,790 --> 00:18:41,460
where we're supposed to Gaussian radiuses for we're going to have nine points, four plus two plus one,

267
00:18:41,460 --> 00:18:41,940
that's nine.

268
00:18:41,940 --> 00:18:42,930
We saw that already.

269
00:18:42,930 --> 00:18:48,210
So we're going to have a nine by nine matrix for the Gaussian map, which we could represent as this

270
00:18:48,210 --> 00:18:54,420
where we have the origin right here, we have nine steps to the right and then nine steps downwards.

271
00:18:54,420 --> 00:19:00,840
So this forms are nine by nine matrix, which is this square right here.

272
00:19:01,500 --> 00:19:05,430
And that's why, as you could see here, we define x left to be zero.

273
00:19:05,700 --> 00:19:10,950
So for the other left position, our x coordinate is at zero.

274
00:19:10,980 --> 00:19:12,090
That's this.

275
00:19:12,900 --> 00:19:17,190
See our x coordinate right here, which is because this is our x axis, this is what we're supposed

276
00:19:17,190 --> 00:19:18,450
to be our x axis.

277
00:19:18,450 --> 00:19:20,850
So this x coordinate right here is zero.

278
00:19:20,850 --> 00:19:28,830
And the left position of this square and then for the X right is the Gaussian map shape one.

279
00:19:28,830 --> 00:19:32,340
Now this question, map shape one is the is nine.

280
00:19:32,340 --> 00:19:39,360
So our X right is nine, which is normal because from moving this way at this point, our this position,

281
00:19:39,360 --> 00:19:44,790
our x coordinate is nine and then we'll do the same for our Y up.

282
00:19:44,790 --> 00:19:50,280
Our y up is actually this because this is the upper part of our square.

283
00:19:50,280 --> 00:19:57,600
So this y coordinate because our y starts from zero and goes down to nine, this y coordinate is zero.

284
00:19:57,600 --> 00:19:59,640
That's why right here we have zero.

285
00:19:59,640 --> 00:20:04,380
And then for our Y down, which is this is actually equals nine.

286
00:20:04,380 --> 00:20:06,540
So that's how we obtain this.

287
00:20:07,530 --> 00:20:13,710
Now supposing the points we've selected is at say, 3624.

288
00:20:13,710 --> 00:20:15,990
So if it goes 36 steps.

289
00:20:15,990 --> 00:20:16,470
Yeah.

290
00:20:16,470 --> 00:20:18,930
So just for go, let's take this.

291
00:20:20,070 --> 00:20:21,060
36.

292
00:20:22,950 --> 00:20:26,190
And then we go downward like this.

293
00:20:27,180 --> 00:20:28,110
24.

294
00:20:28,410 --> 00:20:37,500
So we have the point 3624 we're working with now, if we have this point 3624 now, we'll see exactly

295
00:20:37,500 --> 00:20:41,100
why we need to do all this right here.

296
00:20:42,270 --> 00:20:46,750
And in this case, if we compare this 0.1, point one in this case is 24.

297
00:20:46,770 --> 00:20:53,880
So if we compare this h coordinate as a height coordinate with the Gaussian radius, which happens to

298
00:20:53,880 --> 00:21:01,470
be four if we compare it and we see that this 24 is greater than this, we don't have to get into this.

299
00:21:01,830 --> 00:21:03,180
The same for the 36.

300
00:21:03,180 --> 00:21:06,690
So we compared 36 is not less than four.

301
00:21:06,690 --> 00:21:08,250
So we don't have to get into this.

302
00:21:08,250 --> 00:21:18,660
And then we compare the 24 plus four with the width of the density map.

303
00:21:18,660 --> 00:21:23,980
In this case, it's not greater than W, So we don't have to get into this because we're supposedly

304
00:21:23,980 --> 00:21:35,970
we're having a nine and six by 120, 128 density map 128 where we have the height to be nine six and

305
00:21:35,970 --> 00:21:37,740
then the weight to be 128.

306
00:21:38,790 --> 00:21:44,670
And so as we could see, the 24 plus four is not greater than one and 28.

307
00:21:44,670 --> 00:21:47,160
So we don't have to get into this again.

308
00:21:47,160 --> 00:21:53,820
For this we have the 36 plus four is not greater than 96, so we don't have to get into that.

309
00:21:53,820 --> 00:22:02,340
So all this for now isn't very useful because this patch we have is actually well fitted in our density

310
00:22:02,340 --> 00:22:02,910
map.

311
00:22:03,960 --> 00:22:09,630
And so in that case, if we have this density map, which initially was made of only zeros, as we have

312
00:22:09,630 --> 00:22:17,700
defined initially, as you could see right here, what we do is we take the patch and then we simply

313
00:22:17,700 --> 00:22:23,820
add it up or stamp it on the density map, as we could see right here.

314
00:22:23,820 --> 00:22:30,360
So we take this and then put it up on this density map so that all the values it gets now, the values

315
00:22:30,360 --> 00:22:38,310
we had seen previously and now occupied, that is all the values which correspond to the position with

316
00:22:38,310 --> 00:22:41,070
respect to this point right here, because we have the point.

317
00:22:41,070 --> 00:22:44,940
3624 That's supposing we had the center.

318
00:22:45,760 --> 00:22:46,630
What we do now.

319
00:22:46,670 --> 00:22:47,920
We have the center.

320
00:22:48,160 --> 00:22:49,750
We also have the center.

321
00:22:49,750 --> 00:22:56,770
We now just take this and then feed it such that this center matches up with the center on the density

322
00:22:56,770 --> 00:22:58,000
map right here.

323
00:22:58,330 --> 00:23:07,420
And so to locate this map, this patch on the density map, we have point zero minus the Gaussian radius.

324
00:23:08,900 --> 00:23:11,090
In this case, that happens to be 24.

325
00:23:11,090 --> 00:23:13,670
So we have 24 minus four.

326
00:23:13,670 --> 00:23:21,230
So we find out this position right here up to let's ignore this max of zero comparing zero and this

327
00:23:21,230 --> 00:23:26,120
value for now, because as we have seen, this patch actually fits well in the density map.

328
00:23:26,120 --> 00:23:27,680
So we wouldn't have any problem.

329
00:23:27,680 --> 00:23:30,380
So we ignore the max, we just focusing on this.

330
00:23:30,380 --> 00:23:34,610
So as we've seen, we have 24 minus four, so we add a point 20.

331
00:23:34,610 --> 00:23:38,060
Now we look at this 20 with respect to the height.

332
00:23:38,330 --> 00:23:45,740
So and then up to let's ignore again the minimum and let's focus only on this up to point zero plus

333
00:23:45,740 --> 00:23:47,740
the Gaussian radius plus one.

334
00:23:47,750 --> 00:23:54,620
Now point zero again is 24, 24 plus four plus one is 29.

335
00:23:54,620 --> 00:23:57,530
So we're going from 20 to 29.

336
00:23:59,000 --> 00:24:00,860
That's for the H axis.

337
00:24:00,860 --> 00:24:02,420
So that's how we look at this.

338
00:24:02,420 --> 00:24:09,140
And then for the W axis, we're going from point one minus the Gaussian radius.

339
00:24:09,170 --> 00:24:14,520
Now 0.1 is 36, so we have 36 minus four gives us 32.

340
00:24:14,540 --> 00:24:24,080
So instead of having 36, as we are seeing in the center, we start at 32 and then we go up to 32 plus

341
00:24:24,080 --> 00:24:24,740
nine.

342
00:24:24,770 --> 00:24:28,250
So 32 plus nine should be 41.

343
00:24:28,520 --> 00:24:34,940
So that's how we look at these positions where we're going to take this Gaussian map we had generated

344
00:24:34,940 --> 00:24:38,840
right here and then patch it up on the density map.

345
00:24:39,650 --> 00:24:44,750
So as we've seen, once we look at these positions, all we do is just to simply add it.

346
00:24:44,750 --> 00:24:50,240
As you could see right here, we so we take the density, the Gaussian map and then added it on the

347
00:24:50,240 --> 00:24:55,970
density map, which initially was a value which had values of zero initially.

348
00:24:56,000 --> 00:25:01,430
Now, once we have done this, we simply repeat for all the points and see now that that's how we generate

349
00:25:01,430 --> 00:25:04,880
all other points like this start is a bit bigger.

350
00:25:04,880 --> 00:25:09,890
We have points like this, we have have half points close to this, so we draw them like this.

351
00:25:10,130 --> 00:25:14,120
Now notice that this region is where we have this intersections.

352
00:25:14,120 --> 00:25:20,690
Now we create points with higher values or relatively higher values compared to all of the points where

353
00:25:20,690 --> 00:25:23,450
maybe there's some there's so many spaces.

354
00:25:23,450 --> 00:25:30,440
So this translates to the fact that when are many people around the same region, those values have

355
00:25:30,440 --> 00:25:36,500
higher magnitudes as compared to other regions where the people are actually spaced out.

356
00:25:36,500 --> 00:25:43,220
And once we have this, we will notice the density map that this region is R.P.M. yellow ish as compared

357
00:25:43,220 --> 00:25:44,480
to the other regions.

358
00:25:44,780 --> 00:25:53,180
Now let's suppose excretion where this conditions are verified, that is the edge conditions does supposing

359
00:25:53,180 --> 00:25:57,830
we have this patch but which falls at a point.

360
00:25:57,830 --> 00:26:02,570
For example, let's say let's maintain a 36 but we're following other points.

361
00:26:02,600 --> 00:26:09,260
Let's make this small So we're going to if we maintain 36, then we go right up towards the end.

362
00:26:09,260 --> 00:26:13,130
So if we go to the end, we'll be at say 904.

363
00:26:13,130 --> 00:26:18,980
So suppose we have the point 94, let's have 94.

364
00:26:20,060 --> 00:26:22,550
So we have 36, 94 right here.

365
00:26:22,880 --> 00:26:24,700
So instead of 36, 24.

366
00:26:24,710 --> 00:26:26,780
So see now we have 3694.

367
00:26:26,780 --> 00:26:30,140
In this case, if we get into this, we'll see that everything is okay.

368
00:26:30,140 --> 00:26:36,710
We have our point one, which is 94, which is greater than the Gaussian radius.

369
00:26:36,710 --> 00:26:37,970
So we don't have to get into this.

370
00:26:37,970 --> 00:26:40,160
Our 36 is greater than the radius.

371
00:26:40,160 --> 00:26:41,540
We don't have to get into this.

372
00:26:43,100 --> 00:26:49,940
But then the point one, which is 904 plus the question radius, which is four, is greater than the

373
00:26:49,940 --> 00:26:56,380
width, which is 96, nine is 90, 94 plus four is 98, which is greater than nine and six.

374
00:26:56,390 --> 00:26:57,830
Even in the case where was 92?

375
00:26:57,860 --> 00:27:03,770
We have 92 plus the four will give us 96, which will be equal, as we could notice.

376
00:27:03,770 --> 00:27:05,030
Here is equals.

377
00:27:05,030 --> 00:27:06,740
This was strictly strictly.

378
00:27:06,740 --> 00:27:07,910
This was strictly.

379
00:27:07,910 --> 00:27:09,200
This isn't strictly.

380
00:27:09,200 --> 00:27:12,200
So in this case, we will see that we have to get into this.

381
00:27:12,200 --> 00:27:17,900
And the reason why we get into this is because if we are at a point, say, 94, as we are on this,

382
00:27:17,900 --> 00:27:25,040
that is 694, we add this, it's impossible for us to draw this box where we go four steps below and

383
00:27:25,040 --> 00:27:31,550
then four steps above, like in this case where we had this, we had this one pick zero when four steps

384
00:27:31,550 --> 00:27:36,440
below, when four steps above, four steps to the left, four steps to the right.

385
00:27:36,440 --> 00:27:36,890
Yeah.

386
00:27:36,890 --> 00:27:44,330
We can't move freely like that because we had nine forces left just to step the remaining steps out

387
00:27:44,330 --> 00:27:45,500
of the density map.

388
00:27:45,500 --> 00:27:53,170
And so that's why we need to get into this so that we readjust this wide down position right here.

389
00:27:53,180 --> 00:27:55,790
Now, we made a slight error.

390
00:27:55,820 --> 00:27:57,770
This isn't this way.

391
00:27:58,160 --> 00:28:03,170
This is actually 9436 because.

392
00:28:04,220 --> 00:28:10,850
We decided to fix this, hide this width, and then we walk it in the height direction.

393
00:28:10,850 --> 00:28:17,180
So this is 904 since we have the same sort of height width for a point.

394
00:28:17,180 --> 00:28:18,860
So this is how we look at points.

395
00:28:18,860 --> 00:28:21,020
So yeah, we have nine for 36 instead.

396
00:28:21,020 --> 00:28:25,150
So we'll get back to this to fix this problem right here.

397
00:28:25,160 --> 00:28:31,760
What we do is we define our wide down so that instead of having to go from 0 to 9 and 0 to 9, we're

398
00:28:31,760 --> 00:28:32,330
going to.

399
00:28:34,020 --> 00:28:34,350
Crap.

400
00:28:34,350 --> 00:28:39,480
This I just had ten points so I would go to from 0 to 9 and instead 0 to 9.

401
00:28:39,480 --> 00:28:46,650
Now we instead go from, say, in this case where we have up to nine of four, we go from say, zero

402
00:28:46,650 --> 00:28:55,080
to a value like, say seven such that we now show that going from 0 to 7 and then yeah, from 0 to 9.

403
00:28:55,080 --> 00:28:59,820
So we're going to have a nine by seven matrix now will permit us.

404
00:28:59,820 --> 00:29:09,690
So nine by seven instead of nine by nine will permit us patch this up on the density map without having

405
00:29:09,690 --> 00:29:10,770
any error.

406
00:29:12,000 --> 00:29:16,080
And so to obtain this value of seven, basically that's all we do.

407
00:29:16,080 --> 00:29:25,080
We have the, the shape nine minus the radius plus the 0.94 minus the height, minus one.

408
00:29:26,100 --> 00:29:33,090
So with that, we've seen how to deal with this edge values, values which are around this edges around

409
00:29:33,090 --> 00:29:34,350
those edges.

410
00:29:35,310 --> 00:29:36,420
And all this.

411
00:29:36,450 --> 00:29:43,260
Now, once we're done with this, we also make sure that the minimum height value, because we have

412
00:29:43,260 --> 00:29:48,420
in this density map, the way it's structured, is such that we have the let's call this density map.

413
00:29:48,420 --> 00:30:01,320
DM So we have the DM which takes in Y mean or rather H mean takes an H mean to H max and then w min

414
00:30:01,320 --> 00:30:06,480
to W max so that we could come up with this square as we've seen right here.

415
00:30:06,510 --> 00:30:16,230
Now in some cases we have h mean which is negative or H max which is greater than the height of our

416
00:30:16,230 --> 00:30:16,950
density map.

417
00:30:16,950 --> 00:30:18,450
So that's why we have this year.

418
00:30:18,450 --> 00:30:22,650
Well, we try to take in the case where we have a negative value, we're going to pick the value zero,

419
00:30:22,650 --> 00:30:27,870
and then the case where the value is greater than the density map's height, we're going to pick instead

420
00:30:27,870 --> 00:30:30,630
of density map's height so that we don't go out of the density map.

421
00:30:30,630 --> 00:30:33,810
And it's the same for the width dimension.

422
00:30:34,410 --> 00:30:45,150
Now, after converting some of the edge points or after reducing the edge Gaussian map shapes in order

423
00:30:45,150 --> 00:30:50,070
to fit in the density maps, we now have to re normalize our density map.

424
00:30:50,070 --> 00:30:57,030
So we have this where we take the density map and then divide it by or rather the density map now is

425
00:30:57,030 --> 00:31:06,390
itself divided by the sum of the density map, divided by the length of the points or by the number

426
00:31:06,390 --> 00:31:11,130
of points we have in our data set for this particular density map.

427
00:31:11,130 --> 00:31:17,970
So once we have this now we can return the density map and then we could go ahead and test the generation

428
00:31:17,970 --> 00:31:19,280
of our density maps.

429
00:31:19,290 --> 00:31:20,280
Now let's look at this.

430
00:31:20,280 --> 00:31:24,900
We have the image we're going to work with or the photo for the images.

431
00:31:24,900 --> 00:31:26,460
We have the photo for the maps.

432
00:31:26,460 --> 00:31:28,020
We pick out an image.

433
00:31:28,020 --> 00:31:29,160
Image one.

434
00:31:29,310 --> 00:31:33,420
We have this particular image right here which we've selected.

435
00:31:33,420 --> 00:31:40,470
We use a load image from TensorFlow or image to array from TensorFlow, and now we normalize this image.

436
00:31:41,070 --> 00:31:44,670
We should put in this variable X and then we could show this.

437
00:31:44,670 --> 00:31:48,960
So let's comment this part and then let's take this off.

438
00:31:48,990 --> 00:31:50,970
We need to plot show run that.

439
00:31:51,630 --> 00:31:58,980
Okay, so this is the image in equation C is goes from 0 to 768 in the high dimension.

440
00:31:58,980 --> 00:32:02,490
And then the width dimension goes from 0 to 1024.

441
00:32:02,490 --> 00:32:05,800
We had defined this previously right here.

442
00:32:05,880 --> 00:32:10,140
Now, once we have this, we now go into the map itself.

443
00:32:10,140 --> 00:32:11,640
So let's take this.

444
00:32:12,740 --> 00:32:20,360
And to load the map information, we use sci fi and its load mat function.

445
00:32:20,390 --> 00:32:27,410
Now this load map function is capable of taking this files with extension the map and then extracting

446
00:32:27,410 --> 00:32:28,650
this information from it.

447
00:32:28,730 --> 00:32:33,390
So once we have this, we could print out this map.

448
00:32:33,410 --> 00:32:35,480
So let's print out a map.

449
00:32:36,050 --> 00:32:38,260
For now, again, let's uncomment here.

450
00:32:38,270 --> 00:32:39,470
We'll print out a map.

451
00:32:43,110 --> 00:32:44,160
And that's fine.

452
00:32:44,160 --> 00:32:46,170
So we'll look at those values.

453
00:32:46,830 --> 00:32:51,360
We see that there's actually a dictionary which has several keys and values.

454
00:32:51,360 --> 00:32:54,210
We have the header is value.

455
00:32:55,350 --> 00:33:01,170
We have the platform key and is value created on its value.

456
00:33:01,440 --> 00:33:04,900
Then we now have the information we actually need.

457
00:33:04,920 --> 00:33:10,770
So this is the image info and this is the array one to work with.

458
00:33:10,770 --> 00:33:15,720
So we see that this is actually the exact information we want to work with because we're interested

459
00:33:15,720 --> 00:33:16,560
in this point.

460
00:33:16,560 --> 00:33:20,730
As we've seen here, we just basically extract the points from our.

461
00:33:21,610 --> 00:33:23,580
Mat file, which is this.

462
00:33:23,590 --> 00:33:25,180
So that's why you see it right here.

463
00:33:25,180 --> 00:33:26,440
We specify this.

464
00:33:28,290 --> 00:33:31,380
Image info CBS specified as an image info.

465
00:33:31,380 --> 00:33:32,340
So we get that array.

466
00:33:32,370 --> 00:33:33,270
Now let's plot out.

467
00:33:33,270 --> 00:33:35,720
Let's print out the image info.

468
00:33:35,730 --> 00:33:40,350
So if we print this out, we have matte of image info.

469
00:33:40,350 --> 00:33:42,240
Now run.

470
00:33:42,240 --> 00:33:46,260
That is, you'll notice that we don't have this other parts of our dictionary.

471
00:33:46,260 --> 00:33:46,440
Now.

472
00:33:46,440 --> 00:33:54,800
We only have this again here to obtain the simple array which is made of just the points.

473
00:33:54,810 --> 00:33:57,480
So we simply have this right here.

474
00:33:57,570 --> 00:34:00,210
So we have to pick out this position.

475
00:34:00,570 --> 00:34:07,590
So if we have this see, we now have just this which now contains all our points on which we could pass

476
00:34:07,590 --> 00:34:09,780
into this follow up right here.

477
00:34:10,020 --> 00:34:12,300
Now, that's what we have.

478
00:34:13,510 --> 00:34:18,290
We now need to convert this points into the new dimension.

479
00:34:18,310 --> 00:34:27,490
Recall that the images come as 900 and those right is 678 or 68 by 1024.

480
00:34:27,490 --> 00:34:33,120
So we need to convert this into nine is six by 128.

481
00:34:33,130 --> 00:34:40,020
So for every point to do this conversion, we need to divide, for example, this 32 by a certain factor.

482
00:34:40,030 --> 00:34:45,550
The factor happens to be eight because to live from this to 96, we need to divide by eight and from

483
00:34:45,550 --> 00:34:49,360
1024 to 128, we need divided by eight.

484
00:34:49,360 --> 00:34:54,970
So that factor happens to be eight, and that's exactly what we had to find previously, the subsampling

485
00:34:54,970 --> 00:34:55,660
factor.

486
00:34:55,900 --> 00:34:58,930
So instead of having just the points, we subsample them.

487
00:35:00,830 --> 00:35:02,020
Oh, subsampling factor.

488
00:35:02,030 --> 00:35:02,940
So that's it.

489
00:35:02,960 --> 00:35:09,980
And now we're ready to pass this points into this get density map Goshen function.

490
00:35:10,220 --> 00:35:11,290
So that's it.

491
00:35:11,300 --> 00:35:15,620
We now take this off and then we plot our density map.

492
00:35:15,620 --> 00:35:16,730
So take this.

493
00:35:16,740 --> 00:35:17,570
We have that.

494
00:35:18,200 --> 00:35:21,860
Notice how this initially had values up to 10,022.

495
00:35:21,860 --> 00:35:30,510
But now we have to modify the search that it is restrained from going above 128.

496
00:35:30,530 --> 00:35:32,860
Let's let's test this now.

497
00:35:32,870 --> 00:35:34,010
Run this.

498
00:35:34,950 --> 00:35:40,550
You see, if we take the point where we had okay, let's print out those points instead.

499
00:35:42,440 --> 00:35:44,000
We have points.

500
00:35:44,870 --> 00:35:46,100
Take this off.

501
00:35:48,900 --> 00:35:49,590
That's fine.

502
00:35:49,710 --> 00:35:54,570
So now we see we go up to 119 and so on and so forth.

503
00:35:54,570 --> 00:35:58,710
127 This should be that 10,022 So that's it.

504
00:35:58,740 --> 00:36:06,090
Now, once we have this, we have our image and then we have this to say, God, okay, so let's modify

505
00:36:06,090 --> 00:36:06,870
this now.

506
00:36:07,500 --> 00:36:12,570
Instead of Sigma, we should have the Gaussian radius question radius.

507
00:36:12,870 --> 00:36:13,770
So that's it.

508
00:36:14,550 --> 00:36:16,290
Now let's take off this points.

509
00:36:19,310 --> 00:36:20,060
Running this.

510
00:36:20,060 --> 00:36:27,830
Now we obtain this Gaussian map right here or this density map right here made of this different Gaussian

511
00:36:27,830 --> 00:36:28,580
maps.

512
00:36:28,940 --> 00:36:30,970
As we could see, we have this image.

513
00:36:30,980 --> 00:36:32,930
Notice that this portion where they are no heads.

514
00:36:32,930 --> 00:36:34,400
This is empty.

515
00:36:34,640 --> 00:36:35,480
Then that's it.

516
00:36:35,750 --> 00:36:37,370
We could also test with an image.

517
00:36:37,370 --> 00:36:39,050
We had the slides.

518
00:36:39,050 --> 00:36:43,400
So run that, run this out of put a break.

519
00:36:43,400 --> 00:36:44,870
So let's take this off.

520
00:36:45,650 --> 00:36:46,700
So we have that.

521
00:36:46,700 --> 00:36:48,680
Let's take this off now.

522
00:36:50,120 --> 00:36:51,050
Run again.

523
00:36:51,800 --> 00:36:58,040
And we find so this the image we had with this density map from the slides, we could go ahead and modify

524
00:36:58,040 --> 00:36:59,090
the ghosh and radius.

525
00:36:59,090 --> 00:37:00,890
Let's take a radius of, say, 50.

526
00:37:01,400 --> 00:37:02,000
You see that?

527
00:37:02,000 --> 00:37:02,750
This is what we opt.

528
00:37:02,900 --> 00:37:05,840
Now let's reduce this to 20.

529
00:37:05,840 --> 00:37:08,630
So you see how it changes slightly.

530
00:37:08,660 --> 00:37:20,180
See, reduce this to ten C So that's basically it because for every point now we have less values compared

531
00:37:20,180 --> 00:37:21,980
to when we had, say, 50.

532
00:37:21,980 --> 00:37:26,120
With 50, we have 100 values to represent just one points.

533
00:37:26,120 --> 00:37:28,670
That's why the Gaussian map looks like this.

534
00:37:28,820 --> 00:37:32,540
Now let's put this back to say a value of ten.

535
00:37:32,720 --> 00:37:33,800
So that's it.

536
00:37:33,830 --> 00:37:37,250
Now let's modify this sigma value.

537
00:37:37,460 --> 00:37:38,780
That's the standard deviation.

538
00:37:38,780 --> 00:37:42,920
Let's take the standard deviation to be, for example, to run this.

539
00:37:43,070 --> 00:37:43,850
And there we go.

540
00:37:43,850 --> 00:37:51,380
So we see that we just the standard deviation makes this more circular, since points only points very

541
00:37:51,380 --> 00:37:56,660
close to the actual points have reasonable values.

542
00:37:57,290 --> 00:38:05,330
We then conclude with a data generator which takes in the images, the maps by size sub sampling factor.

543
00:38:05,570 --> 00:38:09,620
Now from this we're basically repeating what we've done already, right?

544
00:38:09,620 --> 00:38:17,120
Yeah, well, we process the image and then we have our values or we append this into the x list.

545
00:38:17,120 --> 00:38:24,890
So basically we have this image which will happen to X, and then we have the density map, which will

546
00:38:24,890 --> 00:38:29,840
also happen to Y, then we convert this to tensor and then that's the output.

547
00:38:29,840 --> 00:38:31,130
So that's it.

548
00:38:31,130 --> 00:38:35,540
We now have the train images which will define the train maps.

549
00:38:35,540 --> 00:38:39,140
Then finally we have our train generator right here.
