1
00:00:02,000 --> 00:00:07,000
You know everyone in this video tutorial, we will see how we can use YOLO V8 for crack detection and

2
00:00:07,000 --> 00:00:09,000
segmentation.

3
00:00:09,000 --> 00:00:14,000
So for this project I will be using the crack dataset which is available publicly on roboflow.

4
00:00:14,000 --> 00:00:22,000
So you can see here the dataset consists of around 1551 images and we have only one class in this dataset

5
00:00:22,000 --> 00:00:29,000
which is of crack and we don't need to go into the model health check because we don't have multi classes

6
00:00:29,000 --> 00:00:30,000
in this dataset.

7
00:00:30,000 --> 00:00:34,000
We have only one class and it consist of good number of images as well.

8
00:00:34,000 --> 00:00:38,000
So we usually do the model health check when we have multi classes.

9
00:00:38,000 --> 00:00:41,000
So we check that either our dataset is balanced or not.

10
00:00:41,000 --> 00:00:47,000
Okay, so this is the crack dataset and here is the overview how our results will look like.

11
00:00:47,000 --> 00:00:53,000
So you can see that this is the sample output image when so you can see that when the crack is detected,

12
00:00:53,000 --> 00:00:59,000
the model is able to create a bounding box around the detected crack.

13
00:00:59,000 --> 00:01:03,000
And as well as we are doing the segmentation on the crack as well, like you can see this red line.

14
00:01:03,000 --> 00:01:08,000
So we are able to do the segmentation of the crack as well.

15
00:01:08,000 --> 00:01:12,000
And here we have the label crack and here we have the confidence score.

16
00:01:12,000 --> 00:01:16,000
Like how how much the model is confident that this is a crack.

17
00:01:16,000 --> 00:01:20,000
So this is the confidence score 0.8, which represents 80%.

18
00:01:20,000 --> 00:01:24,000
The model is confident and here we have the label crack, okay?

19
00:01:24,000 --> 00:01:27,000
And here we have the bounding box around the crack.

20
00:01:27,000 --> 00:01:31,000
And here you can see that we are doing the segmentation on the crack as well.

21
00:01:31,000 --> 00:01:33,000
So let's move towards the code part.

22
00:01:33,000 --> 00:01:39,000
So in the first step, I'm importing all the required libraries that are necessary to run this project.

23
00:01:39,000 --> 00:01:43,000
So in the first step you can see that I am importing the library.

24
00:01:43,000 --> 00:01:50,000
So library, basically we are using library to create a helper variable which allows us to navigate

25
00:01:50,000 --> 00:01:51,000
between different file paths.

26
00:01:51,000 --> 00:01:58,000
Like if I want to access the files in my training folder or if I want to go through the data dot yml

27
00:01:58,000 --> 00:01:58,000
file.

28
00:01:58,000 --> 00:02:01,000
So there I will start import library.

29
00:02:01,000 --> 00:02:08,000
Then we have the import glob library import Glob library is used when we want to display the input and

30
00:02:08,000 --> 00:02:11,000
output images and glob library.

31
00:02:11,000 --> 00:02:15,000
Also return all file paths that basically match a specific pattern.

32
00:02:15,000 --> 00:02:15,000
Okay.

33
00:02:15,000 --> 00:02:20,000
Then we have the from ipython dot display import image display library.

34
00:02:20,000 --> 00:02:25,000
So when we just want to display our input or output image into the Google CoLab notebook, then we require

35
00:02:25,000 --> 00:02:27,000
the image and display library.

36
00:02:28,000 --> 00:02:30,000
So let's run all these cells as well.

37
00:02:30,000 --> 00:02:34,000
So first we need to make sure that we have access to a GPU or not.

38
00:02:34,000 --> 00:02:40,000
So before running the script, please make sure that you have access to GPU so you can go to runtime

39
00:02:40,000 --> 00:02:48,000
and click on change runtime and select the runtime is GPU, so that basically in GPU will help us to

40
00:02:48,000 --> 00:02:54,000
do the training and processing becomes very faster while in CPU, that training takes a lot of time,

41
00:02:54,000 --> 00:03:00,000
so we usually prefer, as you Google CoLab provides free GPU, so it's always better to use the GPU

