1
00:00:00,050 --> 00:00:01,730
Talking about data processing.

2
00:00:01,730 --> 00:00:03,620
This will be broken up into two parts.

3
00:00:03,620 --> 00:00:06,290
The first part will be to normalize our data.

4
00:00:06,320 --> 00:00:07,310
Normalization.

5
00:00:07,310 --> 00:00:11,960
And then the next part will be to carry out data augmentation.

6
00:00:11,960 --> 00:00:15,710
So we'll do data augmentation okay.

7
00:00:15,710 --> 00:00:20,480
So first things first we would um normalize the data.

8
00:00:20,510 --> 00:00:26,660
Now we're going to make use of this mean and standard deviations while carrying out normalization.

9
00:00:26,690 --> 00:00:30,920
Essentially for an image let's say we take an image.

10
00:00:30,920 --> 00:00:37,340
What we're going to do is we will take um, every pixel value subtract from that pixel value, uh,

11
00:00:37,340 --> 00:00:41,240
a mean value, and then divide by the standard deviation value.

12
00:00:41,240 --> 00:00:42,980
So that's what we're going to be doing.

13
00:00:42,980 --> 00:00:49,850
Now it should be noted that this mean values were obtained from the image net data set.

14
00:00:49,850 --> 00:00:59,420
So after the authors of this data set trained on on that or created or built this data set, they came

15
00:00:59,420 --> 00:01:05,330
up with this mean values for the R, G and B channel.

16
00:01:05,330 --> 00:01:12,890
So this is the r um r then g and then B channels.

17
00:01:12,890 --> 00:01:13,550
So that's it.

18
00:01:13,550 --> 00:01:17,990
So we have this value for r, this value for g and this value for b.

19
00:01:18,020 --> 00:01:22,880
We will go ahead and create our function which we'll call preprocess.

20
00:01:22,880 --> 00:01:26,510
So preprocess we have our preprocess function.

21
00:01:26,510 --> 00:01:34,640
And this function takes in the image and or the image path and its corresponding annotation path.

22
00:01:34,640 --> 00:01:35,720
So that's it.

23
00:01:35,720 --> 00:01:38,210
And then because we want to obtain the image.

24
00:01:38,210 --> 00:01:39,890
So we have our image here.

25
00:01:39,890 --> 00:01:45,950
What we're going to do is we are going to make use of um TensorFlow's um read file method.

26
00:01:45,950 --> 00:01:49,760
So we have read file and then we take in the image path.

27
00:01:49,760 --> 00:01:59,150
And then once we finish reading this file we are also going to decode the file so that we obtain um

28
00:01:59,150 --> 00:02:02,060
an output image which we could manipulate.

29
00:02:02,060 --> 00:02:08,360
So we make use of decode um jpeg method that's after reading a file.

30
00:02:08,360 --> 00:02:13,460
And then once we obtain the image we then go ahead and normalize it.

31
00:02:13,460 --> 00:02:19,670
So we have image minus the mean as we had seen already divided by the standard deviation.

32
00:02:19,670 --> 00:02:24,020
Now we are going to do something similar with the annotation.

33
00:02:24,020 --> 00:02:27,530
So we will copy this and then paste out here.

34
00:02:27,530 --> 00:02:32,960
Essentially here we have annotation annotation.

35
00:02:34,430 --> 00:02:35,240
There we go.

36
00:02:35,240 --> 00:02:36,500
We have annotation.

37
00:02:36,500 --> 00:02:39,830
And then here we have annotation path.

38
00:02:39,830 --> 00:02:45,980
Remember um the way we created our data set was such that we have the path for the image and then the

39
00:02:45,980 --> 00:02:47,630
path for the annotation.

40
00:02:47,630 --> 00:02:48,980
So that's it.

41
00:02:48,980 --> 00:02:50,930
Let's get back to our function.

42
00:02:50,930 --> 00:02:56,570
And then right here we are going to uh before we continue let's make sure we cast this.

43
00:02:56,570 --> 00:02:58,580
So we have our image.

44
00:02:58,580 --> 00:03:00,680
We'll cast this into a float.

45
00:03:00,680 --> 00:03:04,550
So we have image um float 32.

46
00:03:04,550 --> 00:03:08,000
And then we will do the same for the annotation.

