1
00:00:02,000 --> 00:00:07,000
Now you can see over here, I have opened the pigeon, so I will just click over here, file, click

2
00:00:07,000 --> 00:00:09,000
on new project from here.

3
00:00:09,000 --> 00:00:10,000
Okay.

4
00:00:10,000 --> 00:00:18,000
So I will just now redirect towards the directory where I am just created a folder so it's inside the.

5
00:00:19,000 --> 00:00:25,000
Okay, so now I'm inside the directory and here I can see the folder by the name YOLO V8 Crash course.

6
00:00:25,000 --> 00:00:28,000
So this is the folder I just created for this tutorial.

7
00:00:29,000 --> 00:00:30,000
So just click over here.

8
00:00:31,000 --> 00:00:31,000
Okay.

9
00:00:31,000 --> 00:00:34,000
Then I'm just creating a new environment.

10
00:00:34,000 --> 00:00:40,000
You can see over here I'm just creating a new virtual environment over here and this is my base interpreter.

11
00:00:40,000 --> 00:00:41,000
Python dot exe.

12
00:00:41,000 --> 00:00:44,000
Okay, so just click over here.

13
00:00:45,000 --> 00:00:50,000
So this is my base interpreter and then click on Create New project.

14
00:00:54,000 --> 00:00:57,000
As I click on Create, it will ask me.

15
00:00:57,000 --> 00:00:59,000
Projects can either be open a new window or replace the project.

16
00:00:59,000 --> 00:01:02,000
So just click on this window from here.

17
00:01:02,000 --> 00:01:05,000
Okay, so now it's creating a new virtual environment.

18
00:01:05,000 --> 00:01:11,000
You can see over here and this is our directory name, YOLO V8 Crash course, which you can see over

19
00:01:11,000 --> 00:01:11,000
here.

20
00:01:11,000 --> 00:01:17,000
Now we can see that the virtual environment is being created, so this might take few minutes as it's

21
00:01:17,000 --> 00:01:20,000
updating the interpreter paths and everything.

22
00:01:20,000 --> 00:01:26,000
Okay, so now you can see that we have created a new project over here and here we have the main.py

23
00:01:27,000 --> 00:01:27,000
file.

24
00:01:27,000 --> 00:01:32,000
So if you just click over here, just right click over here and then just go to.

25
00:01:34,000 --> 00:01:34,000
From here.

26
00:01:40,000 --> 00:01:40,000
Sorry.

27
00:01:40,000 --> 00:01:41,000
Just click over here.

28
00:01:41,000 --> 00:01:41,000
Fine.

29
00:01:41,000 --> 00:01:43,000
And then click on from here.

30
00:01:43,000 --> 00:01:48,000
Just click on settings from here and then just click on over here.

31
00:01:48,000 --> 00:01:54,000
Project Yolo V eight Crash Course is the name of our project, and then then select click on Python

32
00:01:54,000 --> 00:01:54,000
Interpreter.

33
00:01:54,000 --> 00:01:55,000
Interpreter.

34
00:01:55,000 --> 00:01:59,000
So now you can see that these three packages are already installed.

35
00:01:59,000 --> 00:02:06,000
So now you can see that we have downloaded Python 3.10, so we can see Python 3.10 over here and YOLO

36
00:02:06,000 --> 00:02:07,000
V8 crash course.

37
00:02:07,000 --> 00:02:13,000
And so just install to install any new package, just click over plus and just write here.

38
00:02:13,000 --> 00:02:19,000
For example, if I just want to install numpy, I will just type numpy and just select numpy and click

39
00:02:19,000 --> 00:02:20,000
on install package.

40
00:02:20,000 --> 00:02:21,000
Okay.

41
00:02:21,000 --> 00:02:23,000
So it will install the package.

42
00:02:23,000 --> 00:02:29,000
So in this way you can just write all the packages name over here and just install all those packages

43
00:02:29,000 --> 00:02:30,000
like you can see over here.

44
00:02:31,000 --> 00:02:37,000
If I just want to install Cv2 package Cv2 package I will just write OpenCV python.

45
00:02:39,000 --> 00:02:46,000
So that's right OpenCV Python So you can see that here we have the dot package.

46
00:02:46,000 --> 00:02:51,000
So if you just click over here and you can install the Cv2 OpenCV Python package as well.

47
00:02:52,000 --> 00:02:54,000
But this process takes very much time.

48
00:02:54,000 --> 00:03:00,000
Like in this way you just need to write every single package name over here in the search bar and install

