OK.
So welcome to twenty one point three.
Well actually talk about and tell you how to go about creating a custom tensor for up to detection module
model.
So training the tens of the action the training process of tensile flow of detection is honestly a bit
messy and this is probably one of the best of the detection Well most mature object libraries on the
market today market.
But an open source market you can say and it's explained fairly well it actually is bit tricky to use.
So this is a step I broke down from looking at it.
So first we prepare a data set in the T.F. record format.
That's a specific record.
I'll show you in the next few slides.
Then we need to create a class label file that's a dog P.B. text file.
Then we need to download a pre-trained Kokoo model and we need to set up the correct file that actually
structure configured the object action pipeline and then start training.
So let's go step by step.
So what does it T.F. record format.
So it tends to flow because the action expects so it treating and test data to be in this T.F. or the
school record format.
This is pretty much what it looks like here.
Luckily though we can convert existing data sets that's like in the past SQL View see data set which
is stored in Exod. Mosha directly to ATF records file by using the script.
They provide this for the here.
So it's quite myself.
And no we talk about a classily files.
So basically this is what the castable file looks like.
It's basically just on a dictionary Shukria where we have the IDs and label names.
So that's pretty much what we need to do with redefining.
If we're training a detector to detect let's say London underground tube signs you'll just put the name
of the class here and it's I.D. and you keep adding more and more items all objects here.
So now we have to use pre-trained model.
OK.
So we don't train this model and this is like the resonant model that we use in the previous chapter.
So we don't have one here.
So tensile flow who has several pre-treat models and one Ko-Ko and Coko is basically a large scale object
protection segmentation and captioning data set and basically has a lot of features here.
You can go to the Web site this Cocco decision it and you will find it.
And so you don't live with the models here.
This link carries you to all the models that are available on tensor.
And basically just use it downloaded onto mental health and on target here.
So that's what we do.
And this is a list of all the models of healable here.
It gives the speed and the map scope which is quite useful helps you choose which model is most appropriate
for your application.
So now we get to configure object detection pipeline said abjection pipeline configuration file is composed
of five sections.
Basically we have a model that we define here to configuration here.
Then we have the training config here.
So we add this through here and the in part Real talk about soon the valuation config and evaluation
in podrida.
So let's take a look at this file in more detail.
So this is a sample of the model file the model section here.
What it looks like is this is the model config.
I should say.
OK.
So we basically what we have to note is that we have some templates already that we can use inside of
of flow.
So we just basically make sure that all classes match up to the classes that enable custom are being
attacked to Dexter.
So this one was taken from the president one on one.
And those Treen in the Pascrell VRC dataset.
So as I said you don't need to rewrite this file just edit to one belonging to the preacher and model
to be using Dymo defines the model defines all unnecessary.
Our Or our CNN and as the parameters and when using pretreated models as best we leave this configuration
configuration file unchanged unchanged just a bit.
This red box here with the classes and notices that trade input Greedo and the yvel config and involved
in podrida sections.
So this is what we have to try and change these in red.
Basically directory mappings.
So we have to make sure that they're actually correct and pointing to the correct files that you want
to use.
This will be your label file.
This will be your record file you're treating UTF record file.
This is what disappoints do here.
So for validation and for record for training and for validation.
And this is Leavell parts of boat as well.
OK.
So remember the labels are the same ideas will be the same it's the same file.
OK.
So now here's the directory structure of the project.
So this is how and where we put our files.
So the PBX ex-felon label file that goes inside a directory called data.
Then we have a record files which is a train and evaluation of record files or validation whatever you
want to call it same thing.
And then we have a new directory here models and then we have subdirectory model here.
This is where we put our pipeline config file.
That's this file here.
And then we just have the trained directory and the evaluation directory here as well under the model
inside the model form which is inside of the models for the here.
So now this is how we start the training process.
So we go to basically terminal and we just copy this line of code here and make sure to code the lines
in a read here.
These correspond to the model you are using and the directory that we just created here.
OK.
This is the day that actually it needs to be pointing to and it doesn't do that.
And then you can actually bring up tents board to monitor your treating progress which is pretty cool.
It's going to be district directory here.
That again does your data directly at the specified here.
And then before that I should have mentioned this earlier but it's important when you're labeling it
images use a software that actually produces it in the correct format.
So this is how we use annotations here.
So this is my wife with my dog Samuel and software we use as a label.
AMG I think this is two elves they have here this really label I am the label image obviously.
So download it if you want to do it.
It's available for Windows Mac and Linux.
And this is the format that Pascal VRC Exham a format that we use now.
It is not what we used us but we generate the image anti-Chavez in this format using the software.
It actually does it automatically for you.
And we can use our tents for a script I mentioned earlier to convert this file directly back to the
text of the record files.
So this is a summary here.
We didn't do a full project here for the following reasons.
Training and SSTO even a faster are CNN One is you is very impractical.
It is going to take forever.
So you definitely need a GP or a cloud to use to effectively train this A.F. all the data sets are there
huge there are quite a few gigs of storage and also to setting up a GPU when a local system is a nightmare
sometimes.
It's a very scary task but once you get it working it's good you feel very happy because it's so much
faster.
So I've of all time general steps here.
The Trina's model there are also some good tutorials I found online that do this as well.
Basically try to make it as simple as possible if you going through all the steps telling you what to
pay attention to and what's important.
I've actually tried this on my system as well so I know what works.
So I wish you all the best of luck when making your own object to actual text detectors.
Thank you.