47
00:03:08,090 --> 00:03:10,520
Here we have annotation.

48
00:03:11,240 --> 00:03:19,700
Um, we cast it we have annotation and cast it to float 32 and that's it.

49
00:03:19,700 --> 00:03:24,650
So we simply return image and its corresponding annotation.

50
00:03:24,650 --> 00:03:30,980
So now we living from the paths to the images and the masks.

51
00:03:30,980 --> 00:03:35,450
Let's now create our data set which takes um into consideration this function.

52
00:03:35,450 --> 00:03:41,930
So we have our Prep train data set which essentially takes in our train data set, shuffles the data

53
00:03:41,930 --> 00:03:44,120
and then carries out this mapping.

54
00:03:44,120 --> 00:03:50,900
So for every element we had in this previous train data set, what we are going to do is we are going

55
00:03:50,900 --> 00:03:54,620
to pre-process it and we obtain the output images.

56
00:03:54,680 --> 00:04:02,840
Let's run this two cells and then now we'll do for eye or we get an error mean not defined.

57
00:04:02,840 --> 00:04:06,050
Um let's get back here and then simply define this.

58
00:04:06,050 --> 00:04:10,850
So take this off run that again and define that.

59
00:04:10,850 --> 00:04:11,780
So that's it.

60
00:04:11,780 --> 00:04:13,670
We should should be working.

61
00:04:13,670 --> 00:04:20,240
Well we're getting an error again we are told expected the unsigned int eight pass to parameter y of

62
00:04:20,240 --> 00:04:21,110
op shop.

63
00:04:21,380 --> 00:04:24,980
Um but instead got this um of type list instead.

64
00:04:24,980 --> 00:04:32,090
Um error expected uh unsigned int but got 123 .675 of type float.

65
00:04:32,090 --> 00:04:33,320
So okay.

66
00:04:33,320 --> 00:04:39,080
Getting back here, we noticed that we were supposed to do this after the casting, not before the casting.

67
00:04:39,080 --> 00:04:41,570
So running this now should be fine.

68
00:04:42,410 --> 00:04:43,040
That's it.

69
00:04:43,040 --> 00:04:50,690
And uh, for eye in prep, um, let's say train prep, train data set.

70
00:04:50,960 --> 00:04:54,980
Let's take a single element and let's print this out.

71
00:04:54,980 --> 00:04:59,390
So well let's say I j so let's print out I.

72
00:04:59,740 --> 00:05:02,050
And gee, there we go.

73
00:05:02,050 --> 00:05:07,270
As you could see, we have the image C 825 by five, 50 by three.

74
00:05:07,270 --> 00:05:08,260
So that's our image.

75
00:05:08,260 --> 00:05:15,670
And then we also have the corresponding mask 825 by 550 by one.

76
00:05:15,670 --> 00:05:21,310
Now we want to have um this max to be 825 by 550.

77
00:05:21,310 --> 00:05:25,690
So we want to take off this, um, last, um, dimension here.

78
00:05:25,690 --> 00:05:28,840
So let's get back and then we squeeze that out.

79
00:05:28,840 --> 00:05:33,280
We're going to have um, after this we have annotation.

80
00:05:33,280 --> 00:05:34,450
I'll just put this in here.

81
00:05:34,450 --> 00:05:36,790
So we have TensorFlow squeeze.

82
00:05:36,790 --> 00:05:39,880
Let's take that off one one take off that last dimension.

83
00:05:39,880 --> 00:05:43,150
So we'll specify the axis and that should be fine.

84
00:05:43,150 --> 00:05:46,540
Let's take this off and run this again.

85
00:05:47,050 --> 00:05:49,510
Or we could just check out the shape simply.

86
00:05:49,510 --> 00:05:52,870
So let's print out the shape and print out the shape.

87
00:05:53,560 --> 00:05:54,460
That's fine.

88
00:05:54,460 --> 00:05:58,420
We could see now that we have oh let's get back up.

89
00:05:58,420 --> 00:06:05,440
We can see now that we have this 825 by five, 50 by three and 825 by 550.

90
00:06:05,470 --> 00:06:10,840
We will delve into the data augmentation part where we'll make use of Albumentations.

91
00:06:10,840 --> 00:06:21,940
So first thing we'll create our org album and method org album ent um org album ent.