42
00:03:00,000 --> 00:03:04,000
to train your model and to do the predictions as well.

43
00:03:04,000 --> 00:03:05,000
Okay.

44
00:03:05,000 --> 00:03:11,000
So in to check whether we have access to GPU or not, just run this cell so you can see that we are

45
00:03:11,000 --> 00:03:14,000
currently using the GPU memory usage.

46
00:03:14,000 --> 00:03:17,000
And then here I'm defining my my own variable.

47
00:03:17,000 --> 00:03:23,000
You can see that or you can say that I'm defining the current directory as content.

48
00:03:23,000 --> 00:03:26,000
So YOLO V8 can be implemented in two ways.

49
00:03:26,000 --> 00:03:29,000
Like we can install the package ultralytics over it.

50
00:03:29,000 --> 00:03:36,000
Through this way we can implement YOLO V8 or we can clone the GitHub repo of YOLO V8.

51
00:03:36,000 --> 00:03:38,000
So here you have also written YOLO.

52
00:03:38,000 --> 00:03:44,000
V8 can be installed in two ways from the source or VIP source means like you can clone the GitHub repo

53
00:03:44,000 --> 00:03:52,000
or vip means like if you inside pip install ultralytics so it will install the YOLO V8 package source

54
00:03:53,000 --> 00:03:55,000
on your basic notebook as well.

55
00:03:55,000 --> 00:04:01,000
So YOLO V8 is the first iteration of YOLO which has its own official package like YOLO, V7, YOLO v6

56
00:04:02,000 --> 00:04:08,000
don't have their own official package, so your here is basically the first iteration of YOLO, which

57
00:04:08,000 --> 00:04:11,000
had its own option package.

58
00:04:11,000 --> 00:04:18,000
So basically if you want to train your model and test your model and you don't need to, for example,

59
00:04:18,000 --> 00:04:20,000
I will use.

60
00:04:21,000 --> 00:04:22,000
I will just go on the GitHub repo.

61
00:04:23,000 --> 00:04:27,000
In that case, we need to change the or make some changes in that train.

62
00:04:27,000 --> 00:04:29,000
Dot py or prediction.py file.

63
00:04:29,000 --> 00:04:35,000
For example, I want to add the speed estimation or if I want to add the distance calculation or if

64
00:04:35,000 --> 00:04:38,000
we want to add the counting object counting.

65
00:04:38,000 --> 00:04:43,000
So here I will use a git clone method or the implementation of YOLO v8.

66
00:04:43,000 --> 00:04:49,000
So basically git clone method is used for development, but if you want to simply train your model test

67
00:04:49,000 --> 00:04:54,000
and validate your model, then it's always better to use the PIP install Ultralytics method or the PIP

68
00:04:54,000 --> 00:04:59,000
methods because it is easy and very efficient way to do it.

69
00:04:59,000 --> 00:04:59,000
Okay.

70
00:04:59,000 --> 00:05:04,000
And each one here you will use the command line interface to do the implementation and it's always easy

71
00:05:04,000 --> 00:05:06,000
to implement through it.

72
00:05:06,000 --> 00:05:12,000
Okay, so here and here, as I'm just training, testing and validation or validating my model, so

73
00:05:12,000 --> 00:05:18,000
I'm just choosing PIP install ultralytics to install or YOLO V8 into my Google colab notebook.

74
00:05:18,000 --> 00:05:22,000
So just clicking on PIP install ultralytics now.

75
00:05:22,000 --> 00:05:26,000
So it will install yolo V8 into my google colab notebook.

76
00:05:30,000 --> 00:05:32,000
So it might take a few seconds to install.

77
00:05:32,000 --> 00:05:34,000
So let's see.

78
00:05:34,000 --> 00:05:37,000
But it will be installed in a minute or so.

79
00:05:37,000 --> 00:05:37,000
Okay.

80
00:05:37,000 --> 00:05:41,000
So we have installed it into our Google CoLab notebook.

81
00:05:41,000 --> 00:05:42,000
So let's check.

82
00:05:42,000 --> 00:05:48,000
It's going to be installed and it's working fine, so we'll just run this to import Ultralytics Ultralytics

83
00:05:48,000 --> 00:05:49,000
dot check.

84
00:05:49,000 --> 00:05:54,000
So in this way we can check whether YOLO V8 is installed and it's working fine or not.

