YOLOv9 on Jetson Nano

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone my name is arohi and welcome to my channel so guys in my today's video I'll show you how to use YOLO v9 on jiton Nano before moving to the implementation part let's see what all modules are required and we need the specific versions of you know uh this torch and torch Vision open CV I'll show you all those uh requirements and I will also show you how to install those particular requirements to run this YOLO v9 so first we are running this jtop so when you run this jtop command over here on info click on this info and the first thing is the jetpack version we have is 4.6 okay so after this jetpack version just see the python version python version is 3.6.9 so when you install this jetpack SDK 4.6 so with this you get this python version by default python 3.6.9 but guys here see this open CV when you you know uh install this jetpack SDK in your Jetson Nano at that time the open CV version which you get by the default one okay that open CV version was not compiled with Cuda but for running this YOLO v9 on jitsen Nano we need open CV version which is compiled with Cuda so here you can see this I have done the steps manually so I'll show you how to do that but right now just see that my open CV version is 4.5.1 and it is compiled with Cuda Yes means it is compiled with Cuda so when you run this jtop command and if your open CV is not compiled with Cuda that means you will face problem while running YOLO v9 on videos or on you know for images it will work fine but when you'll test YOLO v9 on videos or on webcam at that time you will face problem so it is mandatory to compile the open CV with Cuda now let me show you there is a video on my channel which shows how to install this successfully step by step let me show you that video so here just on YouTube just search Jetson Nano tutorial and this is my playlist learn AI on Jetson Nano open this playlist and on this side you can see the third video lecture three install open CV on Nvidia Jetson Nano just click on this video this video will show you the stepbystep um way it will show you all the steps how to install open CV on Jetson Nano which is compiled with Cuda all right so after you successfully done this just let's quit now we have to check the torch version and torch Vision version so guys when we um you know there is a YOLO v9 GitHub repo official GitHub repo let's open that repo so that I can explain you better let's write YOLO v9 so this one is the official YOLO v9 rapper so here so guys when we uh when we try to run this YOLO v9 on our Windows machine or our on our Linux machine at that time what we do we simply clone this GitHub repo and then we just run we just install all the requirements using this requirements.txt file okay so guys when we want to install this torch and torch Vision on our Jetson Nano at the time we follow a different uh way to install this torch and torch Vision now let me show you the versions first which I'm using of torch and torch Vision then I'll show you how how you can get those particular versions okay so okay so this is Python 2.7 we don't want to work on this so let's Python 3 version so this is a Python 3 version so but guys as I've told you earlier also that I always prefer to work in a separate environment so I have created a separate environment the environment which I am using you can follow these steps and you can have the same environment and after that you just need to activate the environment like I am going to activate now source and then write the environment name after that bin and then activate now our environment is activated here you can see now let's open a python shell here you can see we have python 3.6.9 here we will check the torch version so this is my torch version and it is compiled with Cuda okay now I'll show you the torch Vision version so this is my torch Vision version guys you need this torch version and this torch Vision version now how you can get these versions for that I have another video in my tutorial list here the this fifth one YOLO V5 on Jetson Nano P torch and torch Vision this one this lecture five this lecture will show you step by step how to install torch and torch Vision which is compiled with Cuda and which will work perfectly with your uh YOLO v9 all right now we know the torch version torch Vision version and the open CV version now we are ready to run this YOLO v9 how to run this YOLO v9 now first let me show you the these are the different folders and I have created one folder with this name you can also create any folder so in this folder basically I'm running all the YOLO v9 code in this so let's enter in this folder and let's see what we have in this so when you open this folder here this is the official YOLO v9 GitHub Rao this is my Jupiter notebook where I've just written the commands which I'm running and this is the image on which I want to perform test and this is the video on which I want to perform the testing so how these are the steps so this is how you'll clone the GitHub Rao and then you'll enter into the YOLO v9 folder this YOLO v9 folder let's open let's enter in this YOLO v9 folder all right now we will run a command to test the image first so the command will be python detect. py then you will provide the weights um then we will provide the weights this weight is a pre-trained weight of YOLO v9 and this pre-trained weight is trained on Coco data set so I'm just using this weight file and guys you have to download this weight file and you can download it uh like this or you can simply go to the repo YOLO v9 repo scroll down and here this is the weight file just click on it and you will uh get this file in your downloads folder then from your downloads folder put it in your YOLO v9 folder all right so let's go back to the code weit file given now let's give the source on which we want to perform the testing so my source is test do PNG now let's run it so here you can see torch version is this and it is compiled with c and this is the GPU it is it is using right in the python version is this here you can see the speed it took this much of time to process this image and the results are stored in exp 4 now let's open this exp 4 folder and see the output so here it is just scroll down here is this is my folder YOLO v9 implementation and inside that we have YOLO v9 folder and then you will have a runs folder here detect exp 4 and let's see the output so this is the output right so guys this is how you can test YOLO v9 on this Jetson Nano now let's suppose if you want to try it on a video now let's do that so in instead of this image now I will write test. MP4 as this is taking time so I have already executed this command once before this this tutorial so I'm showing you the output on the video from that okay let's close this so here I have that video so test. MP4 let's run this so this is the output of that video all right so guys this is how you can use YOLO v9 on your Jetson Nano and I hope this video is helpful so guys if you like my content please like share and subscribe my channel thank you for watching
Info
Channel: Code With Aarohi
Views: 3,121
Rating: undefined out of 5
Keywords: yolov9, jetsonnano, computervision, yolo, objectdetection, yolov8
Id: EsZHGoY6vqo
Channel Id: undefined
Length: 10min 35sec (635 seconds)
Published: Tue Mar 12 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.