92
00:06:21,940 --> 00:06:30,610
And then obviously it takes in the image and the corresponding mask and then we simply get our or obtain

93
00:06:30,610 --> 00:06:32,470
our augmented image.

94
00:06:32,470 --> 00:06:34,690
So there we go.

95
00:06:34,690 --> 00:06:37,840
We have this transform which we are going to define shortly.

96
00:06:37,840 --> 00:06:41,590
But for now we, we have this transform which takes in an image.

97
00:06:41,590 --> 00:06:45,160
So we have the image and then the mask.

98
00:06:45,910 --> 00:06:46,990
Mask.

99
00:06:46,990 --> 00:06:47,590
Okay.

100
00:06:47,590 --> 00:06:48,790
So that's it then.

101
00:06:48,790 --> 00:06:55,450
Now what we're going to return is going to simply be our um, augmented image, which is going to be

102
00:06:55,450 --> 00:06:57,130
converted into a tensor.

103
00:06:57,130 --> 00:07:02,950
So here we have TensorFlow convert to tensor.

104
00:07:03,430 --> 00:07:07,270
And then this takes in the augmented um output.

105
00:07:07,270 --> 00:07:13,480
But remember that this augmented output is made of the image and the corresponding mask.

106
00:07:13,480 --> 00:07:21,790
To understand why albumentations needs to take into consideration both the input image and its corresponding

107
00:07:21,790 --> 00:07:28,270
mask, we could, um, consider this figure or this image and his mask, which we had already drawn

108
00:07:28,270 --> 00:07:28,960
on the board.

109
00:07:28,960 --> 00:07:32,620
So here let's suppose that we want to flip this.

110
00:07:32,620 --> 00:07:37,150
So let's flip this, um, horizontally.

111
00:07:37,150 --> 00:07:38,380
We flip this horizontally.

112
00:07:38,380 --> 00:07:42,910
Let's make sure it takes back, um, exact same shape and put this out here.

113
00:07:42,910 --> 00:07:51,280
You would find that if you only modify the image and not the mask, then you already have an erroneous

114
00:07:51,280 --> 00:07:52,180
data set.

115
00:07:52,180 --> 00:07:53,980
So let's get back here.

116
00:07:53,980 --> 00:07:56,740
And then we also have to flip this tool.

117
00:07:57,040 --> 00:07:58,000
Let's flip this.

118
00:07:58,000 --> 00:08:04,600
And then you see now that we have this um data point which is exactly what we want.

119
00:08:04,600 --> 00:08:12,640
And so that said, getting back to the code with, um, albumentations, all you need to do is to pass

120
00:08:12,640 --> 00:08:16,870
in the image and the mask, and then it takes care of all the rest.

121
00:08:16,870 --> 00:08:22,720
So you don't need to write any extra code to, uh, maybe say when you flip, whenever you flip the

122
00:08:22,720 --> 00:08:24,670
image, you also need to flip the mask.

123
00:08:24,670 --> 00:08:27,310
Albumentations does that automatically for you.

124
00:08:27,310 --> 00:08:29,830
And here we have the image.

125
00:08:29,830 --> 00:08:32,980
And then um, we specify the data type.

126
00:08:32,980 --> 00:08:38,230
So here we have data type equal TensorFlow Float32.

127
00:08:38,260 --> 00:08:39,880
So our data type is Float32.

128
00:08:39,880 --> 00:08:48,160
And then we also you're going to return the because we we we returned in both the image and the and

129
00:08:48,160 --> 00:08:48,610
the mask.

130
00:08:48,610 --> 00:08:53,500
So we have convert to or let's let's just copy anyway.

131
00:08:53,500 --> 00:08:55,720
Let's just type that out convert to tensor.

132
00:08:55,720 --> 00:08:58,240
And then we have our augmented.

133
00:08:58,240 --> 00:09:01,690
And then we specify that we want to take pick up the mask.

134
00:09:01,690 --> 00:09:03,040
So we pick up the mask.

135
00:09:03,040 --> 00:09:07,480
And then we specify a data type to be um float 32.

136
00:09:07,960 --> 00:09:08,530
That's it.

137
00:09:08,530 --> 00:09:12,640
So now we have our our argument method.

138
00:09:12,640 --> 00:09:16,600
We could go ahead and define our transforms.

