You know, we will see how we can run YOLO on Windows.
So first of all, I will just click over here, click on new and create a new directory and just write
Running YOLO V8.
Indoors.
Okay, so I've just created a new directory by the name running YOLO V8 windows, which you can see
over here.
And I've just click over here, click on new and create a file Yolo v8-video.py file.
Okay, so I will just copy the code which we have in the yolo webcam.py file and just paste this code
into the yolo v8-video.py file.
So what change will make before explaining that change?
What I will do is I will just go to over here and let me show you a video sample video.
So I've just created a folder over here by the name videos.
And if I just open this folder, you can see a video by x dot mp4.
So now I will just perform prediction on this video and I will see whether my able, my model is able
to detect the person and the bicycle over here or not.
So what I expect is that my model should be able to detect the person and the bicycles because I'm using
YOLO Pre-trained weights and the Pre-trained weight Pre-trained model is being trained on the Coco dataset,
which can detect 80 classes and the class.
And among those classes we have the bicycle and the person class as well.
Okay, so just close this out and uh, in the cv2.video capture zero.
Just passed up this path.
So I will just write dot dot.
It means we just need to go outside this folder running your V8 windows or running your V8 videos.
I think this should be the name of this folder, should be YOLO V8 videos, but now I've just created
it, so we just need to go back to this folder from this folder and just go to the videos folder, right
videos.
And in the videos I will just like bikes dot mp4.
Okay, so bikes dot mp4.
So just select this out from here by just writing dash.
Okay.
So I think that would work perfectly fine.
Okay.
So I'm just using the bikes dot mp4 and redirecting towards this directory.
Okay.
So.
Let's just run this and see what output do we get?
So just click on Run YOLO V8 video.
For.
I'm just running this script file and let's see what output we get.
If there is an error, we will definitely fix it out.
So now you can see over here we are able to detect the bicycle as well as we are able to detect the
person.
We have the confidence score along with this as well.
So the detection results are quite impressive.
Like we are able to detect the person.
We are able to detect the bicycle.
We are the label bicycle.
We have assigned the label person and the confidence score we also have over here.
Okay, so that's perfect.
Like you can see over here, we are also able to detect a traffic light over here as well.
We have created a bounding box around it as well and the results look quite impressive.
In short, you can say that.
This is our deserts.
What I was expecting and.
And amazing.
So let me just stop this video and see if my output video is saved.
Output detection video is saved into this folder or not.
So I will just go over here, run YOLO, V8 windows and this is the output file which contains the output
video with detections.
Okay.
So now you can see over here we are able to do detections like you can see that we have created a bounding
box around the bicycle.
We have also created a bounding box around the person as well.
Like you can see over here, we are able to detect textures.
Thus, we have also assigned the confidence score and the label as well.
So the results are pretty impressive.
Okay, so now till now we have done detection on images, videos and the live webcam feed as well.
So we have covered half of the part like we have in this from the start.
We learned how we can install Python, how we can install the PyCharm Community edition, how we can
run your own images.
We have also seen that how we can run your own videos and how we can run your own webcam as well.
So in the next part we will integrate YOLO V8 with class.
Okay, so let's see you all in the next part.