Python: Real-time Single & Multiple Custom Object Detection with Colab (GPU), Yolov3 and OpenCV

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] [Applause] [Music] in this video we are going to learn how to perform real-time single and multiple object detection z' under the environments of collab and to be specific we are going to Train Yolo with custom objects in collab and apply the triangle network to perform custom object detection with the use of open C we you only look once Yolo is a state-of-the-art real-time object detection system Yolo is a deep learning algorithm which came out in May 2016 and quickly became so popular because it is so fast compared with the other deep learning object detections models traditionally recurrent convolution new network applies regions to localize the object to perform object detection which means that the model is applied to multiple regions within an image and then the model compute scores to an image at multiple locations and scales high scores regions of an image are considered as an object is detected on the other hand Yolo use a totally different approach instead of selecting some regions they apply a single neural network to the full image and predicts bouncing boxes and probability for each region these bouncing boxes are weighted by the predicted probabilities and if the probabilities are higher than the first hole that can be set by the users the object is considered as detected since it's only scans an image once to make the predictions as compared to other algorithm which requires multiple scans it is faster in practice and that's why this is called you only look once Yolo the latest versions of Yolo is Yolo version free Yolo worship free use a few tricks to improve the training and increase the performance including multi scale predictions a better best boom classifiers and few more minor techniques this recent version is more powerful than the basics Yolo and also the Yolo version 2 and in this video we are going to apply the Yolo version free Yolo worship free is extremely fast and accurate as shown in the picture in mean fh positions measured at 0.5 Yolo version free is about four times faster than the other algorithms also you can easily trade-off between speed and accuracy simply by training changing or letting the size of the models without with training the models again our inputs can be in three forms image file where can free video files and with the use of the P train the yellow models it can detect up to 18 objects such as person bicycle car motorbike aeroplane us and etc if you want to know more about that you can refer to the cocoa files for details before we move on I want to introduce a transfer learning concept which is a very important and interesting benefits of applying deep learning network because where we often we are solving a difference but yet somehow similar problems to take advantage from others work and to speed up our training process we usually can reuse partly or wholly from others picturing the network to accelerate our own training and solve our own problems in deep learning this concept is called the transfer learning this means that we're using the race in one or more layers from a petri net neural network model in a module model by keeping the rate and fine-tuning the rate or adapting the rate entirely when training a new model so to customize our own object detection we will apply their transfer learning concept we redondo the ring that convolution notes weight from Alice's a B and then we can play with difference hyper parameters and most importantly our own data set in other words for training our own custom object we will use the convolution nodes race they are pre-trained and then we will start our own training from that particular train debate in such a way that we don't have to retrain everything from scratch again however to retrain the dodo when the a decent GPU in order for us to speed up our own training and it comes with their help of collab Google collapse is a freak on surface based on Jupiter notebooks for machine learning applications and research it provides a runtime fully configurated for deep learning and free of charge SS - a robust GPU collab is the perfect perfect space to do your research tutorials or projects however not everything can be wonderful collab has some limitations that can make some steps a little bit hard or tedious and we will discuss how we tackle some of the limitation before we talk about the limitations let's learn a bit of the collab environment collapse support stupid in the box also long as ipython traditionally when working interactively with their standard Python interpreter one of the frustrations is the need to switch between multiple windows to assess Python tools and system command tools ipython pictures de scape and gives you a scene test for executing shell commands directly from within their ipython terminal the metric happens with an exclamation point anything appears after that on a line will be executed not by the Python kernel but by the system command line and that is a unix-like system this is a very important concept when you're working in collab because there's no command windows over there you need to use the acceleration point to perform system commands such as creating files creating folders saving files amending folders and etc in this ray you can work with collapse environments to perform both Python functions and system command auto-collapse provide you a decent GPU and a seamlessly ipython environment there are two main problems first aiming problems is that collapse one time is volatile your virtual machine will blow up after 12 hours and everything will disappear after that this means that your virtual machine in off hours are lost after 12 hours and you will have to reconfigure your one time in order for you to restart your training again and this can take some times each time we need to restart the virtual machine again in the game the second problem is that under the collapsing ramens you're working with a remote virtual machines I mean you don't have the direct access to the virtual machine file system so that you have to upload your files every times and also you have to download the files created during the training lucky tech Google provides us a Google Drive to solve the problems of volatiles virtual machine and remote file systems Google has included the drive API on the notebook making us very easily to map to our Google Drive as a virtual machine drive so that we can save our files directly to the method drive and were secure our files before there are 12 hours terminations and besides we can also synchronize one folders in our computers through Google Drive so that we can have direct access to the collab file system and we will be able to work with Yolo configuration files locally and test on the notebook instantly in short with the use of collapse and Google Drive we can now train our custom objects with GPU in the cloud environment and we will then download the final contribution the weights into our local computers for custom object detection - starts custom object detections we need to prepare our image data set in our local computer if you search image in the internet with the use of combs you can download own image once with the length stone in the step 1 and of course you can prepare your own image from different sources or even you can take photos by yourself as a rule of thumb it would be better if you could have at least 100 different image for every individual object detection and of course the more the better especially when you are working with multiple objects detections once you have your own custom objects image you can then download label image which is a which is a graphical image annotations tools for use to annotate your image and prepare a recognizer the test format for Yolo training and after we label all images we can then store our images and then their corresponding test files in a folder and then we submit and for uploading and in step two we need to set up a Google Drive accounts for uploading and downloading the files between collapse and our local Drive in our example we will create a folder called it Yolo we free in Google Drive and upload our zip the image data sets into it just in case if you wanted to rename them please make sure you also realize the in the Jupiter notebook so but that should be not too hard to make everything alighted apart from setting up a Google Drive we also need to set up a Google collapse account as well and later on we will prepare a jupiter notebook and upload it to the collapse for execution and training on the other hand of course we can also develop the notebook under the collab and it depends on whether you want to work in your local computer or you want to work on the collab and I personally like working in my local computer while I don't see there is a big difference between the two approaches once we set up the Google Drive and collapse accounts we can then execute the cooked in collapse and following a su steps to Monza Google Drive and I will show how we can do that later on now our Google Drive and Google collapse are ready in step 3 we need to set up the data for training our custom object detection fans to the contributions of original dotnet in p/j ready Alice's a B has further improved at their setup and network such as providing Windows support improving training speeds and constructing Yolo we fall and etc although many folders and files unnecessary to keep everything simple we just clone everything from the Alice's a B button once you clone the dotnet into the collapse on the left hand side in Clark you should be able to see a list of folders and files and then we need to configure a files called mega file in such a way that the GPU and open Siri enabled and there are free modifications inside the mega files and we will change that GPU equals to one Cu the NN equals to 1 and OpenCV equals to 1 and because third make fire is under the net directory in order for us to modify it we need to type in percentage CD dotnet to change the current directory to that neck and we will then use sed functions for replacing the test in the make file Saed esa stream editor which means editing the files as a stream of characters to replace a test using the UNIX sed command we have to pass the search strings as well as the replacement string at the foster s DD command does long acted the files and displays the outputs of the terminal only so we have to add their - i options which stands for in-place editing there - i options comes in handy - editor original file itself if we use the - i options there s DD command replaced the test in their original file rather than displaying it on the terminal on the other hand s slash is used to substitute their fun expressions say for example for the opencv equals 0 we are going to substitute it with their open CV equals to 1 in make file by using this l / once we use the sed command - editor make file to use GPU CU DNN and OpenCV library following that we can put under MIT command to compile the darkness from the new make file for a cricket summary in step 3 we will clone the data from Alice's AP and then configure the big file inside the clone dotnet for enabling their GPU and open Siri and finally we will compile the mecca file and duck neck once we compile the darknet we need to copy a configurations file and make some changes for setting up their training parameters and customize the number of outputs so in step 4 there are two command P trained it Yoda we free network that we can work with which are Yolo we free tiny and Yolo we fee so if we wanted to build our own custom object detection x' based on either your dough we free tiny or you'll know we free we can modify their configurations file a cordoning I would like to emphasize that Yolo Rafi tiny is faster in outputs but lower in accuracy so in the programming exercise that I'm going to show you later I will use Yolo we free Roxy F key instead of the Yolo we free tiny because I wanted to have a higher accuracy in output therefore I didn't try to build a custom object detection based it on the tiny version but I believe that there are steps for building based on Yoda we free tiny and Yolo we free are very similar so I will show you here for reference although I didn't tried it before and here I separate this step in for a and for P you illustrate what we need to modify for Yolo we free tiny and Yolo we free respectively so let's go through the yellow referee tiny configurations file first and in the very first step we just need to make a copy of Yolo we free tiny doc CFG files to make sure we always have their original copies for further modifications or for other exercise and of course it is not a must to make a copy but it's just a good habit to do so in here we will use their CP that is the copy command to copy the configuration file and here you can see that the first parameters is the file and this and that you want to copy and the second parameters is the filenames that you want it use for that copy once we duplicator Yolo we free tiny files we will make several changes in the file we need to change the live batch to 64 this means that we will be using 64 image for every trimming steps and then we need to change the line subdivisions to 16 and that means the batch will be divided by 16 to decrease the GPU we Ram requirements and then we need to change the line mass patches to at least classes times to thousands in other works we wanted to set the number of chingling according to the number of classes and that is direct directly proportional to our numbers of classes for example if we only have one class we might want to set the mass batches to at least 2,000 and if we have two classes we set it to at least four thousands and so and so and then we need to amend the total number of filters according to the total number of custom objects in nine to seven and nine 171 and the number of filters is well defined by n equations which is that we add the number of classes by five and then multiply the sum by free for example if number of classes equals to one we need to set the filters to be 18 and if the number of classes equals two we will set the filters to be 21 and so on finally we also need to amend their a number of classes in lie 155 and lie 177 which represents the number of categories that we want to detect or you can say that that represent a number of objects that we want to detect for example if the number of objects is one we set the class as equals to one and if the number of objects is two we set it equals to 2 and so on here I just create freeze lines for ease of your reference please feel free to print screen for your own usage and this slide shows the configurations for one causes and this slide showed the configurations for two classes and finally this slide shows their configurations for free classes now let's see how we configure Yolo refree CFG files these steps are very similar to configuring Yolo refree tiny so we will just use the CP command and that is the copy command to copy the configuration file and the first parameters is the file that you want to copy and the second parameter is the files names that you want to use for that copy and similarly once we duplicate the Yolo free we free configuration file we will make several changes in the files we need to change their line to patch to equals 264 this means that we are going to use 64 image for every single steps and we need to change the lies subdivisions to eCos to 16 and that means the battery will be divided by 16 to decrease the GPU we Ram requirements and then we need to change the line mass patches to release equals to the classes time to thousands in other word we want to set the number of chingling according to the number of classes which is directly proportional to the number of classes for example if we only have 1 classes we just set the mass spec batches to at least 2,000 and so and so and then we need to amend the number of Reuters according to the number of custom objects in lies 603 line 6 X 6 X 9 and y 776 and the number of filters is defined by the end equations which is that we add their number of classes by 5 and then multiply the sum by free for example if number of clauses equals to 1 we will set filters to be 18 and so on and finally we also lead to a Mandor number of classes in lie 6 100 lie 696 and lie 783 which represent a number of objects that we want to detect for example if the number of objects is 1 we set the classes equals to 1 and if their objects is number if the number of objects is equals to we set it equal to 2 and so on again I summarized that their steps for one two and three classes in free slice for ease of your reference please feel free to print screen for your own usage and this slide shows the configurations of euro we free doc CFG files for one classes and this slide shows you the configurations of Yolo refree dock CFG file for two classes and finally this slide shows you the configurations of Yolo refeed op CFG files for free classes in our programming exercise shown later in this video we will apply Yolo we free talk CFG files for detecting two classes so we are going to for configuring some these Yolo we feed dog CFG files so we will use sed functions with - I in-place editing options for replacing their corresponding taxes in the first line we update their petrus eCos 264 in the second line we update their subdivisions equal to 16 in the firt line we update their mass patches - for thousands because we have two classes and then we update their filters eCos 221 in lies 6 0 3 6 X 9 & 7 7 6 and we also update their classes EKOS - - in lives 6 106 9 6 & 7 8 3 to make sure everything is correct once we wonder coax inqalab and update their yodel we free training files or Yolo we free tiny training files we can download their corresponding files and open it and then press ctrl F and cut in square bracket Yolo and there should be two matches for Yolo we free tiny and free matches for Yolo we free once you press find X buttons you should be able to see two changes under the Yolo layers the classes must eCos to the number of objects that you wanted to detect for example if you are having single class object detection z' the classes must eCos to 1 and if you are having two classes object detection the number must echos to 2 and under the convolutional layers before their Yolo layers the filters must be equal to the numbers calculated by the equations that I showed it before for example if you are having single class object detection z' the filters must eCos to a king for two classes the filter must equal to 21 and then you press find X buttons against to search for the next Yolo layers remember there will be two matches for Yolo we feel tiny and free matches for Yolo we free in the next steps step 5 we need to create a box names files for our classes inside the darknet they're safe ater folders in the folders you can see there's a code names fires which is used to store der a key class names because we want to have a custom object detection so we also need to create a bulk names files for us to store their class names so in order for us to create a thought names files we are going to use the echo functions which is used a to displace a lie of test however it will just print out the test as it is so we also need to add - e options for us to make the echo interpret backslash escapes characters and the blasts - and indicates we need to add a line and then we we will use the greater than sign to save the files into the data folders with the file names as obj dot names once you creates the not named files you can download their files and check whether the classes are displayed correctly inside the virus and that's it each line should contain one class only and if you have one classes then you should only have one line and if you have two classes then you should have two lines and so and so and the next step is also to create a fires inside their same directory there's the data folders we will also need to create a obj dot data files to specify their following five things which basically indicates how many classes that we are going tryng and it also specified the locations of trained doctors test doc tests and obj names files and also inspect specify the locations where you want to store your yellow Wade's files so we are going to use echo functions with - ye options again for creating the doctors doc data files just for better illustrations I separated the by five lines by indeed in the program you should only see one line of code so say for example we will have two classes so we type the classes equals to 2 and we specify the locations of the train that up s has docked s obj dot name files are all inside the data folders and finally we are going to save the trend at Yolo wait files in the folder called a Yolo we free in our Google Drive and once you created the updater files you can download the files and check whether the contents are similar to what we have in the screen in step seven under the same data directory we will need to create a folder in such a way that our image can upload and store there here we simply use the mkdir functions to create a folders called obj a song in the screen and then we will unzip our image database and upload to their obj folders we simply use the unzip functions to locate our sip files in Google Drive and then provide a directory where we want our image to be stored and that's their obj folders we just create and after and sipping the file you should be able to see two types of fires which are jpg and txt files jpg pharaohs are the images that you want to Train and while their test files contain their object class and annotations informations of the image just wanted to provide you more informations say for example in step 1 after using their labor image tools to create our image datasets we should have a file containing the class informations and annotations informations the 0 and 1 in the no print look-back represents the class informations because in our example we are having two classes we will have two numbers in our example 0 is raring mass and one is not wearing mass and then the phone numbers following their 0 and 1 other annotations informations for the square which provide us the x and y coordinates of their center of the square and the width and height of the square in short in step seven we are going to create a folder inside data folders and then we unzip and upload our images and their associated text file in the folder the next step step eight is to create a trim test file once we create the obj file folders for storing our image we also need to create a test virus that contains own image with their file names and paths as some in the pictures we need to provide the path and file names for each of the image and each image should be in new line and in this step we can use Python code so we import globe modules and then we use club clubs to get the file names with file path for all JPG files and then we use the open functions in right mode to create the Turing test files and writes the file names and file path line by line into the files and after running the code we should have a similar test list as shown in the right-hand side of the screen their second last step is to tano the period wait for the convolutional layers under turn data directory remember what we discussed before about the transfer learning so for training our custom objects we use the convolutional wait that are picturing the weights and then start our own training from that particular train that weight in such a way that we do not have to retrain everything from scratch again for Yolo we free we are going to download or betraying the weight from the Doppler 53 models in PT ready comm website for Yolo we free tiling you might want to follow their instructions in Alice's a B github you probably need to download the weights and then use an additional command to get the required pickering the braids however this is a bit out of the scope of these videos so please feel free to try it and share with me if it works properly finally we get there for Yoda we free we just simply run the command to start training and there are three parameters that you need to input for custom object detection training and that includes the first one is the theta / obj duck data which is used to identify our training informations such as number of classes and locations for saving rates and so and so and then the second parameters is the CFG / Yolo we free training talk CFG fires that is for identifying our training networks of configurations and then the last parameter is the dots 953 Co MV dot 74 for identifying the pre-training the network so once we provide all these parameters we are ready to start training our custom object detection a friendly reminder here is that from time to time or sometimes you might lose your connections to collapse or stop this somehow in the middle of training so in order for you to continues to train on your latest weight you can replace the final parameters with your last saved weight in Google Drive in that case you don't have to restart your training again and that could save a lot of times as well as your previous efforts on the other hand for Yolo we free tiny again please reset Alice's a B github for further informations I believe their command is more or less the same except for the pre-training network so this is a very quick summary for what we've covered in their key steps I use it to the command line as a reference point because everything we do is to execute this command line Populi as mentioned before there are three parameters inside this execution command and we can separate this command into full keep inputs and that sister darknets it had to train later slash obj doc data CFG / Yolo whiffy training doc CFG and also the dr. 53 called doc 74 so in step three we clone configurate and compare out that net in collect so as to set up the training environment properly and then in step four we configure is the configurations files based on the number of objects in order for us to perform the custom object detection in step five and six we create a name trial for class names and then we also create a data files for identifying the number of classes as well as some important paths and then in step seven we create an image folder in collab so that we can upload our image from Google Drive through the folders in collab remember that before we upload the image we also need to prepare the image data set so in step one and two we need to use labor image tools to label the custom objects in Yolo format once we set up the image folder we can then create their trained dog test files based on the file names and paths in the image folder finally in step line we found out their corresponding P trained of weight or training and then in step 10 we execute a command for starting our custom object detection training and that's it for trimming their custom objects and the next thing we need to do is to download the result and perform the custom object detection in order for us to perform custom custom object detection we can simply download their trained weight configuration files name files and use the deep learning framework in open Siri which is compatible with Yolo and the very advantage of this is that it works without the need to install anything except that we need to install the open CV and just one friendly reminders is that there worsens has to be at least three point four point two so first of all we go to our Google Drive and download their last weight virus or you can download their previous rate say for example 1000 mm or 3000 if you suspect there is an overfitting occurred here what I mean is that overfitting is the case that when you can detect objects on an image from training data set but can't detect objects on any other image if that is the case you better to trial with the previous weight rather than the last weight and then we can download the Yolo we free testing configurations file as well as their classes test files and finally we can simply open a terminal to pip install OpenCV python and that's it at the end we will put everything under the same folder with their object detection Python file to perform single or multiple object detection to start custom object detection we first need to prepare our image data set in our local computers and there are many ways that you can prepare your own image from different source or even you can take photos by yourself but what I did is that I try to search their image in the net in the internet with the use of combs so in order for and in order to facilitate to download all the image ones so I just add this extensions tunnel or image to my comb I just showed you as an example I enter extension right here and then once I has this extension I search wearing masks Ipoh and then there's a lychee icon right here seep I just click the icon and then I can download all image in a zip file right here once I have my own custom image I can then download the label in which is a graphical image annotations tool for me to annotate my image and prepare a recognised a text format for the Yolo training as mentioned before I will download the latest versions for window so once I panel I can just prepare these to zip file into a single folder and then I will create a image folders and I will extract all the image to this image folder and then I will run the label in executions file once we open the label in twos we need to sell up to territory the first is the open directory and the second is the change save directory so you just have to locate the your image to set so here you can see that the image is inside this image data set so we select the folder and then change safe directory so we just click on the desktop image data set image and also select the same folder and the next thing that we need to do is to change the format from passcode to Yolo and the next thing is to create the rectangle box or your custom object detection say for example here this is wearing masks similarly on this gentleman here is wearing mask so once we just some create you tango box we can then save the labels to files and then we can click Next we can continues this exercise until all image here are annotated because I have to class here one is wearing masks and the other is the not wearing mask I want to show you how to do that so yep here I create another class here that is the locked wearing masks and then this tea wearing masks and so on after using the label image tools to create our image data set we should have a file containing the class informations and annotation informations corresponding to each of your own image and there's 0 and 1 in the NOC pet represent the class informations because in our example we are having two classes we should have two numbers here you can see that the first class is 0 and then the second class should be 1 and that means that 0 representer people are wearing masks and one represents that the people are not wearing masks and then there should be full additional number for each of the entry so for the firstly for the first for the first two number here which actually the x and y coordinates of the center of the square and then the last two numbers Kier's are actually the width and height of the square and because we have X objects so there are eight entries inside this knock-back and now we have all the images readies so we can just put everything in a zip file and then upload to our own Google Drive as mentioned before we also need to set up a Google Drive account for uploading and downloading files between collapse and our local Drive so in our example we are going to create a folder called euro we free under my drive so and then we are going to upload our image toxic file into this yellow rafi folders just a friendly reminders that the names of the folder and also the names of the zip file should be the same as shown here after uploading the theta SS s image doc zip into the folder yolo refree in our Google Drive we can then log into the collab and then in the file buttons here we can upload our lookbook and we can choose the file which I prepared for you which is called their train Yolo we free multiple which say Jupiter look pop you and let's go through this Jupiter flyby line so let's see if we have the CPU first here you can see that we have the notebook setting we can pick the non GPU or TPU here we are going to pick the GPU and then we are going to one this lie to check whether we have any GPU that can allocate to us okay we have a GPU right here you can see that and then we just one is called two months our Google Drive we click on this laying and then click on miok on copy this sign in coal and then just put the coke here and then press Enter and that's it our Google Drive now is mounted here at this coke is used to create a symbolic link to link up the Google Drive so we do not have to type in the rulings again and then also check that your G Drive that is the Google Drive is already mounted under these collab file so we just follow through the step that I that I mentioned before first of all we clone the our net and then we on freak great we configure it by setting the opencv to open to eco one and GPU eco one and also the CU t NN equals to 1 under the makefile and then we are going to compile the document you so the next step is to configure a our Yolo Rafi Docs CFG file so here you can see that there is a CFG folders right here and then that should contain the Yolo refree CFG file is this one we are going to make a copy under the same folder which is called the Yoda whiffy training so less one disco and then we are going to change the lies in these Yolo we free training configurations files just like what I mentions it depends on how many causes of objects that you relied to detect so for the batch we are going to change to 64 for the sub the subdivisions we're going to change it to 16 and then the mass Petrus depends on the number of classes that you are going to detect say for example we are going to detect for two classes so we should set it to 4,000 and based on the equations and then we are going to change their classes to two in this six 100 line and line six one no lie six ninety six nine seven eight free and then we are also going to change the filter to 5 5 to 21 under the Yolo layers and at line 603 line 6 6 8 9 and lie 7 7 6 actually you can download the Yolo Yolo we free training CFG files here to see whether you already make the change successfully but I'm not going to show here on the other hand there's another way that you can create these configurations say for example you can actually create under your local computers and then upload to your G Drive but it doesn't matter these two approach can get similar results so and then we are going to create a dot name files and also the doc taters files and under the dominance virus we are going to have two classes so that means we have to type in the class names so that includes the wearing wearing masks not wearing masks and then we are going to set up the Oh PJ doc datafiles here so these stock data files just some of I you just held it out nets that we are going to have to class and then we are going to that the Train test-fire we score will be located in this path and then the weather days fire is going to be in this path and then the name file will be in this path and then you need to we are going to save our weight in our Google Drive under the Yolo we free folders so we are going to create the name file dot name files and also the dog data files under the data folders let's see if we created that successfully here you can see that there's a data file yep we have the obj dot data and obj dot names file here and then we are going to copy these two file from the collapse back to your Google Drive so that later on we can just download these two files from the Google Drive the next step is that we are going to create a folder and then we are going to unzip on image under this folder and these should be under the folder data dot obj this should be this folder so all the image are and the test files are unzipped it successfully under these obj folders so finally we can just create a train test files to locate the define the image files so we just run this cope and then let's see where is there train x-file should be under there a turn that should be under the datafile yep right here and then we can double kill it and you should have a similar test files shown here finally we can just turn those the.net 53 comstock 74 but it takes sometimes I will just correct eat and then pause here welcome back so we are almost there so once we da know these picturing the weights for the convolutional layers files we can then just wonder last runs of coax to start the training yep so here I would like to mentions that these cooks is that you can use that to start your training Thunder at the very beginnings so just say for example if there's any problems in the middle of your training and that you want would like to achieve your last weight you can just comment these files and then uncomment is it scope and then you will you can train your Yolo starting from your last waiting but because we have not things at this point so we are going to Ching training from there start you can see that the GPU con 1 that means rayon using GPU and the configuration file is set up like needs so now is training so always remember that the training the rates file will be automatically saved in your Google Drive so what you have to do is just to download the rates from the Google Drive later on after 4,000 training of photos and iterations of your trainings you should be able to see their list of files under your Yolo refree folders in the Google Drive so what you need to do is to panel the class steps file I know the Yolo we free testing configurations file and also download the last wait files and then we will put everything under there same folder with the object detection spy phone file if before we move on to the object detection Python files to perform there's multiple object detection I would like to show you how we coulda just cooked in order for us to perform a single or any other multiple object detection so here what we need to change is to change these mass batch numbers say for example if we would like to perform a single object detection so we just need to put it back to 2000 the class changed to 1 the class changed to 1 the mass change to one and then filter change to 18 according to the equations 18 according to the equations and 18 as well and then the second things that you need to change is that you just only need to provide one classes and save in the objects top names files and I here you need to change it to one and of course you also have to prepare your image files to only a single class so on the other hand if you would like to change it to the two free object detection so here you can just change it to six thousand free Bree three and then this one should be 24 24 and 24 and this one should be free and here you just add few more objects that you would like to detect save a sample second item and then item finally we can open their object detection Python files and the details of these scopes is that I already explained in other videos which is called the Python real-time object detection with Yolo we free and open series so I'm not going to cover it again in these videos so what you need to do is just to make two changes in these videos in order for use to perform the multiple object detection I should say that should be the custom multiple object detection so you just need to change these names and also this name under the original that I provide in the other videos so here you just put the rate as there Yolo we free training last weight and then on the other hand for the configurations you you just need to change it to the Yolo we free testing so and then I prepare that two videos here in order for you in order for me to show you how we perform the two classes multiple object detection nothing else you have to change you just change these two you just have to change these two names so just one and here you can see that there are two person wearing masks and during exercise so I'm not going to take too long on this I'm going to start be the second cause is that um there's a lady that who is not wearing masks so you can see that this is their second class so again I'm not going to take too long here and that's it for this video I hope you enjoy and thank you for watching if you have any questions or suggestions about what we covered in this video please feel free to ask in the comment section below and I will do my best to answer and if you enjoyed this tutorial you can subscribe my channel simply like the video and it is a great support to share this video with anyone who you think would find them useful and thank you all for watching you
Info
Channel: eMaster Class Academy
Views: 48,467
Rating: undefined out of 5
Keywords:
Id: DLngCtsG3bk
Channel Id: undefined
Length: 66min 3sec (3963 seconds)
Published: Thu May 28 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.