139
00:09:16,600 --> 00:09:19,180
That's our Albumentations transform.

140
00:09:19,180 --> 00:09:30,910
Albumentations is a Python library which permits developers or AI researchers easily um, include augmentation

141
00:09:30,910 --> 00:09:33,730
in their computer vision, um, solutions.

142
00:09:33,730 --> 00:09:36,190
So let's get back here.

143
00:09:36,190 --> 00:09:38,740
And then we simply paste this out.

144
00:09:39,160 --> 00:09:40,000
There we go.

145
00:09:40,000 --> 00:09:41,590
We have this different transforms.

146
00:09:41,590 --> 00:09:43,480
We have the transform for the training.

147
00:09:43,480 --> 00:09:46,090
And then we have the transform for the validation.

148
00:09:46,420 --> 00:09:49,150
Um, with the validation we're not going to do any transforms.

149
00:09:49,150 --> 00:09:54,070
But for the training we have this random crop, uh, we specify the height and the width, which is

150
00:09:54,070 --> 00:09:59,230
825 by 550, uh, with a probability of one, meaning that we are always going to have a random.

151
00:09:59,460 --> 00:09:59,850
Up.

152
00:10:00,270 --> 00:10:02,700
Um, we have the horizontal flip.

153
00:10:02,700 --> 00:10:06,240
We have the vertical flip with a probability of 0.3.

154
00:10:06,240 --> 00:10:12,870
Random rotate by 90 degrees, transpose sharpening random shadow, which are going to add on the image.

155
00:10:13,230 --> 00:10:17,370
Um, and then we have this random brightness and contrast.

156
00:10:17,370 --> 00:10:18,210
So that's it.

157
00:10:18,210 --> 00:10:22,860
And then obviously for the validation as we've seen already it's just the resize.

158
00:10:22,860 --> 00:10:23,730
So that's it.

159
00:10:23,730 --> 00:10:26,220
And we now run that.

160
00:10:26,220 --> 00:10:31,980
And then we have our method right here which we've just defined.

161
00:10:31,980 --> 00:10:34,050
We told it is not defined.

162
00:10:34,050 --> 00:10:35,190
We need to define that.

163
00:10:35,190 --> 00:10:38,280
So we'll simply have um let's just create that here.

164
00:10:38,280 --> 00:10:42,300
We simply have the height and then the weight.

165
00:10:42,630 --> 00:10:45,060
Um, which is not going to be 825 by 550.

166
00:10:45,060 --> 00:10:47,940
So it's going to be 512 by 512.

167
00:10:47,940 --> 00:10:53,280
And this is because the model we shall be working with will take this, um, these kinds of inputs.

168
00:10:53,280 --> 00:10:58,860
So this what this means here is simply that we are always going to take in our input.

169
00:10:58,890 --> 00:11:03,840
825 by 550 image and then randomly crop parts of it to obtain.

170
00:11:03,840 --> 00:11:08,850
Then um, the image which we are going to train our, the, our model on.

171
00:11:08,850 --> 00:11:15,780
So that's why you have the probability of one, because we want we we don't or we always want to randomly

172
00:11:15,780 --> 00:11:17,430
crop out parts of our image.

173
00:11:17,430 --> 00:11:23,640
And then because we are always going to randomly crop parts of our image, we um, we don't need to

174
00:11:23,640 --> 00:11:27,750
resize because it's already 512 by 512.

175
00:11:27,750 --> 00:11:35,160
Now, if you take this or if you change this, let's say to 0.3, let's say, um, there's a probability

176
00:11:35,160 --> 00:11:36,930
that sometimes it's not going to be randomly cropped.

177
00:11:36,930 --> 00:11:39,570
Then in that case you need to resize.

178
00:11:39,570 --> 00:11:40,980
So let's take this back.

179
00:11:40,980 --> 00:11:44,700
We are always going to randomly crop and that should be fine.

180
00:11:44,700 --> 00:11:49,980
So let's run um this cell and then the next cell and that's it.

181
00:11:49,980 --> 00:11:54,720
So we now um gotten back to our argument method.

182
00:11:54,720 --> 00:12:00,030
And then the next step will be to um, create our new data set.

183
00:12:00,030 --> 00:12:06,660
So as we have seen already from here, we have this um, preprocess uh, pre-processing data set.

