YOLOv9 vs YOLOv8 Comparison on Real-world Videos

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welc to the video in this video here we're going to do some comparisons between YOLO V 8 and the new YOLO V 9 model that has just been released so we have a new member in the YOLO family we now have YOLO v9 and in this video we're going to do some comparisons so we're both going to test a bunch of different versions We have the Nano small medium and all of those models with yolo V 8 and then we also have some new variations with yolo V 9 we're going to do some comparisons on some complex videos different scenarios different classes and so on both on different image sizes and I'm also going to show you how we can both do in with Yol 9 and Yol 8 so you can both test it out on images videos your webcam or whatever you have directly with only a few commands or a few lines of code so first of all here let's just jump straight into the YOLO 9 GitHub repository if we just scroll a bit further down we can then see these benchmarks where they're comparing the new YOLO v9 model and this Galan model with all the other YOLO models and versions out there so right now we can see that this is the new state-ofthe-art model but is it act like the new stateof the-art model how does it compare compared to Y8 when we're actually running it on practical examples practical use cases and data sets just because we have a new state of the model here on the Coco data set it doesn't mean that it is the best model to use for your own custom data sets we might find situations where Yol 8 Yol 6 Yol v 7 are act like better compared to the newer models coming out so it really depends on your data set and application so one thing that we're going to take a look at is how good is this model at detecting objects like smaller objects at a distance in the camera and then also like how consistent is it add actually like keeping detection so it's not flickering too much back and forth so we're going to take the same videos compare them Y8 y 9 and then we're going to see who is still the superior which of the models should we use in our own applications and projects going forward so if you just go a bit further down we can then see we have these new variations so we have the small medium model and then we also have the C and the E version and you can kind of like see the comparisons up here so if we're taking for example the model here with 25 million parameters so it is the C model if we go and take a look at it 25 it is around here so that is comparable to the medium model from UL V8 so those are the two main models that we're going to test out just to do side by-side comparisons because again here we can see that it it acts like has the same mean position but the model size is half the size of the UL 8 model but that doesn't mean that the new model is act like faster compared to ul8 so let's definitely test that out as well if we scroll a bit further down we can actually see how we can run the results to have it tech. P file which we can directly use as we're using the commands from Alo litics with their YOLO command so we only need to specify a few arguments and also the source that we want to do inference on and then we are and running and we can do our comparisons so let's not jump straight into code and let's just see do some comparisons over here to the left I have a bunch of wios that we can try to run through so we're going to run through some of them I think this might be actually like prettyy interesting to run through because we have a lot of small objects we have some cars very far away let's see if we're able to actually do detections with this new uv9 model compared to UV 8 and also just to see like how does it perform on small objects how fast does it run we're going to get like the the milliseconds that it takes to do inference for single image both for Yul V 8 and also Yul v9 so we're going to compare that we're going to throw different videos we're also going to test different image sizes so we're both going to test 640 um and also 1280 so if you're running 1280 you won't really get realtime performance compared to 640 so you definitely need to run 640 if you want to run real time performance we also have these packs here so basically just suitcases running at an airport when you're going to pick it up so we're going to see how it performs on that I guess it would probably be pretty similar to this one here but I really want to test it out on some of these um some of these images as or videos as I showed here which is very complex and this will give you a way better understanding of and overview how these models compare to each other so we also have other bunch of different videos in here that we can throw through it uh this might also be pretty interesting where we have some different scenarios we both a cars we will have some pedestrians here walking on the sidewalk so this is also a pretty cool use case so if you want to run these models for the Yol V8 you just need to clone the ultral litic GitHub repository and for Yol 9 the YOLO 99 GitHub repository then you can use the T scripts from both of the Frameworks and you can run them directly I've already cloned the YOLO 9 here as you can see and then we have the text script we can directly run that I even have like just um the code here or like the python script that we need to run so we need to specify the image size the confidence score the device the weight files so I've just download weight files from the GitHub repository as well where Al L it will download automatically if it is not downloaded already and then we just need to specify the source here you can specify the source either your webcam image file or a video file as in this example so we can directly take this one here let's just run example so you guys can see how it works just minimize this open a new terminal and let's now open a new command prompt there we go so first of all here we need to CD into our YOLO directory and then we should be able to run our Command directly I've not done any changes just pasted it in here so there we go it's going to open it up it will look similar to YOLO V 8 so right now we can see that it's running inference around 75 milliseconds um for processing a single image we can even see here the postprocessing also the pre-processing the number of object that and types of objects that is detecting so this is the city road cars traffic so here we can see a model running this is the YOLO 9C model we can see that it pretty much the all the cars here driving around in this video as we can see we get some false predictions down here for traffic line but it is really low confidence score again we're not filtering our results based on that right now but pretty much all the cars here driving on the road is act like detected you can even see the cars up here in the top left corner when they come up here even on in the top right corner it is pretty much detected all over the frame this is on 1280 images so this is rather large IM resolution you can also see it's a bit laggy and we're running around like 75 millisecond so that's around 15 frames per second so it's not real time I'm running this on a 3070 graphics card so this actually looks pretty cool we can just try to see the results directly if we go up and change the image resolution so right now we can just set the image resolution to 640 and you'll probably need to run that if you want to have real-time performance Doesn't Really Matter What GPU you're using and that is often the case that we're just running on six40 so let's just try to see it it's just going to open up the exact same thing right now we can see that we missed some cars here here um in the line going down on the highway but we still get some pretty good detections pretty much all the detections here we can see it's flickering a bit more we still get some false predictions down here for the traffic signs but generally here we can see that we're still detecting all the cars at least the cars driving here it is a bit difficult to detect these cars over to the left we miss some up at the top right corner but now we basically also have like half the size as we had before so this is with the new Yol v9 model C version we can also try out the E version which will probably be slower but let's just try that out we just need to swap out this one and we're going to run it and let's see the result so this is just on the 640 just so we can pair that side by side so we see that this model here is not as good as the other one we're not really detecting like as many cars driving here we see that we missed a lot of detections in the middle of the frame so this model is not as good as the other one we can also see the confidence score is rather low like some of them are down to like 20 or something like that so this is not as good as the other model but again if you're upscaling the image using 1280 would pretty much detect every single car in this video so here we can see side by side the comparison of Y v9 and also YOLO V 8 by just looking at these predictions for this single video here it looks like that the YOLO V 9 model is act like better compared to the YOLO V8 model on smaller objects as we can see when these cards here up at the top of the image which is actually like very far away from the camera position so these are very small objects and I don't feel like Yol 8 is capable of predicting those cars even though we're using like 12 80 um images and also using some of the larger models with ulv 8 but if we look at the inference time y V8 is still faster compared to yv9 and I feel like that is generally like the case when I've been testing out different videos and so on and also the different model variations so if we're taking a look at these backs and suitcases running on this conveyor build at an airport we can actually see that a f y V8 performance better compared to Y 9 it both red faster but it doesn't get as many false predictions here and there we can also see for the yv 9 it had like a very large prediction in the front of the frame like sometimes it just detected everything as a ship and we also got some overlaps here and there with persons walking in in and so on where it had multiple detections even though it was the same person also for the inference speed the Yol 9 model would act like running with the pytorch model so this is not optimized for onx tens RT or anything it's just a raw pytorch model that I'm using with the framework and so on which is buildt off on top of that but for in inference time with the Yol 9 model it was around 24 25 milliseconds per image so this is basically just how long it takes to process a single image but when I was using the Yol 8 medum model which is comparable to the Yol 9 C model then it acts like significantly faster and it runs around 10 11 milliseconds to process a single frame so that is significantly faster like two and a half times faster compared to the uv9 model so it is slower even though they act like mentioned that the model size is significantly lower as well for the Y v9 models but there's definitely a trade-off with both models as always you can get the best of both world you definitely need to test out both models just because they mentioned that yuv 9 has better performance on the benchmarks like the koca data set that doesn't mean that your model will be better if you're using that on your own data set compared to Yu V 8 you also need to take a look at the model sizes just because the model size is smaller for the U v9 model compared to the Yu V8 model it doesn't mean that it actually like runs faster at least for the ri raw pie charge models so I think these are some pretty cool comparisons we definitely need to test it out way more the Yol v9 framework and so on around the models need to mature a bit more and so on but again this is just to give you guys a better understanding a better overview so you don't just like go with Y 9 because like it is the new uh version and is superior on the benchmarks compared to y v 8 so definitely test both out so I hope you have learned a ton of this video here I hope it gave you a quick overview over some of the benefits and also some of the downsides by using these models so thank you guys for watching this video here if you're interested in any of my courses definitely go ahead and check them out on my website we both have optic tracking we go over all the theory research papers how you can Implement model architectures directly en code from scratch again if you're interested jump into my website check them out or else I just SE X guys until then Happy learning
Info
Channel: Nicolai Nielsen
Views: 10,715
Rating: undefined out of 5
Keywords: object detection yolo, object detection python, opencv, opencv dnn, Yolov9, How to Train Yolov9, Yolov9 Custom Obejct Detection Model, Yolov9 Object Detection, Yolov9 Tutorial, Opencv Yolov9, Object Detection with Yolov9, Deploy Yolov9, How to run inference with Yolov9, How to train custom object detection model, Yolov9 the new state of the art model, How to train custom Yolov9 model, Yolov9 vs Yolov8, Yolov9 Setup and Train, Yolov8 vs Yolov8, Yolov8, Yolov9 compared to Volov8
Id: rhkYmQ5J3-w
Channel Id: undefined
Length: 10min 44sec (644 seconds)
Published: Tue Feb 27 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.