Quick and Easy Object Detection on Custom Data using Yolov8 in just 10 minutes !!!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
thank you hi guys this is your DK here in this video we're gonna see the latest version of yellow which is yellow V8 and we're going to see a practical end-to-end demonstration of custom object deduction using YOLO V8 and roboflow uh the best part of yellow V8 is like you don't want to download the package externally from the Git You Can directly do it using the PIP command but I was facing some issues when I try to do the PIP in my local uh but it worked fine in the Google collaboratory and also a big thanks to the roboflow uh which is an open source store which helps us in creating the data set and annotating it and exporting it in a very easier and quicker way yeah instead of wasting the time let's jump into the demo yeah first we need to create the data set for that we are using the roboflow uh a big turn of thanks to the robo flow block which explained uh in a detailed way how to create the data set and try using yellow p8 model I just mimic the steps and I'm gonna show you the demo for that we need to create a workspace so I'm going to create a workspace a new workspace for the demonstration so for that you can create a workspace here and you can make it as Hobbies since I'm doing it for a hobby I'm gonna give my workspace name as demo and continue uh I don't want to invite any of my friends uh Community version which is public free for everyone okay so I don't want to explore anything so what is the type of project I'm gonna do I'm gonna detect the image using the bounding box so I'm going to select the bounding box over here uh what I'm going to direct detect is my uh whey protein Shaker so I'm gonna give Shaker over here I'm gonna give a project name as uh bottle detection something like that and I'm Gonna Leave other drop downs as it is I'm and I'm gonna create a public project over here okay for that I need to upload some images so I'm gonna upload some of my images which I've already uh saved in my machine let me go to that particular path so this is for the testing purpose I mean demonstration purpose I'm just using just five to six images for training the model and show you a demo so let me select some of the images from here and I have kept a separate image for the final validation so which is inside this so let me try to create the data set okay so I'm gonna select these four images for my training let me open it okay once the image is selected you can use Save and continue okay and you can you if you want to uh involve your friends in creating it assets when you face the real uh time projects right you will have lots and lots of images it will be difficult for a single person to do annotations so if you want to invite some of your friends or teammates you can use that email that you can invite them since I don't I'm doing it by myself I'm gonna assign the images to myself itself okay the images are ready then I'm going to annotate it so here uh you have something where we can drag and drop and annotate it actually so basically what it does is like it captures the coordinates of this particular uh water Shaker portal uh from this whole image so I'm gonna create an annotation uh I'm gonna name it as Shaker save and enter I'm gonna go to the second I'm gonna do the same for rest of my images save and enter and next and save and enter next and save one enter so yeah and that's it then so I'm gonna go back uh you can see all the images has been annotated as the image data set so I'm going to add these four images to my see if you want to split between prime test you can do it so I'm gonna assign all the four images to my training since I have low amount of data so again I'm gonna upload the image uh upload the image for my testing so I'm gonna choose uh these three image I mean a last two image for testing actually and I will keep another image for validation so save and continue again you need uh to sign in into this Robo flow using your Gmail for the first time so I'm going to repeat the steps which I did for the other images uh so these are images which is taken in two different places C1 enter and back add images so this is going to be my testing set and add images and now I'm gonna upload a single image for my validation and again guys this is just to see the performance and to explore for learning purpose if you uh do for the Real Time Project you might be having lots and lots of images and you need to annotate it in a better way okay the upload is completed an assigned image okay so I'm gonna click it and I'm gonna drag it so yeah done that's it okay back add one image to the data set so this is going to my validation set so that's done so I have added all my trying test and validation everything and I'm gonna create a new version out of it so if you want to do some pre-processing they are giving you some default pre-processing steps like resizing and other things I'm just gonna leave it as it is I'm not gonna ex I mean explore the so let me have the default configuration and let's see how it works so this is creating uh my image data set so everything is done so what I'm gonna do is like uh we can directly import the data set from Robo flow to our Google Cloud for that you need to give see we can see the version like which one you need so I'm going to use the YOLO V8 which is the latest one so get snipper that's it so this is the piece of code here your API key will be masked but when you paste it it will be uh it will be present actually so this is the piece of code for you to interact to the robo flow UI and get the data set so you can see this is my project name which I created and this is my workspace ID uh that's it so this is the version and this is my API key so let's jump into the demonstration directly uh I have mentioned them step by step the first step is like create an image so we have done it using the roboflow the second one is like importing the YOLO V8 package so the best part of this is the pp install so I have already opened my collab notebook okay yeah let me do a paper install uh and again thanks to the ultralytics for making the developers life much easier okay the packages has been installed so yeah upload an image and check uh the install package is working fine or not okay so what I'm going to do is like I have already an image so already we have a YOLO V8 which is already been primed on a different classification of images I'm gonna check whether the Euro V8 is working fine in my machine or not so for that I'm gonna upload one of the random image like which I downloaded from the internet so I'm gonna check whether the Euro V8 model is able to predict this uh correctly or not so this is the code so this is the downloaded image so I'm just giving the path of the downloaded image over here uh so it is trying to predict and it says like the image has been predicted and the predictor images has been kept inside the runs uh yeah inside the runs and predict folder inside the runs detect and predict folder let me use a python code to visualize it actually so I'm just importing it and so I already have the code handy so I'm just copy pasting it so download.jpg so I'm just changing the size of the image to 500 for the better visualization so I'm gonna run it so you can see right uh the YOLO V8 model is able to predict the custom Euro V8 model which is already been available is able to predict an image as a dog so now let's try to uh train our custom data set so for that what we need to do is like uh this is the piece of code which has been given by the roboflow so I'm going to import my data set right so I'm gonna copy paste it that's it once you have copy pasted it okay let's then so it is importing all the I mean the images and annotations which is over here which it is trying to import it into uh your Google collab notebook so so it's been done so this is the piece of code guys to train the model so here uh if you want you can change the epoch uh Epoch to 100 or 200 or whatever it is so since uh I'm gonna I'm gonna I'm performing just for the demonstration or learning purpose I have uh limited the epoch to 50. so basically it's using the Euro V8 default pre-trained model and it's gonna use the my yaml file which is the annotated file which has been created by the roboflow and I'm gonna try in my data so I'm just gonna run this piece offline that's it so it's gonna run for uh 10 to 15 minutes uh So based upon your I mean the image weight so I'm just gonna pass the video and we will join back once the image prediction has printed I mean the training has been done yeah hi guys uh my image training has been completed successfully and it has mentioned like all the results has been saved in deduct underscore train actually and you can go inside the direct folder and you can see the train it has captured a weights of each and everything and even it has captured the configuration I mean sorry the confusion Matrix and other details and even it has done some validation it has captured all the details uh okay the training is done now uh you can see there will be a different weights over here uh if you go inside the wage right there will be a different way it's the best weight and the last weight whatever it is so we're gonna use the best weight uh which has been trained and we're gonna try to predict the image so what we're gonna do is like yeah okay so now we're gonna predict an image so for that I have kept an image separately uh which is uh inside this so I'm gonna upload an image to the Google collab okay okay so I'm gonna upload an image okay so this is the image name let me rename it uh okay testing I'm gonna rename it as a testing so it's uploading right take some time to upload okay I was hit uploaded no testing it's not there it's still loading okay let me refresh it uh where it's the where is the image oh oh here somewhere okay so let me copy the path I'm just gonna uh I mean change the path over here that's it oh this is the weight uh so this is the button so uh I'm gonna task is equal to detect uh which is which you just used to detect the uh image and uh mode equal to predict and what is the model I'm gonna use I'm gonna use the best weight and uh this is the source actually so let me try running it okay so what it's saying is like it has a predicted and the result has been stored in predict three uh so deduct and predictory this is my image so let me visualize it using a python code so yeah so I'm gonna paste this path foreign [Music] yeah it is able to predict my shaker out of the image which has been given yeah that's it with the demo uh I will paste the code Below in the link in the description uh thanks for watching the video and happy learning
Info
Channel: Tech with DK
Views: 7,723
Rating: undefined out of 5
Keywords:
Id: _H4irxuLflA
Channel Id: undefined
Length: 14min 52sec (892 seconds)
Published: Thu Jan 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.