184
00:12:07,110 --> 00:12:11,280
Um, that's after we've normalized from normalizing the data.

185
00:12:11,280 --> 00:12:15,000
And then we now move on to our augmented data set.

186
00:12:15,000 --> 00:12:20,580
So this augmented data set, before we move on we are going to repeat this for the validation.

187
00:12:20,970 --> 00:12:25,800
Here we have val arg argument val arg argument.

188
00:12:25,800 --> 00:12:33,240
And then this takes instead the val transform instead of the transform as in the case of our train or

189
00:12:33,240 --> 00:12:35,100
of our arg argument.

190
00:12:35,100 --> 00:12:36,000
So that's it.

191
00:12:36,000 --> 00:12:39,510
And then once we get this, we run the cell.

192
00:12:39,510 --> 00:12:44,610
Let's go ahead and try to create our train and validation data sets.

193
00:12:45,060 --> 00:12:49,110
Um, you see we get in this error image must be a numpy array type.

194
00:12:49,110 --> 00:12:59,970
Now that said, we need to create some other method in which we are going to specify that this or this

195
00:12:59,970 --> 00:13:01,080
other methods here.

196
00:13:01,080 --> 00:13:08,850
That is, argument methods and the val argument methods contain numpy operations.

197
00:13:08,850 --> 00:13:16,830
Remember here we have this transform which is um essentially made up of this different, um albumentations

198
00:13:16,830 --> 00:13:17,790
transforms.

199
00:13:17,790 --> 00:13:24,750
And this obviously is done with numpy operations or known TensorFlow operations.

200
00:13:24,750 --> 00:13:34,530
And so we need to make use of the TensorFlow's numpy function method to help us work with this numpy

201
00:13:34,530 --> 00:13:37,200
functions, or with this numpy operations.

202
00:13:37,200 --> 00:13:44,310
So that said we're going to define or we define some other pre-processing or augment method.

203
00:13:44,670 --> 00:13:49,140
Uh it's actually going to be augment or let's call it the augment.

204
00:13:49,140 --> 00:13:53,220
And then here we have image and then we have its corresponding mask.

205
00:13:53,220 --> 00:14:01,710
Then in here we are going to get the augmented output or let's say yeah let's let's take the augmented

206
00:14:01,710 --> 00:14:02,520
output.

207
00:14:02,520 --> 00:14:06,930
Augmented output is simply going to be the same thing we had here already.

208
00:14:06,930 --> 00:14:10,800
So uh, we just define a numpy function.

209
00:14:11,220 --> 00:14:14,610
Um, and then in here we have the function and we give its name.

210
00:14:14,610 --> 00:14:17,370
So arg arguments in this case.

211
00:14:17,370 --> 00:14:22,890
And then we have the inputs which in this case is simply the image and the mask.

212
00:14:22,890 --> 00:14:28,770
And then we have the output the type of the tensor of the output tensors.

213
00:14:28,770 --> 00:14:31,980
In this case it's um float 32.

214
00:14:32,010 --> 00:14:38,550
So all we need to do here is just specify float 32 and then here float 32.

215
00:14:38,550 --> 00:14:42,660
Because we are obviously have the input image and the mask.

216
00:14:42,660 --> 00:14:43,560
There we go.

217
00:14:43,560 --> 00:14:46,470
So at this point we have the output.

218
00:14:46,500 --> 00:14:48,540
Now what we're going to return.

219
00:14:48,540 --> 00:14:58,170
What we're going to return here is going to be the ARG output um zero and arg output.

220
00:14:59,400 --> 00:14:59,970
One.

221
00:14:59,970 --> 00:15:01,530
So this is the image and the mask.

222
00:15:01,530 --> 00:15:08,820
But because we are going to be using, um, the former method from hugging face, we have to know exactly

223
00:15:08,820 --> 00:15:16,920
the, the way or the form in which, um, the former method, or rather the former model on hugging

224
00:15:16,920 --> 00:15:20,730
face, um, receives its inputs.

225
00:15:20,730 --> 00:15:27,660
So based on this, we are going to be able to know exactly how we are going to generate our outputs.

226
00:15:27,660 --> 00:15:29,970
That's our data set outputs.

227
00:15:30,210 --> 00:15:35,100
So in this case here you see it takes in this pixel values pixel values.