49
00:03:00,000 --> 00:03:01,000
that package.

50
00:03:01,000 --> 00:03:04,000
There is another, another way will be also to install the package.

51
00:03:04,000 --> 00:03:06,000
So let me just tell you.

52
00:03:06,000 --> 00:03:12,000
So now you can see that as I install the numpy package, we can see that numpy package appears over

53
00:03:12,000 --> 00:03:15,000
here and now we have the four packages installed.

54
00:03:15,000 --> 00:03:20,000
In this way you can just click over here plus and install any of the package which you require.

55
00:03:20,000 --> 00:03:23,000
If so, just going back from here.

56
00:03:24,000 --> 00:03:30,000
So in order to install the packages of your choice, you just need to click over here, file and create

57
00:03:30,000 --> 00:03:33,000
a file by the name requirements dot txt.

58
00:03:33,000 --> 00:03:38,000
Okay, so in this file you can write all the packages which you want to install.

59
00:03:38,000 --> 00:03:46,000
So if I just want to install ultralytics, I will just write ultralight 8.0.26.

60
00:03:47,000 --> 00:03:47,000
Okay.

61
00:03:47,000 --> 00:03:48,000
So this is a version.

62
00:03:48,000 --> 00:03:49,000
Okay.

63
00:03:49,000 --> 00:03:53,000
In this way if you want to install numpy package, although I've just already installed, you can just

64
00:03:53,000 --> 00:03:59,000
write numpy and if you just want to install matplotlib you can just write the name of package over here.

65
00:03:59,000 --> 00:04:02,000
So now here you can see over here.

66
00:04:02,000 --> 00:04:05,000
Package requirement Ultralytics Matplotlib are not satisfied.

67
00:04:05,000 --> 00:04:08,000
So if you just click on install requirements.

68
00:04:08,000 --> 00:04:13,000
So now it will just install all these two packages and just click on install from here.

69
00:04:13,000 --> 00:04:19,000
So now you can see that just go below down over here, you can see that installing package.

70
00:04:19,000 --> 00:04:26,000
So it's installing the Ultralytics package and after this it will install the Matplotlib package, although

71
00:04:26,000 --> 00:04:28,000
numpy package is already installed.

72
00:04:28,000 --> 00:04:28,000
Okay.

73
00:04:28,000 --> 00:04:29,000
So.

74
00:04:30,000 --> 00:04:35,000
But just let's run the Main.py file and see what output do we get from here.

75
00:04:35,000 --> 00:04:41,000
So if I just click on Main.py file and just click on Run Main and just open the terminal so you can

76
00:04:41,000 --> 00:04:43,000
see that it's giving me the output.

77
00:04:43,000 --> 00:04:44,000
Hi pi job.

78
00:04:44,000 --> 00:04:46,000
So that's fine.

79
00:04:50,000 --> 00:04:53,000
In the meanwhile that alter prefix package get installed.

80
00:04:53,000 --> 00:04:59,000
And let me tell you in this video tutorial I will be using YOLO V8 for the object detection.

81
00:04:59,000 --> 00:05:00,000
So alternate.

82
00:05:01,000 --> 00:05:07,000
So to implement YOLO a8 we just need to install the ultralytics package which I'm just installing over

83
00:05:07,000 --> 00:05:07,000
here.

84
00:05:07,000 --> 00:05:11,000
So YOLO eight is the latest release of the YOLO version.

85
00:05:11,000 --> 00:05:18,000
So YOLO V8 outperforms all the other YOLO version in terms of accuracy and speed and the mean average

86
00:05:18,000 --> 00:05:22,000
precision of 56 7.6 have has been marked with YOLO V8.

87
00:05:23,000 --> 00:05:26,000
So if I just show you the YOLO V8 GitHub repository.

88
00:05:26,000 --> 00:05:28,000
So let me just show you.

89
00:05:28,000 --> 00:05:36,000
So if you just click over here and just write YOLO V8 it up, Okay, So and just click on this first

90
00:05:36,000 --> 00:05:36,000
link.

91
00:05:37,000 --> 00:05:44,000
So Ultralytics has released YOLO V8 Ultralytics has also released YOLO V5 and YOLO V3 so you'll be eight

92
00:05:44,000 --> 00:05:48,000
is the only version of YOLO which has its own package.

93
00:05:48,000 --> 00:05:54,000
So you just need to install PIP, install ultralytics and you can just run YOLO V8.