85
00:05:54,000 --> 00:06:00,000
So you can see that YOLO v8 install and setup complete and it's working fine as well.

86
00:06:00,000 --> 00:06:06,000
So now we will create a folder over here by the name of datasets where we will download our dataset

87
00:06:06,000 --> 00:06:11,000
from the roboflow into this Google CoLab notebook folder.

88
00:06:11,000 --> 00:06:11,000
Okay.

89
00:06:11,000 --> 00:06:18,000
So mkdir basically creates a directory by the name of datasets so you can create a folder by any other

90
00:06:18,000 --> 00:06:18,000
name as well.

91
00:06:18,000 --> 00:06:24,000
So here I'm just creating a folder into my home directory by the name of datasets like you can see there

92
00:06:24,000 --> 00:06:25,000
here.

93
00:06:25,000 --> 00:06:29,000
Now we have a we have created a folder dataset, so it's currently empty.

94
00:06:29,000 --> 00:06:30,000
So.

95
00:06:30,000 --> 00:06:31,000
Here.

96
00:06:31,000 --> 00:06:37,000
I will download my dataset from Google dataset from Roboflow into this folder.

97
00:06:37,000 --> 00:06:44,000
So let's just see what is our present working directory and just set the current directory as this dataset.

98
00:06:44,000 --> 00:06:47,000
So I'm just setting the current directory as this datasets folder.

99
00:06:47,000 --> 00:06:51,000
And now I will install the dataset from roboflow.

100
00:06:51,000 --> 00:06:55,000
So basically I have just you.

101
00:06:55,000 --> 00:06:59,000
If you want to download the dataset from Roboflow into your Google CoLab notebook, just click on,

102
00:06:59,000 --> 00:07:06,000
download this dataset and just show download select the format as GitHub V5 or YOLO format.

103
00:07:06,000 --> 00:07:12,000
So Ultralytics has also released the YOLO V5, PyTorch and YOLO V8 so you can either select YOLO V8

104
00:07:12,000 --> 00:07:15,000
or YOLO V5 PyTorch and click on Continue.

105
00:07:16,000 --> 00:07:19,000
And just copy this from here.

106
00:07:19,000 --> 00:07:24,000
Click on copy and just copy this from here and just we need to paste this over here.

107
00:07:24,000 --> 00:07:31,000
So in this way you can simply download the data set from the Roboflow into your Google CoLab notebook.

108
00:07:31,000 --> 00:07:37,000
So that data set is downloaded in the zip format and in the Google CoLab it is automatically unzipped.

109
00:07:37,000 --> 00:07:40,000
Like you can see that downloading dataset version zip.

110
00:07:40,000 --> 00:07:44,000
So it will be automatically unzipped as well.

111
00:07:44,000 --> 00:07:45,000
So it might take few seconds.

112
00:07:45,000 --> 00:07:50,000
So let's wait until our dataset gets unzipped and download it.

113
00:07:52,000 --> 00:07:53,000
So it might take a few seconds.

114
00:07:53,000 --> 00:07:58,000
So please wait with me until the dataset gets completely downloaded over here.

115
00:08:01,000 --> 00:08:01,000
Okay.

116
00:08:01,000 --> 00:08:06,000
So you can see that the dataset is downloaded and it's unzipped as well.

117
00:08:06,000 --> 00:08:14,000
So if we go over here, so here we can see our dataset here, track two, and here are our training

118
00:08:14,000 --> 00:08:20,000
test and validation folders, and here is our data.one file which contains the the classes number of

119
00:08:20,000 --> 00:08:21,000
classes.

120
00:08:21,000 --> 00:08:26,000
We have only one class which is of track and a training and validation paths as well.

121
00:08:26,000 --> 00:08:34,000
Okay, so one thing I will do is I will just rename this folder to track and I will just go to the data

122
00:08:34,000 --> 00:08:38,000
dot Yml file and update the training and validation images path.

123
00:08:38,000 --> 00:08:44,000
So we will use the test data, set images to test our model when the model is trained.

124
00:08:44,000 --> 00:08:44,000
Okay.

125
00:08:44,000 --> 00:08:47,000
And validation dataset is used.