228
00:15:35,100 --> 00:15:39,660
And take note of the shape batch by number of channels by height by width.

229
00:15:39,660 --> 00:15:42,540
Now all this uh is optional.

230
00:15:42,540 --> 00:15:46,710
And then we have the labels where again we have the batch by height by width.

231
00:15:46,710 --> 00:15:49,800
Now if you remember, let's get back here.

232
00:15:49,800 --> 00:15:53,190
If you could remember, um, get back to the code.

233
00:15:53,190 --> 00:15:53,580
Okay.

234
00:15:53,580 --> 00:15:59,880
So as we were saying, if you remember, um, back here, we carry out the squeezing.

235
00:15:59,880 --> 00:16:06,840
Now, the reason why we actually did this was because we do not we do not want to work with a 25 by

236
00:16:06,840 --> 00:16:14,820
five, 50 by one since, um, this former model takes in, um, inputs of shape, um, height by width.

237
00:16:14,820 --> 00:16:18,000
So that's the reason why we had that.

238
00:16:18,000 --> 00:16:23,550
And so getting back here, we have um, our outputs.

239
00:16:23,550 --> 00:16:30,360
And then because we, we know that we have this dictionary that we need to pass in, what we could do

240
00:16:30,360 --> 00:16:35,130
is we could simply create a dictionary and then specify the name.

241
00:16:35,130 --> 00:16:39,360
So we have pixel values as we had in the documentation.

242
00:16:39,360 --> 00:16:40,830
So pixel values.

243
00:16:40,830 --> 00:16:43,380
And then here we have labels.

244
00:16:43,380 --> 00:16:47,670
So we have pixel values and then the corresponding labels.

245
00:16:47,670 --> 00:16:48,930
So that's it.

246
00:16:49,320 --> 00:16:50,190
There we go.

247
00:16:50,190 --> 00:16:52,230
We have our dictionary.

248
00:16:52,230 --> 00:16:54,930
This should be instead of column.

249
00:16:54,990 --> 00:16:55,920
There we go.

250
00:16:55,920 --> 00:17:04,740
Now also remember uh as we've just seen in the documentation, it's batch by number of channels by height

251
00:17:04,740 --> 00:17:05,310
by width.

252
00:17:05,310 --> 00:17:10,620
But so far we've been we've been outputting batch by height, by width by number of channels.

253
00:17:10,620 --> 00:17:12,960
So we need to transpose this.

254
00:17:12,960 --> 00:17:16,680
That said we simply make use of TensorFlow transpose.

255
00:17:16,680 --> 00:17:18,450
So we have transpose.

256
00:17:18,450 --> 00:17:23,070
And then here we are going to um change this up.

257
00:17:23,070 --> 00:17:26,670
So we go from our initial that's this.

258
00:17:26,940 --> 00:17:27,630
Um.

259
00:17:28,890 --> 00:17:32,730
Height by width by number of channels to channels by height by width.

260
00:17:32,730 --> 00:17:36,030
By simply making use of the transpose method as we've seen.

261
00:17:36,030 --> 00:17:43,290
Now, if this is zero and this is one, then this is two and then this is three.

262
00:17:43,290 --> 00:17:45,570
Then here this is let's give the space.

263
00:17:45,570 --> 00:17:47,070
This is zero.

264
00:17:47,400 --> 00:17:50,760
This is one, this is two and this is three.

265
00:17:50,760 --> 00:17:58,440
So here we are going to specify that we are going we are going to have 201.

266
00:17:58,440 --> 00:18:00,660
And we'll explain why we have 201.

267
00:18:00,660 --> 00:18:02,940
So let's close this up here.

268
00:18:02,940 --> 00:18:03,960
There we go okay.

269
00:18:03,960 --> 00:18:10,920
So the reason why we're having 201 is because initially we have batch by height by width by number of

270
00:18:10,920 --> 00:18:11,730
channels.

271
00:18:11,730 --> 00:18:19,140
And since we want to change this into batch by number of channels, by height by width, we want to

272
00:18:19,140 --> 00:18:28,560
make sure that this number of channels or this, um, height goes from this position to the, this other

273
00:18:28,560 --> 00:18:30,390
position that it goes from 1 to 2.

274
00:18:30,390 --> 00:18:33,120
Actually, this doesn't have to take into consideration the batch.