94
00:05:54,000 --> 00:06:00,000
So YOLO V8 is the only version of YOLO which has its own package that you can see over here.

95
00:06:00,000 --> 00:06:04,000
Pip install Ultralytics will just install the YOLO V8 on your.

96
00:06:05,000 --> 00:06:09,000
System and you just need to write YOLO predict and you can just run YOLO V8.

97
00:06:09,000 --> 00:06:15,000
Okay, so prior versions of YOLO had don't have their own package, but YOLO V8 had its own package

98
00:06:15,000 --> 00:06:18,000
which is ultra, which is PIP install already.

99
00:06:18,000 --> 00:06:21,000
So using PIP install ultralytics you can just install YOLO v8.

100
00:06:22,000 --> 00:06:27,000
You can also, if you want to make any change in the detection or training script, you can just clone

101
00:06:27,000 --> 00:06:29,000
the repo as well.

102
00:06:29,000 --> 00:06:29,000
Okay.

103
00:06:29,000 --> 00:06:37,000
So in our case we are just installing the YOLO V8 package by just writing ultralytics and its version.

104
00:06:37,000 --> 00:06:37,000
Okay.

105
00:06:37,000 --> 00:06:39,000
In the requirements.txt file.

106
00:06:39,000 --> 00:06:46,000
So if I just go back over here now you can see over here in the requirements.txt file I'm just installing

107
00:06:46,000 --> 00:06:49,000
YOLO V8 by just writing Ultralytics and its version.

108
00:06:49,000 --> 00:06:52,000
So in this way we can install the YOLO V8.

109
00:06:52,000 --> 00:06:55,000
So now we can see that package is successfully installed.

110
00:06:55,000 --> 00:06:59,000
Packages ultralytics and Matplotlib package has been successfully installed.

111
00:06:59,000 --> 00:07:06,000
You can see in the node over here we go down like the package is installed successfully, which includes

112
00:07:06,000 --> 00:07:13,000
Ultralytics and Matplotlib package and you can see that we are using Python 3.10, which you can see

113
00:07:13,000 --> 00:07:20,000
over in the top in the bottom right corner, Python 3.10, which we are using, which we have just downloaded

114
00:07:20,000 --> 00:07:25,000
the python 3.10 version from python.org.

115
00:07:25,000 --> 00:07:26,000
Okay.

116
00:07:26,000 --> 00:07:28,000
So now we will just run YOLO V8.

117
00:07:28,000 --> 00:07:36,000
So first of all I will just go over here and click on new and create a directory by the name run YOLO

118
00:07:36,000 --> 00:07:39,000
by running YOLO.

119
00:07:40,000 --> 00:07:41,000
Be it.

120
00:07:41,000 --> 00:07:44,000
Okay, so this is our directory.

121
00:07:44,000 --> 00:07:45,000
Running YOLO V8.

122
00:07:45,000 --> 00:07:47,000
And here I will just create a file by the name.

123
00:07:49,000 --> 00:07:49,000
Your law.

124
00:07:53,000 --> 00:07:54,000
death.py.

125
00:07:54,000 --> 00:07:55,000
Okay.

126
00:07:57,000 --> 00:08:00,000
So now you can see that as we have installed the AllPolitics package.

127
00:08:00,000 --> 00:08:02,000
So I will just write from Ultralytics.

128
00:08:05,000 --> 00:08:07,000
Import yolo.

129
00:08:07,000 --> 00:08:13,000
Okay, so it will import yolo v8 from you by using from ultralytics import yolo.

130
00:08:13,000 --> 00:08:16,000
It will automatically import the yolo V8.

131
00:08:17,000 --> 00:08:17,000
Okay.

132
00:08:17,000 --> 00:08:19,000
Yolo v8 package from ultralytics.

133
00:08:19,000 --> 00:08:21,000
So in the next step I'll just write.

134
00:08:24,000 --> 00:08:25,000
Import cv2.

135
00:08:25,000 --> 00:08:28,000
Or let's just skip it and just write.

136
00:08:28,000 --> 00:08:29,000
Model is equal to.

137
00:08:30,000 --> 00:08:32,000
Then we just need to write YOLO.

138
00:08:34,000 --> 00:08:35,000
And just right.

139
00:08:36,000 --> 00:08:40,000
So in case of Angola, we have different.

140
00:08:42,000 --> 00:08:43,000
Evidence available.

141
00:08:43,000 --> 00:08:44,000
So let me just show you.

142
00:08:44,000 --> 00:08:47,000
So now if I just go below down here.