126
00:08:47,000 --> 00:08:54,000
Images are used to validate our trained model, which will be on the train model will be on the track,

127
00:08:54,000 --> 00:08:56,000
segmentation data set images.

128
00:08:56,000 --> 00:08:56,000
Okay.

129
00:08:56,000 --> 00:09:03,000
So here is just we are updating the file paths and just click on control s and just.

130
00:09:04,000 --> 00:09:07,000
Uh, we are just setting what is the data set?

131
00:09:07,000 --> 00:09:07,000
Location.

132
00:09:09,000 --> 00:09:14,000
Okay, So what we have is just give me a minute and see what error we're getting.

133
00:09:14,000 --> 00:09:16,000
No such file that that location.

134
00:09:17,000 --> 00:09:17,000
Okay.

135
00:09:17,000 --> 00:09:20,000
So basically we have update the name of the tag to.

136
00:09:20,000 --> 00:09:22,000
So that's why we are getting this error.

137
00:09:22,000 --> 00:09:24,000
But that is not the issue.

138
00:09:24,000 --> 00:09:25,000
We will just go to.

139
00:09:25,000 --> 00:09:27,000
Okay, we will just go to here.

140
00:09:28,000 --> 00:09:29,000
Data dot HTML.

141
00:09:30,000 --> 00:09:33,000
And just add this path over here.

142
00:09:33,000 --> 00:09:36,000
So this is not the issue if we are not getting over here.

143
00:09:36,000 --> 00:09:38,000
So just control V over here.

144
00:09:38,000 --> 00:09:40,000
So we have added the dataset path over here.

145
00:09:40,000 --> 00:09:44,000
So now just run the script for the training.

146
00:09:44,000 --> 00:09:46,000
So the training will take very much time.

147
00:09:46,000 --> 00:09:51,000
So as the training starts, I will just pause the video and when the training completes, I will be

148
00:09:51,000 --> 00:09:51,000
back.

149
00:09:53,000 --> 00:10:01,000
Okay, so here we are, just downloading the YOLO Pre-trained model from the YOLO GitHub repo and we

150
00:10:01,000 --> 00:10:06,000
are fine tuning the YOLO V8 model on the track segmentation dataset.

151
00:10:06,000 --> 00:10:08,000
So you can see that the training is about to start.

152
00:10:08,000 --> 00:10:10,000
As the training starts.

153
00:10:10,000 --> 00:10:14,000
I will just pause this video and then when the training complete I will be back.

154
00:10:14,000 --> 00:10:18,000
So the training will take around 3 to 3.5 hours.

155
00:10:18,000 --> 00:10:19,000
So this is very much time.

156
00:10:19,000 --> 00:10:22,000
So I will be pausing the video when the training starts.

157
00:10:22,000 --> 00:10:26,000
So just to show you that the training has started, then I will pause this video.

158
00:10:27,000 --> 00:10:30,000
So the training is about to start in a few seconds.

159
00:10:30,000 --> 00:10:31,000
Okay.

160
00:10:31,000 --> 00:10:36,000
So just see when the training so the training will start is taking time to start.

161
00:10:36,000 --> 00:10:37,000
Okay.

162
00:10:37,000 --> 00:10:41,000
So as the training completes, I will be back and then we will discuss about the results.

163
00:10:41,000 --> 00:10:42,000
Okay.

164
00:10:45,000 --> 00:10:46,000
Well, guys, I am back.

165
00:10:46,000 --> 00:10:53,000
I was able to train my YOLO V8 model for the drag segmentation and detection, so I have trained my

166
00:10:54,000 --> 00:10:58,000
V8 model on 50 epochs and the image size was set to 640.

167
00:10:58,000 --> 00:11:02,000
And you can see that the task is segmentation and the model is trained.

168
00:11:02,000 --> 00:11:11,000
And the model we used, the V8 model we use to fine tune on the track segmentation data is YOLO V8 and

169
00:11:11,000 --> 00:11:12,000
the segmentation.

170
00:11:13,000 --> 00:11:21,000
I did not use the the large V8 model because it will take the more training time and did not use the

171
00:11:21,000 --> 00:11:24,000
YOLO V8 Nano because it will be less accurate.

172
00:11:24,000 --> 00:11:25,000
But it would be.

