Train pose detection custom data Google Colab Yolov8 | Keypoint detection | License plate detection

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey my name is Felipe and welcome to my channel, in  this video I'm going to show you how to train a   a pose detector using yolov8 and I'm going to show  you how to do the entire process on Google colab,   so let me show you the first thing you should do  in order to work on this tutorial is to create   a directory in your Google drive, this is a very  important step because this is the directory we   are going to use in order to upload the data we  are going to use in order to train this model and   it's also the directory where we are going to  upload all the files we need in this training   process, so this is the first step in this process  please make sure you create a directory in your   Google Drive, now let me show you the data we are  going to use in order to train this pose detector,   let me show you the data I am going to use, but  obviously you can use whatever other dataset   you want, if you want to follow along this tutorial  you can obviously use exactly the same dataset I   am going to use but I'm going to show you a very  generic process which you can apply to absolutely   any other dataset you want right, as long as the  dataset complies with a given structure with a   given format you can definitely use it in order  to train this pose detector, now let me show you   a few samples so I show you how the data looks  like, you can see that this is a license plate   keypoint detection dataset and this is how the  data looks like this is only an example of how   the data looks like, you can see we are going to  detect license plates and we are going to detect   these four keypoints we have over here, 1 2 3 4,  which are the corners of the license plates right   so this is exactly the pose detector, the keypoint  detector we are going to train today we are going   to detect these four keypoints of the license  plates right for example this is another example we   have two license plates and in each one of these  license plates we have these four keypoints over   here right let me show you another example you  can can see this exactly same situation we are   going to take these four keypoints over here  and so on so this is the data I am going to use   in this process but remember in this tutorial I'm  going to show you a very generic way to train a   pose detector which you can apply to whatever other  dataset you want, now let me show you something   which is I have already downloaded this dataset  into my computer so let me show you how the data   looks like, you can see we have three different  directories which are called test train and valid   and if I open one of these directories you can see  I have two folders one of them is called images   and the other one is called labels, images is the  directory which contains all the images right let   me show you a few of them you can see that these  are images with cars and license plates so this is   how the images look like but let me show you  something which is very important and it's the   labels the annotations because remember we are  going to train a pose detector we are going to   detect four keypoints and we definitely need to  provide the information of where the keypoints   are located for each one of these images and this  is how the labels look like right you can see I   just opened one of these files and this is how we  are providing the information to yolov8 and you can   see that this looks very weird this looks very  crazy this looks like it doesn't have any sense   whatsoever it doesn't make any sense whatsoever so  this is exactly the format we need for our labels   right this is exactly how we need to specify the  labels the annotations and something that's very   important is that this video, this tutorial, is  a very quick and a very high level description   of the entire process of how to train this pose  detector but I am not going into the details of   everything that's involved in this process if  you want more details of absolutely everything   that's involved if you want a much more detailed  and a much more comprehensive explanation of the   entire process and if you want to make sense  of these labels you see over here of all these   numbers you see over here then I invite you to  take a look at other of my previous videos where   I show you exactly the same process how to train  a post detector using YOLO V8 but in a much more   detailed and a much more comprehensive way, in that  other video oh my God I show you so many details   and for example I show you how to make sense of  this data over here I show you how to create your   own annotations in case you are training this  pose detector for your own custom data I show   you how to annotate the data how to create all these  labels and so on so if you want more details of   this process and if you want to make sense of  these numbers of these very crazy numbers you   can see over here then I invite you to take a  look at this previous video which I'm going to   be posting over there, and now let's continue with  this process and the only thing we need to do   now is to take this folder which is called data  and we need to compress this folder and we need   to create this file which is data zip and  once we have this file the only thing we need   to do is to get back to our Google Drive and we  need to upload this file into our Google Drive, in   my case you can see that I have already uploaded  this file in my Google Drive so I'm not going to   do it again but please make sure to upload the  data into your Google Drive in order to continue   and then another file which is very important  is this config dot yaml file let me open this file   to show you how it looks like and this is a file  which contains very important configuration for   this training process this is where we are  specifying what's the location of the data   we are going to use in order to train this model  also all the keypoints how many keypoints we   are going to detect how many classes we are going  to detect this is a very important file with some   very important configuration we need in order to  train this model and remember in this tutorial I   am not going to show you all the details which  are involved in this configuration file if you   want to know more more details if you want a much  more comprehensive explanation of all the details   which are involved in this file then I you to  take a look at the previous video I mentioned a   couple of minutes ago but for now let's continue  this is a very important file we're going to use   in the next step in this process which will be  to execute all the cells in this notebook right   remember this is the notebook we're going to use  in order to train this model and the only thing   I'm going to do now, the only thing I'm going  to do is to execute all the cells in this notebook   one at a time and that's going to be pretty much  all in order to train this pose detector so let   me show you, the only thing you need to change  in order to make it work on your side on your   computer on your Google colab is to change  this value over here which is the location   of your data in your Google Drive you can see  in my case it says my drive train yolov8 pose   detection Google colab data.zip which is the location  of my data in my Google Drive you can see that   this is how how this directory is called train yolov8  pose detection google colab and then the data is   located here and it's called data.zip so just make  sure you change this value to whatever location   you have chosen for this file and that's going to  be pretty much all and obviously you also need to   change this other location which is the location  of your configuration file in your Google Drive   so just make sure you change this value as well  and everything else will be just the same so let   me explain super quickly all the cells in this  notebook in this cell over here we are going to   mount google drive into Google colab this is a very  important step because we want to access all the   files in our Google Drive we want to access these  two files in our Google Drive then the second   step in this process will be getting this file  getting the data.zip file from our Google drive into   this Google colab environment and then we are  going to extract all the content in this Google   colab, then then the next step in this process  will be installing ultralytics this is a very   important step because this is the python package  we need in order to train this model so it's very   important we install ultralytics and then the  next step in this process will be training the   model so you can see that these are only a few  instructions we are creating a new variable and   then we're calling model dot train and we are just  providing the location of the configuration file   and we're also providing for how many epochs we  are going to do this training process you can   see in my case it says 50 but you can just select  whatever value you want for your training process   you can just train this model for as many epochs  as you want so let me show you how I execute   all the cells up to here and then I'm going to  show you this other cell which is getting all   the results from this training process I'm just  going to execute all the cells one at a time and   I'm going to resume this video once the training  process is completed okay now the the training   process is completed so we can just continue and  executing all the cells in this notebook was a   very straightforward process so the only thing  you need to do is to execute all the cells one   at a time, now let me show you this all the output  we created once we execute this model you can see   that there is a huge output and this is going  to give you a lot of information regarding the   training process let me show you if I scroll  up... over here you can see that for all of our   training epochs we have a lot of information of the  training process we can see what's the loss value   and we can see a lot of information which is very  important so this is all the output we got once   we train this model and now let's get back here  because now the next step in this process will be   to get all the results from this training process,  let me show you something if I scroll down again   you can see it says results were saved here in  runs pose train7 so this is where we have   saved all the results from this training process  and now the only thing we need to do is to copy   these results into our Google Drive so we can  just download these results and we can analyze the   results and so on right, you can see it says train7  because I have already trained this model   many many times when I was preparing this tutorial  so this is the seventh time I trained this model   and this is why we are saving the results here  and also pleasee remember to change this value   before you execute this cell, this has to be the  location of your directory in your Google Drive   now I have already executed this cell so I have  already copied the results into my Google Drive   so let me show you if I go back to my Google Drive  you can see that this is the directory which is called   runs, if I open this directory you can see I have  another directory which is called pose and then   I have all these results from all the training  processes I have done so far this is the last one   which is train7 and you can see that this  is a lot of information to just knock yourself   out analyzing all these training process all the  performance of the model and so on, so I'm going to   show you a couple of images I'm going to show you  this image over here which is a very quick way to   analyze the performance of your model right this  is how the predictions look like on a few images   and if we see a few of them for example this one  over here you can see that we are predicting the   keypoints very accurately, maybe it's not  a perfect detection but I would say it's a very   good detection anyway we are detecting all the  corners of this license plate the same goes here   the same goes here, here... also here, I would say we  have a very good detection with this model so this   is a very quick way to analyze the performance  of this model with only a few samples this is the   same over here with some other images so you can  see it's not perfect we have a few mistakes,   but this is... I would say it's a very good model  nevertheless so this is going to be pretty much   all for this tutorial this is how you can train  a pose detector on your own custom data using   yolov8 and remember this was a very quick and a very  high level description of this process, I didn't   show you all the details which were involved  in this process and if you want a much more   comprehensive explanation please remember to take  a look at the other video I showed you before and   in that other video oh my God I show you so many  details and I show you for example how to evaluate   the performance of this model but I show you in  a much more comprehensive way right I show you   how to analyze this plot you have over here which  is all the results from the training process this   is a much more detailed video which I definitely  recommend you to watch but this is going to be   all for today my name is Felipe, I'm a computer  vision engineer and see you on my next video.
Info
Channel: Computer vision engineer
Views: 1,349
Rating: undefined out of 5
Keywords:
Id: eFmLMXDE36I
Channel Id: undefined
Length: 12min 54sec (774 seconds)
Published: Tue Jan 16 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.