275
00:18:33,120 --> 00:18:35,940
So let's take off the batch and redo this again.

276
00:18:35,940 --> 00:18:42,510
So let's take off the batch 012012 and then 012.

277
00:18:42,630 --> 00:18:45,780
Okay let's take off the batch and redo it again okay.

278
00:18:45,780 --> 00:18:50,580
So as we're saying we're going this height goes from position zero to position one.

279
00:18:50,580 --> 00:18:54,180
And then uh width goes from position one to position two.

280
00:18:54,180 --> 00:18:57,360
And the number of channels goes from position two to position zero.

281
00:18:57,360 --> 00:19:05,250
So what we have at the zero position here is what was or is what we had previously in the at the second

282
00:19:05,250 --> 00:19:05,790
position.

283
00:19:05,790 --> 00:19:12,210
Maybe we should um, change this and put below so that it makes more sense because we're going from

284
00:19:12,210 --> 00:19:14,610
what's above to what's below.

285
00:19:14,610 --> 00:19:18,270
So we're going from this to this other one okay.

286
00:19:18,270 --> 00:19:19,200
So that's it.

287
00:19:19,200 --> 00:19:27,540
So as we're saying we, we, we have height that previously the or now what we have as channel.

288
00:19:27,540 --> 00:19:33,390
What we have as channel was previously um at position two, what we have as height was previously at

289
00:19:33,390 --> 00:19:34,530
position zero.

290
00:19:34,950 --> 00:19:38,040
What we have as width was previously at position one.

291
00:19:38,040 --> 00:19:41,790
So that's why you have 201 obeying that order.

292
00:19:41,790 --> 00:19:45,690
And then we have the same output or the same level.

293
00:19:45,690 --> 00:19:46,530
Then that's it.

294
00:19:46,530 --> 00:19:51,840
So we just simply create our validation augment method tool.

295
00:19:51,840 --> 00:19:56,430
So we have validation augment val augment.

296
00:19:56,430 --> 00:20:03,180
And then we have here val arg or argument instead.

297
00:20:03,180 --> 00:20:08,250
So that's val augment that's val argument and everything looks fine.

298
00:20:08,250 --> 00:20:10,140
Let's run this again.

299
00:20:10,140 --> 00:20:16,860
And then instead of this uh, instead of having this argument now we have augment.

300
00:20:16,860 --> 00:20:20,580
So we yeah we have augment augment.

301
00:20:20,580 --> 00:20:25,590
And then here we have val augment val augment.

302
00:20:25,590 --> 00:20:26,370
There we go.

303
00:20:26,370 --> 00:20:28,980
So we take this off and we run that.

304
00:20:28,980 --> 00:20:30,840
Let's check out what we get.

305
00:20:30,840 --> 00:20:33,930
Um in the output there's our let's check out our data set.

306
00:20:33,930 --> 00:20:43,170
So for I in train data set let's take a single value print out I and see what we get.

307
00:20:43,740 --> 00:20:45,990
See here we should have okay.

308
00:20:45,990 --> 00:20:48,420
So we see we have our inputs.

309
00:20:48,840 --> 00:20:50,070
Scroll to the top.

310
00:20:50,070 --> 00:20:51,450
Let's get back okay.

311
00:20:51,450 --> 00:20:57,510
So we have here batch see by number of channels by height by width.

312
00:20:57,510 --> 00:20:59,850
And then our values have been normalized.

313
00:20:59,850 --> 00:21:00,660
So that's it.

314
00:21:00,660 --> 00:21:01,650
Which makes sense.

315
00:21:02,220 --> 00:21:06,930
Um scrolling down again you see now we have scroll it back here.

316
00:21:06,930 --> 00:21:08,580
Here we have our labels.

317
00:21:09,060 --> 00:21:10,890
We have our labels.

318
00:21:10,890 --> 00:21:16,860
Um, here we have our batch by 512 by 512.

319
00:21:16,860 --> 00:21:17,670
So that's it.

320
00:21:17,670 --> 00:21:21,000
So we have the image and the corresponding labels.

321
00:21:21,390 --> 00:21:23,100
And that looks fine.

322
00:21:23,100 --> 00:21:24,930
Now the batch is set to 32.

323
00:21:24,960 --> 00:21:29,160
So it makes sense that we have 32 different elements when we um run this.