143
00:08:47,000 --> 00:08:52,000
So now you can see that we have five different weights, Yolo V eight and or Nano is the smallest and

144
00:08:52,000 --> 00:08:57,000
it is it is the smallest in size and it is the fastest as well.

145
00:08:57,000 --> 00:09:05,000
But it is less accurate while yolo V8X is the is the more accurate, but it is less fast or it is slow

146
00:09:05,000 --> 00:09:07,000
as compared to other YOLO V8 versions.

147
00:09:07,000 --> 00:09:14,000
So simply yolo v eight and is less accurate, but it is the fastest but yolo V8X is more accurate than

148
00:09:14,000 --> 00:09:16,000
other all other yolo v eight.

149
00:09:16,000 --> 00:09:18,000
But it is less fast.

150
00:09:18,000 --> 00:09:18,000
Okay.

151
00:09:19,000 --> 00:09:23,000
So just go back from here and just write your logo.

152
00:09:24,000 --> 00:09:26,000
B a n dot p t, Okay.

153
00:09:26,000 --> 00:09:32,000
So I'm just writing the name of the weight file over here so the weight will be automatically downloaded.

154
00:09:32,000 --> 00:09:32,000
Okay.

155
00:09:32,000 --> 00:09:37,000
So just need to we don't need to manually download the weight and just place in this folder.

156
00:09:37,000 --> 00:09:39,000
The weights will be automatically downloaded.

157
00:09:39,000 --> 00:09:44,000
You just need to write the name of the weights which you want to use.

158
00:09:44,000 --> 00:09:46,000
Just need to write the name of the weights.

159
00:09:46,000 --> 00:09:47,000
Pre-trained weights over here.

160
00:09:47,000 --> 00:09:48,000
Okay.

161
00:09:48,000 --> 00:09:56,000
And then after this, just write results is equal to model and just pass the input image path over here.

162
00:09:56,000 --> 00:09:56,000
Okay.

163
00:09:56,000 --> 00:09:58,000
So let me just.

164
00:10:00,000 --> 00:10:01,000
Okay.

165
00:10:01,000 --> 00:10:04,000
So let me just add some image over here.

166
00:10:04,000 --> 00:10:10,000
So have already have some downloaded some images from, uh, Google.

167
00:10:10,000 --> 00:10:12,000
So I will just add these images over here.

168
00:10:12,000 --> 00:10:18,000
So let me just go back and just let me some add some new images.

169
00:10:18,000 --> 00:10:18,000
Okay?

170
00:10:18,000 --> 00:10:21,000
So just just give me a minute.

171
00:10:21,000 --> 00:10:24,000
I'm just going back and just adding some new images.

172
00:10:25,000 --> 00:10:25,000
Okay.

173
00:10:25,000 --> 00:10:28,000
So let me just show you as well.

174
00:10:30,000 --> 00:10:33,000
Well, if I just go over here in this folder.

175
00:10:33,000 --> 00:10:38,000
So now in the images folder, you can see over here, I have just placed these four images.

176
00:10:38,000 --> 00:10:44,000
Okay, So let me just test out on these images and see what results do we get.

177
00:10:44,000 --> 00:10:44,000
Okay.

178
00:10:47,000 --> 00:10:51,000
So I'm just going back to our stock code and just I will just write down, down.

179
00:10:51,000 --> 00:10:52,000
So I will.

180
00:10:53,000 --> 00:10:57,000
Now I just want to go to the images folder and just write the name of the image or the image.

181
00:10:58,000 --> 00:10:59,000
I just need to add the image path.

182
00:10:59,000 --> 00:11:05,000
So I will just write, uh, dot dot, which means go backward, like go outside this running Yolo V

183
00:11:05,000 --> 00:11:12,000
folder and then just go to images folder and just write, uh, the three dot PNG, the name of the image

184
00:11:12,000 --> 00:11:16,000
on which I just want to perform the detection.

185
00:11:16,000 --> 00:11:16,000
Okay.

186
00:11:16,000 --> 00:11:20,000
And just write show is equal to true.

187
00:11:20,000 --> 00:11:24,000
Okay, so now just click on over here.

188
00:11:24,000 --> 00:11:26,000
yolo-test.py.

189
00:11:26,000 --> 00:11:30,000
So just click over here and just run YOLO dash test this script.

190
00:11:30,000 --> 00:11:33,000
So I'm just running this YOLO test.py script.

191
00:11:33,000 --> 00:11:36,000
Okay, so this might take few seconds.