173
00:11:25,000 --> 00:11:33,000
But it was fast so I just took a medium model YOLO V8 and the segmentation speed to fine tune on the

174
00:11:33,000 --> 00:11:34,000
track segmentation dataset.

175
00:11:34,000 --> 00:11:36,000
So here are the results.

176
00:11:36,000 --> 00:11:42,000
As I told you that we have trained our model on 40 epochs, so it took around three hours for the training

177
00:11:42,000 --> 00:11:46,000
because segmentation takes more time than in training than detection.

178
00:11:47,000 --> 00:11:51,000
Then the mean average precision we obtained with 50 is 0.6.

179
00:11:51,000 --> 00:11:58,000
Nine is around 70% and the mean average precision with 5295 is 0.235.

180
00:11:58,000 --> 00:12:00,000
So the results are fine.

181
00:12:00,000 --> 00:12:06,000
And here is the model summary which we obtained that you can see that the mean average precision with

182
00:12:07,000 --> 00:12:13,000
50 is around 70% and with 50 to 95 is 0.212%.

183
00:12:14,000 --> 00:12:17,000
Okay, 21.2% and it is 70%.

184
00:12:17,000 --> 00:12:24,000
And so our is all the results are saved in the runs segmentation and the train folder.

185
00:12:24,000 --> 00:12:28,000
Now let's see what different files we have to check this out.

186
00:12:28,000 --> 00:12:33,000
Just run this cell so it will print all the different files we have over here.

187
00:12:33,000 --> 00:12:35,000
As you can see that we have the confusion matrix.

188
00:12:35,000 --> 00:12:42,000
We have the results CSV file which contains the model performance metrics or the model performance after

189
00:12:42,000 --> 00:12:43,000
each of the epoch.

190
00:12:43,000 --> 00:12:49,000
The result dot PNG contain the training and validation loss and the here we have also the confusion

191
00:12:49,000 --> 00:12:53,000
matrix which shows how our model handles the classes.

192
00:12:53,000 --> 00:12:56,000
And then we have the model predictions on the validation batch.

193
00:12:56,000 --> 00:13:01,000
So we have not used that validation images for that training.

194
00:13:01,000 --> 00:13:03,000
So it's always better to have a look.

195
00:13:03,000 --> 00:13:07,000
And here are the model predictions on the training batches as well.

196
00:13:08,000 --> 00:13:11,000
Thus here we have a great folder which contains the best words.

197
00:13:11,000 --> 00:13:16,000
Unlike the best words mean the the words on which the model has given us the best results.

198
00:13:16,000 --> 00:13:22,000
And the last word is the words file of the last epoch, which is put here, the epoch.

199
00:13:22,000 --> 00:13:24,000
Okay, so here we have the confusion matrix.

200
00:13:24,000 --> 00:13:30,000
So a confusion matrix is basically a chart that shows how our model handles different classes.

201
00:13:30,000 --> 00:13:30,000
Okay.

202
00:13:30,000 --> 00:13:39,000
So from here we can see that 86% of the time our model detected correctly that there is a tag, while

203
00:13:39,000 --> 00:13:45,000
14% of the times when the crack was there, our model was unable to detect or segmentation.

204
00:13:45,000 --> 00:13:51,000
So 14% of the times when the crack was there, the model failed to detect or either segment it.

205
00:13:52,000 --> 00:13:52,000
Okay.

206
00:13:52,000 --> 00:13:58,000
While 86% of the time our model was able to successfully detect and segment the crack.

207
00:13:59,000 --> 00:14:01,000
Okay, so let's see the training and validation losses.

208
00:14:02,000 --> 00:14:03,000
I have only trained.

209
00:14:03,000 --> 00:14:06,000
I have trained the model only on 4D Box.

210
00:14:06,000 --> 00:14:07,000
Okay.

211
00:14:07,000 --> 00:14:12,000
So you can see that the training loss is validation losses and the decreasing.

212
00:14:12,000 --> 00:14:20,000
So it means if we train our model on the higher epochs, we can say that the like for example, 150

213
00:14:20,000 --> 00:14:23,000
box or 200 epochs, we can see that our loss will further decrease.

214
00:14:23,000 --> 00:14:28,000
While you can see that mean average precision is increasing over here, you can see that.

