All right, guys.
So now we will test our model on live webcam.
So I will open PyCharm.
You can use any other ID if you want to run it on Visual Studio.
You can also do it if you want to run it.
Anaconda prompt.
You can also do this.
If you want to run this on Spyder ID, you can also do this so it's all upon your choice.
So first I will create a new project over here file.
Uh, just click on new project.
And you saw no mistake.
My grand directory.
So will go to.
If you project practice our folder here.
Create a new directory for the directory name like Webcap.
Okay, so this is the name of my directory.
Okay.
And where it is.
Okay.
And let's create a new folder over here.
So we have created a new project over here.
Now I will just copy these two files.
This is my weird file, and this is the prediction script to test a model on the live webcam.
Okay, so just copy these files from here and just paste this files from here.
Okay.
So now I will open the PyCharm and just I can find these two files over here.
So here from Ultralytics import YOLO.
So it will import the latest YOLO yolo v8 version that I have initialized YOLO V8 model with the variable
model name and then I have doing prediction.
So prediction predict method takes all the parameters of the which we usually pass in the command line
interface like source save is equal to true means to save the output and then confidence score.
And the save dash text means to save the bounding boxes.
Details.
Okay, so here I think I should write so is equal to true and confidence.
One is here and then save dash.
Dash.
I don't think I don't need this so just can save and then open the terminal.
Just save this and run.
-- predictions.
Dot py and click one enter and let's see what results do we get from here.
So let me wait until the webcam opens.
So I have I am only wearing the mask.
I am not wearing the protective personal protective equipment.
Okay.
So let me go get back.
So it's just so it's just take that as a dust mask.
Okay.
So I'm not wearing any other equipment, so it will not be distracting.
Okay.
So I'm not wearing a yet either.
So.
Okay, So my point, detecting the dust mask, it's detecting the sheet as well as the because I have
set the confidence value very low.
So you can see that the confidence value is very low.
So that's why it's detecting the or the glove.
So we can see that the model is performing fine on the live webcam as well.
So these are the results of the model on the live webcam.
So this is all from the personal protective equipment detection project.
I hope you have liked it.
See you all in the next video.