1
00:00:02,000 --> 00:00:02,000
All right, guys.

2
00:00:02,000 --> 00:00:05,000
So now we will test our model on live webcam.

3
00:00:05,000 --> 00:00:06,000
So I will open PyCharm.

4
00:00:07,000 --> 00:00:11,000
You can use any other ID if you want to run it on Visual Studio.

5
00:00:11,000 --> 00:00:13,000
You can also do it if you want to run it.

6
00:00:13,000 --> 00:00:14,000
Anaconda prompt.

7
00:00:14,000 --> 00:00:15,000
You can also do this.

8
00:00:15,000 --> 00:00:21,000
If you want to run this on Spyder ID, you can also do this so it's all upon your choice.

9
00:00:21,000 --> 00:00:25,000
So first I will create a new project over here file.

10
00:00:28,000 --> 00:00:30,000
Uh, just click on new project.

11
00:00:32,000 --> 00:00:34,000
And you saw no mistake.

12
00:00:34,000 --> 00:00:35,000
My grand directory.

13
00:00:35,000 --> 00:00:37,000
So will go to.

14
00:00:38,000 --> 00:00:41,000
If you project practice our folder here.

15
00:00:42,000 --> 00:00:47,000
Create a new directory for the directory name like Webcap.

16
00:00:49,000 --> 00:00:51,000
Okay, so this is the name of my directory.

17
00:00:51,000 --> 00:00:52,000
Okay.

18
00:00:52,000 --> 00:00:53,000
And where it is.

19
00:00:53,000 --> 00:00:54,000
Okay.

20
00:00:54,000 --> 00:00:57,000
And let's create a new folder over here.

21
00:00:57,000 --> 00:01:00,000
So we have created a new project over here.

22
00:01:00,000 --> 00:01:03,000
Now I will just copy these two files.

23
00:01:03,000 --> 00:01:09,000
This is my weird file, and this is the prediction script to test a model on the live webcam.

24
00:01:09,000 --> 00:01:14,000
Okay, so just copy these files from here and just paste this files from here.

25
00:01:15,000 --> 00:01:16,000
Okay.

26
00:01:16,000 --> 00:01:21,000
So now I will open the PyCharm and just I can find these two files over here.

27
00:01:21,000 --> 00:01:24,000
So here from Ultralytics import YOLO.

28
00:01:24,000 --> 00:01:31,000
So it will import the latest YOLO yolo v8 version that I have initialized YOLO V8 model with the variable

29
00:01:31,000 --> 00:01:35,000
model name and then I have doing prediction.

30
00:01:35,000 --> 00:01:41,000
So prediction predict method takes all the parameters of the which we usually pass in the command line

31
00:01:41,000 --> 00:01:47,000
interface like source save is equal to true means to save the output and then confidence score.

32
00:01:47,000 --> 00:01:50,000
And the save dash text means to save the bounding boxes.

33
00:01:50,000 --> 00:01:51,000
Details.

34
00:01:51,000 --> 00:01:57,000
Okay, so here I think I should write so is equal to true and confidence.

35
00:01:57,000 --> 00:01:59,000
One is here and then save dash.

36
00:01:59,000 --> 00:01:59,000
Dash.

37
00:01:59,000 --> 00:02:04,000
I don't think I don't need this so just can save and then open the terminal.

38
00:02:04,000 --> 00:02:06,000
Just save this and run.

39
00:02:08,000 --> 00:02:10,000
-- predictions.

40
00:02:10,000 --> 00:02:16,000
Dot py and click one enter and let's see what results do we get from here.

41
00:02:18,000 --> 00:02:20,000
So let me wait until the webcam opens.

42
00:02:22,000 --> 00:02:25,000
So I have I am only wearing the mask.

43
00:02:25,000 --> 00:02:28,000
I am not wearing the protective personal protective equipment.

44
00:02:28,000 --> 00:02:29,000
Okay.

45
00:02:29,000 --> 00:02:31,000
So let me go get back.

46
00:02:31,000 --> 00:02:34,000
So it's just so it's just take that as a dust mask.

47
00:02:34,000 --> 00:02:35,000
Okay.

48
00:02:35,000 --> 00:02:38,000
So I'm not wearing any other equipment, so it will not be distracting.

49
00:02:39,000 --> 00:02:39,000
Okay.

50
00:02:39,000 --> 00:02:42,000
So I'm not wearing a yet either.

51
00:02:43,000 --> 00:02:43,000
So.

52
00:02:43,000 --> 00:02:50,000
Okay, So my point, detecting the dust mask, it's detecting the sheet as well as the because I have

53
00:02:50,000 --> 00:02:52,000
set the confidence value very low.

54
00:02:52,000 --> 00:02:55,000
So you can see that the confidence value is very low.

55
00:02:55,000 --> 00:02:58,000
So that's why it's detecting the or the glove.

56
00:02:58,000 --> 00:03:03,000
So we can see that the model is performing fine on the live webcam as well.

57
00:03:04,000 --> 00:03:07,000
So these are the results of the model on the live webcam.

58
00:03:07,000 --> 00:03:11,000
So this is all from the personal protective equipment detection project.

59
00:03:11,000 --> 00:03:13,000
I hope you have liked it.

60
00:03:13,000 --> 00:03:14,000
See you all in the next video.

