Hey, welcome back in this lesson.
Lesson 44 will be training is sign language detection model that's built upon the efficient detect model.
So it's going to be using the TensorFlow object detection API again.
So let's get started.
So open Notebook 44, which I've already done here, and we'll see.
So this is what the sign language one of the images looks like.
And again, this is from a room floor notebook, so please visit them and give them your support.
They're actually extremely, extremely good at probably one of the best computer vision type companies
that enable model training model deployment data labeling out there.
They're they're quite good.
I'm quite impressed with them.
So it says busier than that's because I'm training the network right now.
However, I accidentally closed a club notebook and reopened it, so I lost the time it takes to run
itself.
But that's okay, because these things don't take too long the most.
Each of these are going to take might be roughly about a minute.
So you can just go through all of these different lines of code.
These are the setup and import libraries.
These are the cluding of the of the TensorFlow Object Detection API, as well as some of the model configuration
files.
So and installs, I should say actually what?
This is this one here, this one actually builds the entire model builder here, so you can actually
start that he had.
This doesn't take that long to run, actually.
Next, we create some functions.
This is a mode image into an umpire ray function.
This one plots detections.
Next, we can prepare or TensorFlow for action training data.
So we get the data TensorFlow t.f record, which, as you've seen before, has a duty of record file
as well as a PBE to file these here.
And we have it for Test Train and Val, so we get our data.
Do we set our parts there?
Then we create the custom model config here.
So you can choose which backbone you want.
This is efficient.
Detect the zero, which is the latest with with model, and it's actually surprisingly accurate for
such a lightweight model.
I've used it in some real world applications, and it definitely performs better than the mobile SSD.
I'm quite happy with it.
D1 and D2 industry are all better.
The tree and D4 actually D4 isn't available here, but the tree is quite good.
It actually rivals Eula performance in the real world, in my opinion.
Yellow is always a little bit better, though, and a little bit faster in some cases, but deficient
exact models.
They can be optimized for arm devices like Android or iOS using to test light conversion.
So and he can even quantify it and prove it so you can get some quite.
You can get quite small models that have quite powerful and quite efficient in inference time.
Inference time is the time it takes the model to process one three one image.
So if you have an inference time that's quite short, like under point zero five milliseconds seconds,
actually, then you can sort of get almost real Real-Time Speed because you want to get to to reframe
to second, ideally.
So you can see these models can come quite close to that being so lightweight anyway.
So now we just sort of the pre-trained checkpoint files and then we also get the base training configuration
file, which is a tiny file anyway for the D0 model, which is what we'll be training next week.
Propel Pipeline to get the number of classes and the classes in this data set is going to be actually
don't know it.
Often I need to check that dataset again, but quite a quite a few and sign language signs before.
In the previous two models, we were training basically one class.
Now we're going to train a multi class object detector, which obviously is harder because you have
so many classes to distinguish.
You can have a lot of confusion between classes.
Sometimes confidences can be quite close for two different classes at times.
So next we write to a custom configuration file here and then we can do splits here so it can take a
look and just make sure everything is as what you expect.
All your settings are correct.
These things matter, especially when you're hard coding that I shouldn't say hard coding, but when
you're converting the model to be deployed on a different server, a lot of these things need to be
set correctly in the model as well.
So just remember that that's something I tend to take for granted sometimes in research.
But in reality, when you're in the working world and deploying models, that's what you have to consider.
So now you can see this is what I'm doing here.
I'm training to models, you can see how it starts here.
Then you can see all of these warnings that come up with TensorFlow because TensorFlow is constantly
changing, so they're going to be warnings about things being deprecated.
So what you should use, but we will ignore those for now.
Next, you can see Prince, the localization, Los regularisation loss, total loss, as well as learning
rate, which is which is an adaptive learning rate that can see it changes constantly.
And you can see that it goes through epoch of footsteps here.
It's done very poorly book and you can see that we're getting better and better.
Losses total loss point sixty six now, whereas when we started, it was sort of the one you can see
here, and it's probably higher 1.4 to two.
You can see the losses going down as we expect.
Always good to check that.
So that's a death.
What we're going to do now, I'm not going to interrupt the training, but what we'll do is we'll take
a look at the previous stuff around before.
So you can see how the inference looks here so we can run some test images here.
So let's just download the images again and get our test images here.
We have the same functions.
This function actually has been declared previously, but there were still from check points.
That's the model with us free and certain model parts.
You see, it's a lot of work actually to get this done.
But no.
Finally, we can see this is the letter Q and one image you can probably alternate changing different
images somewhere in these files here right here.
You can choose a random choice every time you run this block of code.
It's going to create a new image and you can see if it's correct or not.
I actually don't know sign language, so I'm hoping this is correct.
But nevertheless, this is quite cool.
This is quite a cool project and you can learn a lot from this and this can actually be used in a mobile
phone afterward.
You can just check out later lessons, which I might put up, hopefully, which is a which is about
deploying these models to Android and iOS.
So stay tuned for the next lesson.
We will look at pothole detection using tiny little vision four, so I'll stop there and I'll see you
in the next lesson.
Thank you.