215
00:14:28,000 --> 00:14:33,000
So it means if we train our model on higher epochs, we will get some better mean average precision.

216
00:14:33,000 --> 00:14:36,000
Like currently we have 70% mean average precision.

217
00:14:36,000 --> 00:14:39,000
So it may goes to 8,580%.

218
00:14:39,000 --> 00:14:40,000
Okay.

219
00:14:41,000 --> 00:14:44,000
So here are the model predictions on the validation batch.

220
00:14:44,000 --> 00:14:50,000
So as validation images are not used for the training, so it's always better to take a look and see

221
00:14:50,000 --> 00:14:52,000
how our model is performing.

222
00:14:52,000 --> 00:14:53,000
Okay.

223
00:14:53,000 --> 00:14:59,000
So we can see that the model is able to successfully detect the track and was able to do the segmentation

224
00:14:59,000 --> 00:14:59,000
on it as well.

225
00:14:59,000 --> 00:15:03,000
You can see the red line, the segmentation is done with the red line.

226
00:15:03,000 --> 00:15:08,000
You can see over here and you can see the bounding box around the track as well, which shows the model

227
00:15:08,000 --> 00:15:11,000
was able to detect the track successfully.

228
00:15:11,000 --> 00:15:17,000
Now in the next step, I will validate the custom model using the best weights we have got.

229
00:15:17,000 --> 00:15:20,000
And I'm just passing the data dot yml file path.

230
00:15:20,000 --> 00:15:27,000
So here I'm doing the validation and you can see that we have a mean average precision with 5,070% and

231
00:15:27,000 --> 00:15:31,000
with IOU 5295 is 23.8%.

232
00:15:33,000 --> 00:15:40,000
Okay, so now let's test our model on some test images and see what results do we get.

233
00:15:40,000 --> 00:15:44,000
Okay, so I'm just testing my model on the test dataset images.

234
00:15:44,000 --> 00:15:45,000
Let me show you.

235
00:15:45,000 --> 00:15:53,000
So if we go to dataset, Greg and here the test data set images on which we are just testing our model's

236
00:15:53,000 --> 00:15:59,000
performance by passing the best words file over here and setting the confidence value to 0.25.

237
00:15:59,000 --> 00:16:05,000
Okay, so they are around 112 images on the test dataset, so I will not be displaying all the predictions

238
00:16:05,000 --> 00:16:07,000
on the test images.

239
00:16:07,000 --> 00:16:11,000
Instead, I will be displaying the predictions on the top five images over here.

240
00:16:11,000 --> 00:16:16,000
So you can see that the model was able to successfully detect the crack and do the segmentation here

241
00:16:16,000 --> 00:16:17,000
as well.

242
00:16:17,000 --> 00:16:21,000
Here, the model was also able to detect the crack and do the segmentation here as well.

243
00:16:22,000 --> 00:16:26,000
Here, the model is also able to detect this crack and do the segmentation as well.

244
00:16:27,000 --> 00:16:33,000
And here the model is was also able to detect the crack and do the segmentation as well.

245
00:16:33,000 --> 00:16:35,000
So our results are very promising.

246
00:16:35,000 --> 00:16:37,000
So the model gives very good results.

247
00:16:37,000 --> 00:16:40,000
Now let's test that model on a demo video.

248
00:16:40,000 --> 00:16:46,000
So I have just downloaded a demo video from the pixel side and just test that demo video on the drive

249
00:16:46,000 --> 00:16:50,000
and I am downloading the demo video from drive into my Google CoLab notebook.

250
00:16:50,000 --> 00:16:56,000
So let's just run this cell so that video will be downloaded into my Google CoLab notebook.

251
00:16:56,000 --> 00:16:58,000
So here we have that crack video.

252
00:16:59,000 --> 00:17:03,000
So I will test my model on this video and see what results do we get.

253
00:17:03,000 --> 00:17:09,000
So yolo.is equal to segment because I'm performing segmentation and I'm doing prediction.

254
00:17:09,000 --> 00:17:10,000
So mod is equal to predict.

255
00:17:10,000 --> 00:17:18,000
And here I'm just defining setting the path for the best words file which we have over here runs a segment.

256
00:17:20,000 --> 00:17:20,000
Bringing.

257
00:17:21,000 --> 00:17:22,000
Bierdz.

