Train YOLOv10 on Custom Dataset

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 we can perform object detection using Y YOLO v0 so first I'll show you how to use pre-train YOLO V1 model and after that I'll show you how we can work with custom data set so let's start and guys if you want to learn uh what is new in Yolo v0 and for that topic I have a separate video you can check that video in this video I'm going to focus on the Practical implementation only so this is the GitHub repo which we are going to implement today we are going to clone this repo and then we will set up our environment to run this code so let's start first thing is let me show you the python version I'm using so this is the python version now we will clone the GitHub repo right get clone and then just copy it from here and paste here and hit enter you will have this YOLO ven folder in your current working directory I'm not running this cell because I have already executed this code and I have this repo in my current working directory so see here this is the repo I have clone and this is the Jupiter notebook this Jupiter notebook which I'm showing you once you clone the repo we need to enter in that yolow v0 folder so now we are inside that yolow V10 folder next step is to install the requirements and for that we will run this command P install dot just write this command and hit enter after that you will have your environment ready now to use the YOLO ven pre-train model we need to download the YOLO ven pre-train model weight and there are different variants of YOLO V1 available let's see here see this is a nano version small version medium version and b means the balanced version L large version and extra large version so you can download any weight file from here and then we can perform testing on it so let me show you how we can download the weight so I have written this script so here in this URLs I am writing the path of all the weight files pre-rain weight files of YOLO ven so with this cell when I'll hit enter you will get get a weights folder in your current working directory and in that weights folder you will have all these weights installed so let's open our current working directory inside this YOLO V10 here is my weights directory and here you can see the weights are getting downloaded so right now we have four weights and script is still running you can see we have all the weight files inside this weights folder which we have in Yolo ween folder okay so YOLO ween folder is our repo inside that we have weights folder and here we have all the weights Now using these weight files we can make predictions so let's do that so this is the command here task detect mode is predict confidence score save true means you want to save the output and here you will provide the path of the pre-train model so we have a pre-train model in weights folder and I'm using a nano model over here you can use any model and then here provide the source on which you want to perform prediction so I am performing prediction on this one. jpg image which is present in this test images so hit enter so I have to paste this test images folder in our current working directory so this is our code and here I pasted the test images folder inside this this is the this is the image on which we want to perform the testing okay okay now let's run this script again so you can see results are stored at this location now let's open this location and see the output Yow V1 here is the Run folder detect predict and here you can see the output 17 means 17 in Coco data set 17 means the horse class okay now let's see how how to train a custom model so if you want to train your custom model you need a custom data set for it so for my today's tutorial the data set which I'm using is license plate recognization which only have one class and the class name is license and here I have given the path of training validation and test images now let me show you the data set so here custom uncore data set I have pasted the custom data set folder this is my Jupiter notebook and here is the custom data set folder let's open it and here we have train valid and test folder let's open the train folder here you will see two folder images and labels guys this is a very small data set it only have 210 training images and you will have the corresponding 210 labels in the labels folder in the same way for validation images are present in images folder and labels are present in labels folder so this is the data set and to download this data set I have provided the link in description section you can download this data set from there this is our custom data set. yl file this file is important because this file tells your model where your data set is on which you want to train that particular model so here I have given the path of training images validation images and test images now let's train the model model so to train your model you will write this command YOLO task detect mode train and here you will write the number of epoch you want to train your model and batch size plot through model so I don't want to train my model from scratch so we are using a YOLO ven Nano model and we are fine-tuning it on a custom data set and then you will provide the path of your custom data. file this file have the path of your custom data set and then you will hit enter I am not executing this code because I have already performed but when you'll hit enter inside the this runs folder okay here you will see a trains folder like this here you will see the confusion metrics and inside this weights folder you will see the best and last weight we will use the best. PT file in some time to perform uh license plate detection and here you will see the confusion Matrix and we have only single class so that's why we have a confusion Matrix with single class and if you want to see the results like different plots you can see the map value uh when the threshold value is 50 and the map when the threshold value is between 50 to 95 so all those things you will get here now let's use the trained model this train model to make predictions on images and videos so to perform testing on a image so this is the image and this image is present at this location and here I have given the path of the trained model so our train model is best. PT which is at this location save true will save the results in runs folder and this is the confidence score I'm using and mode is predict when you'll hit enter you will see the output in runs folder so just copy this from here and place here now let's run it again here see you will see the results at this location now let's go back to the folder runs detect predict to and here you will see the result we are getting license plade detected now let's test this model on a video so here I'm giving the path of this video okay now let me paste that video first in the folder so this is the video based in this over here now let's run it so so it so we have the results stored at this location predict 3 now let's open the predict 3 folder and see the output so guys this is how you can perform object detection custom object detection using YOLO vtin so I've given the link in description section you can get the code and you can try it 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: 9,508
Rating: undefined out of 5
Keywords: computervision, yolov10, objectdetection, yolo, yolov8, yolov9
Id: Dmv4EVBuCTQ
Channel Id: undefined
Length: 9min 41sec (581 seconds)
Published: Sun May 26 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.