192
00:11:46,000 --> 00:11:52,000
Now you can see that the output just appeared and it just flows because we don't have added any delay.

193
00:11:52,000 --> 00:11:52,000
Okay.

194
00:11:52,000 --> 00:11:54,000
So that's why we cannot see the output.

195
00:11:54,000 --> 00:11:56,000
It just appeared and went away.

196
00:11:56,000 --> 00:12:01,000
So because we don't have added we because we haven't added any delay.

197
00:12:01,000 --> 00:12:02,000
So let's add the delay.

198
00:12:02,000 --> 00:12:05,000
So to add the delay, I will just import cv2.

199
00:12:09,000 --> 00:12:12,000
Import cv2 and I will just write.

200
00:12:13,000 --> 00:12:15,000
CV to dot Wait key.

201
00:12:16,000 --> 00:12:19,000
So I'm just adding that delay now and just write zero over here.

202
00:12:19,000 --> 00:12:22,000
And now let's run this script again.

203
00:12:22,000 --> 00:12:25,000
So now hopefully we will have the output in front of us.

204
00:12:27,000 --> 00:12:28,000
Okay.

205
00:12:29,000 --> 00:12:30,000
The USB.

206
00:12:30,000 --> 00:12:33,000
We can't see the output because we don't have any added any delay.

207
00:12:33,000 --> 00:12:35,000
So.

208
00:12:40,000 --> 00:12:43,000
So now you can see that we have the output in front of us.

209
00:12:43,000 --> 00:12:46,000
Like you can see that this is the input image I have just passed.

210
00:12:46,000 --> 00:12:50,000
And here we have the detection results using YOLO V8.

211
00:12:50,000 --> 00:12:53,000
So now you can see that the model is able to detect motorcycles.

212
00:12:53,000 --> 00:12:59,000
Like you can see that we have multiple motorcycles plus in the back side of the image we have the cars.

213
00:12:59,000 --> 00:13:02,000
So the model is able to detect cars as well as the motorcycle.

214
00:13:02,000 --> 00:13:04,000
So the detection results are quite fine.

215
00:13:04,000 --> 00:13:09,000
And let's test on some other images and well and see what results do we get.

216
00:13:09,000 --> 00:13:12,000
Okay, so just write the name.

217
00:13:12,000 --> 00:13:16,000
So I'm just passing two dot PNG and see what results do we get.

218
00:13:16,000 --> 00:13:23,000
So just click over here and just run YOLO test and okay, just forgot to stop the previous.

219
00:13:23,000 --> 00:13:30,000
So I will just click over here and stop the previous running script and just run this again now.

220
00:13:31,000 --> 00:13:33,000
So run YOLO test.

221
00:13:33,000 --> 00:13:34,000
Okay.

222
00:13:38,000 --> 00:13:39,000
Okay, so let's see.

223
00:13:39,000 --> 00:13:41,000
What results do we get in this case from here?

224
00:13:42,000 --> 00:13:45,000
Okay, so let me just share my screen now.

225
00:13:46,000 --> 00:13:51,000
So now you can see over here, like you can see over here, we have detected the card.

226
00:13:51,000 --> 00:13:52,000
This is a wrong detection.

227
00:13:52,000 --> 00:13:53,000
This is not a bus.

228
00:13:53,000 --> 00:13:55,000
This is also a card file.

229
00:13:55,000 --> 00:14:00,000
You can see that the YOLO V8 model is detecting cards and these are very impressive results.

230
00:14:00,000 --> 00:14:08,000
Currently we are using nano, but I have already told you that YOLO is the largest among the YOLO V8

231
00:14:08,000 --> 00:14:10,000
model and it is more accurate.

232
00:14:10,000 --> 00:14:17,000
So you can use also use the YOLO V8 weights and in that if you use the YOLO V8 weights, the detection

233
00:14:17,000 --> 00:14:23,000
results will be more backward because YOLO, A10 Nano is also the fastest, but it is less accurate

234
00:14:23,000 --> 00:14:27,000
while YOLO V8 is less fast but is more accurate.

235
00:14:27,000 --> 00:14:29,000
Okay, so the detection results are fine.

236
00:14:29,000 --> 00:14:31,000
So let me just go back.

237
00:14:32,000 --> 00:14:36,000
Okay, so now what we can do is.

238
00:14:37,000 --> 00:14:40,000
You can test on some other images as well.

239
00:14:40,000 --> 00:14:46,000
But I I've already tested on two images two dot PNG and three dot PNG already.

