In this video tutorial, we will learn how we can do object detection using YOLO v ten in Google Colab.
YOLO ten is developed by researchers at Tsinghua University in China.
YOLO ten is the state of the art, real time object detection model that outperforms all the other YOLO
models in terms of average precision, parameter efficiency, and inference speed.
So in this tutorial, we will look at how we can do object detection using YOLO written in Google Colab.
So this is the official repository which you can see over here.
Uh you can find all the graphs over here like average precision and latency.
Uh, comparison latency or accuracy comparison graph where you can see that this is for the Yolo v ten.
And you can see the YOLO v ten outperforms all the other Europe models in terms of accuracy as well
as, uh, in latency.
Like it takes less time as compared to, uh, other YOLO models.
So what is basically latency?
Latency is basically a time taken to do object detection on an input image.
Okay.
So, like, you can see that your lovely tan, uh, takes less inference time as compared to other YOLO
model and in, uh, comparison to other YOLO models like you can see over here.
Uh, these are the number of parameters in billions.
So you can see that, uh, you know, over ten, uh, uh, basically, uh, the architecture of YOLO
ten reduces the computational overhead.
And you can see that the, uh, they are less number of parameters involved in YOLO v ten as compared
to other YOLO models.
And in terms of accuracy, we can clearly see that the model ten outperforms all the other YOLO models.
Okay.
And I can see that ten comes with, uh, six different models Yolov3 ten, nano, small, medium, large,
extra large, all this stuff.
And here you can see all the scripts are written, how we can do object detection using it and how we
can export the model Onnx format and how we can, uh, train the model on any custom data set and how
we can do the predictions.
And here you can find the hugging face, all these things as well.
And here is the citation.
Uh, the code base is built with Ultralytics.
So they have all provided all the details.
And you can check out these details okay.
And you can simply search it on GitHub and you will find this repository.
And if you just click over here you will find the option paper as well.
And you can review this paper.
And I have already made a video tutorial as well.
And in which I have explained the crux of this paper.
Like what approach uh, approach they have adopt.
Like uh.
We all love it and follow the consistent rule assignment strategy.
Plus they also follow efficient driven design strategy as well.
So I've already explained all these things.
What the normal approach they adopt uh, so that they can boost their accuracy and also uh, decrease
the latency as well in France, latency as well.
So I have already explained all these details in other video.
You can check, uh, the video introductions to Eurovision.
So now in the step number one, we need to clone this GitHub repo.
So you can simply copy this link over here and add up this link over here.
And we will just write git clone and set the clone folder as your current directory.
CD stands for current directory, but please make sure that you have selected the runtime as your GPU
so we are good to go ahead.
So first of all, we'll clone this repository over here.
Uh, okay.
So now you can see we have the clone repository over here.
And now we will install all the required packages.
So now all the required packages will be installed that are required to do object detection on an image,
video or a live webcam feed.
So this will install all the required packages over here.
So this will take few seconds before all the required packages are get installed.
So meanwhile, it gets installed.
Let me show you, uh, the pre-trained model words.
Where are they available?
So if you just click over here, uh, you can find all the pre-trained models weights over here.
Your written small user written nano zero V ten x large and medium and user written large model here.
So you can simply copy the link address over here okay.
So and if you just paste this link address over here uh like simply if you just place this link address
over here, you will find the link to your written nano model weights okay.
So simply you just need to click over here and need to copy the link address.
And you just need to add a link address.
All these model weights link address over here.
And uh I have already done the script.
It will download the pre-trained model weights uh over here into this YOLO written repository.
So in currently all the required packages that get installed.
Uh, so this will take few more, uh, seconds before they get installed.
So now you can see all the packages that are installed.
So now we will download the model weights over there.
So you can see we run this cell.
And all.
You can see that, um, all the models will get downloaded over here, like in.
Fine.
Okay.
Let us get some leads and I will show you.
So now you can see how weird the directory is being created over here.
And we have added all the model weights over here like in find over here.
Okay.
So now we will be doing inference for an image using the pre-trained model.
I have added, uploaded and input image on my Google drive.
So I have just added the link over here and I'm directly downloading the input image from drive into
this Google Colab notebook over here.
Well, good.
Okay.
So now we can see we have the image.
So we will doing object detection on this input image.
Okay.
So now you can see we have the bus traffic lights persons bicycle and all the stuff over here.
Like you can see we have the first pathway as well.
So let's do object detection on this input image.
So we you just sitting right over here cost is equal to detect.
We are doing prediction and we want to save the output image.
And here you will pass the model weights over here you can use any other model weights over here.
Like you can find all different model weights in which we can comes with.
You can use any other model weights as well.
And here you just pass the name of the input image.
You are doing object detection on video.
You will pass the video name over here okay.
And let's see.
Now how it works.
But now you can see we have done detections of one bicycle, 12 persons, one train, three traffic
lights, two bag bags, four handbags are detected and the inference time is taken as 95.5 millisecond,
the time taken to do prediction on this input image.
So let me display this output image over here.
So here we have the output image.
But you can see over here bicycle train traffic lights.
This person which are very far away are also detected with a very good confidence score as well.
Like can see over here and bag backpack.
All this stuff is also detected and it looks good.
Uh, now we will doing a friends on a video using the pre-trained model.
Okay, so let's do this.
I'm downloading a sample video from worldwide directly to this Google Colab notebook over here.
Okay, so let's see how it goes.
So now you can see, uh, all the complete video is being divided into 1314 frames.
And we are doing object detection on each of the frames as well.
And then in the output we get a complete video output as well.
Okay.
So now it will take few seconds to do object detection on this complete video.
The object detection on this input video is being done.
Like you can see for all the 1340 frames.
It's done.
And here we have the output video.
So let me download this output video and show you on the screen how does it looks like?
Uh.
Us.
Well, now you can see over here.
Uh, here we have the output video, but like you can see over here, um, we are able to detect the
cars over here.
Okay.
And the truck over here is also detected.
We have detected, uh, this is a false positive like was shown previously.
Um, but you can see the detection results are good.
Like, we are able to detect the cars truck.
So now you can see over here we are able to do object detection on an image and, and as well as on
the video as well.
And we have written gives quite good results as well.
So that's all from this tutorial.
In this tutorial we have seen that how we can do object detection on an image and on video using uh,
YOLO written.
Okay.
Thank you for watching.