258
00:17:22,000 --> 00:17:24,000
Vestbygd is the best way to file.

259
00:17:24,000 --> 00:17:25,000
And here is our confidence score.

260
00:17:25,000 --> 00:17:29,000
And here the path for our demo video.

261
00:17:29,000 --> 00:17:34,000
Okay, let's test our model on the demo video and see what results do we get.

262
00:17:34,000 --> 00:17:34,000
So.

263
00:17:36,000 --> 00:17:37,000
Or it started.

264
00:17:38,000 --> 00:17:40,000
So it might take some time.

265
00:17:40,000 --> 00:17:44,000
Let's see how many frames our video gets divided first.

266
00:17:45,000 --> 00:17:46,000
So let's see.

267
00:17:46,000 --> 00:17:50,000
So our model has divided our complete video into 723 frames.

268
00:17:50,000 --> 00:17:51,000
You can see over here.

269
00:17:51,000 --> 00:17:59,000
So it will do this segmentation or it will do the predictions or prediction and segmentation on each

270
00:17:59,000 --> 00:18:00,000
frame separately.

271
00:18:00,000 --> 00:18:02,000
Like we can see that the crack is being detected.

272
00:18:02,000 --> 00:18:04,000
So this might take some time.

273
00:18:04,000 --> 00:18:07,000
So as this process completes, the prediction is complete.

274
00:18:07,000 --> 00:18:10,000
Let me get back and show you the results we got.

275
00:18:14,000 --> 00:18:19,000
Well, guys, the prediction on that crack video has been completed and our results are saved in run

276
00:18:19,000 --> 00:18:20,000
segment.

277
00:18:20,000 --> 00:18:21,000
Predict three.

278
00:18:21,000 --> 00:18:25,000
So if you go over here, run segment, predict three.

279
00:18:25,000 --> 00:18:32,000
So here we have the output video of the our after doing the predictions on the demo video.

280
00:18:32,000 --> 00:18:38,000
So due to large font size, I was not able to display the output video over here.

281
00:18:38,000 --> 00:18:44,000
So I've just downloaded the compressed file, basically just converted this video into a compressed

282
00:18:44,000 --> 00:18:48,000
file so the size of the video has been reduced.

283
00:18:48,000 --> 00:18:52,000
So let's download this compressed video file and let's display the output.

284
00:18:53,000 --> 00:18:56,000
Let me show you the output results and see what results do we get.

285
00:18:56,000 --> 00:18:58,000
So it might take few seconds.

286
00:18:59,000 --> 00:19:01,000
So let me down it download.

287
00:19:01,000 --> 00:19:04,000
So let then I can show you the results and we can see that.

288
00:19:04,000 --> 00:19:06,000
What results do we actually get?

289
00:19:06,000 --> 00:19:12,000
Okay, so let me play this video up and show you what results do actually we get.

290
00:19:12,000 --> 00:19:13,000
Okay.

291
00:19:15,000 --> 00:19:18,000
So now you can see the results on your screen.

292
00:19:18,000 --> 00:19:21,000
I think it might take a few seconds more.

293
00:19:21,000 --> 00:19:22,000
Okay.

294
00:19:25,000 --> 00:19:27,000
So now you can see the results on your screen.

295
00:19:27,000 --> 00:19:33,000
So you can see that the model was able to detect the crack as well as water was able to do the segmentation

296
00:19:33,000 --> 00:19:35,000
on the crack as well.

297
00:19:35,000 --> 00:19:43,000
So the results are very promising, which we got after implementing your crack segmentation on a custom

298
00:19:43,000 --> 00:19:44,000
dataset of crack.

299
00:19:44,000 --> 00:19:47,000
So you can see that the results are very good.

300
00:19:47,000 --> 00:19:49,000
So this is all from this video tutorial.

301
00:19:49,000 --> 00:19:54,000
In this video tutorial, we have trained our model on the crack dataset.

302
00:19:54,000 --> 00:20:00,000
So in the output we are able to detect the cracks as well as able to perform the segmentation on the

303
00:20:00,000 --> 00:20:01,000
cracks as well.

304
00:20:01,000 --> 00:20:04,000
See you all in the next video with some new projects.

305
00:20:04,000 --> 00:20:06,000
Till then, bye bye.

