Hi.
Welcome back to the course in this section, we'll take a look at a little last object detector, which
is called the plant doctor object detector.
Why plan DR?
Well, what is that what this dataset comprises of which we'll take a look.
So just open notebook 52.
You can see these are these look like sick leaves.
This is a plant with the disease.
So this dataset was compiled basically labeling a lot of different plant lives and whether they're diseased
or not.
So it's a very good tool that DeFi in the wild, if you wanted, if you had a phone up just to check
and see if a leaf was sick or not of a plant or tree was sick or not.
Then you can upload it and use this model to predict where it is, what it is.
So now let's begin.
So this is a yellow vision five model, probably d best ability that to model in 2022 right now.
And this is a notebook from a room of thought yet again.
So what we'll do here?
Firstly, we install the dependencies and set up the model.
So you just clone this there.
This is this is the you will be fired from ultrabooks and then you install the requirements, which
is basically setting up all of the packages that we need in modules.
Next, you can export your own data set using the rebel floor Ramaphosa API.
However, I conveniently have this function here, which is hosted on my Google Drive, so you can automatically
download the dataset here, which this line does next.
We can just navigate to the directory.
Check out the data Y.A. File, which has the training parts, the number of classes and the class names
here, but you can see can all see them here.
Strawberry leaf number of different things here.
So and it tells you tomato more leaf tomato leaf so you can see when the class names that indicate disease
or not sometimes.
So next, we defined a model of architecture and configuration.
So we have done this before in the previous lesson.
So we want go over this again.
Next, let's just go through.
All of this has to do with the model config here.
Now we're ready to train our model.
So let us put the data into the right directory is here.
So you just move to a little five trained to the mainstream folder here so you can see what it looks
like here.
So we have to and valid as a directory for training from here and now we can just call the Python training
function both file so you can see the script here.
You can specify imitates met size number of epochs where the data no file is located, where the CFG
model file is created, and widths where we're not using any weights here.
And then we are results here as well.
And Cashman's you're putting the data into RAM, so which is a lot faster, by the way.
So you can see this.
We've created four hundred epochs right now and you can see after each epoch, you see the training
results here.
You can take a look at the important ones are basically these four right here.
These four bit difficult to see because of the format, but precision recall not point at point five
at and map at point five two point ninety five.
So you can see as we train, those scores get better.
They don't get that good.
To be honest, this model is having some trouble with this dataset, although overall it's moderately
OK, which is a fair thing to say.
But nevertheless, that's what it is.
You can probably get more data or trained us with more the party to improve this and saying you can
train this with more data or treated for more e-books or on a deeper will network can see the training
results visualized here.
Then you can see some of the other charts basically different illustrations as a hardcoded PPG file
that is produced at the end of training from the Google V5.
And next, we can see some of the differences here.
Well, this is actually our training level, so this is all in the correct labels here says not inferences
yet.
And some more of them are right here and these are the basically you'll be five has data augmentation
built in.
So this is how the augmented data looks when it goes into the model.
Now we have to see how a model actually performs.
So let's run some inferences here.
So run these cells here, and this generates and saves all the results to do Star Trek overruns.
Let me just point us to you.
Runs and detect and you can see experiment on the experiment, too.
That's because I have run two experiments here, but nevertheless, let's take a look at the results
of the experiment one you can see it's a belief you can see generally, there's a lot of, I guess you
could say, missed detections, which means that I will recall it's probably quite bad.
But also the precision would be quite bad, too, because it's just not even predicting much at all.
So maybe we can lower the confidence threshold, perhaps or the stream of more data, but you can see
it overall.
It's performing OK, it's not performing too great, but at least we have a model that we can work with
and iteratively iteratively improve either with more data, better data augmentation of configuration,
configuring the hyper parameters of the model, just messing with them.
But that's about it.
Now for this lesson, they hope you enjoyed it and this was our last object detector tutorial.
I know a lot of them were quite quick, and that's because it didn't go into the detail because all
of them are so different.
And to be honest, honestly, I would just recommend you don't have to understand all of them.
Just pick one or two.
I would definitely suggest look at your load if you want to get some of the best results out, as well
as if you want our CNN's actually quite widely used still, so you can take a look at RC lenses well
and maybe efficient detect as well.
Those are all quite good, quite popular and well-established models that have good of real world performance.
So that's it for this lesson.
In the next lesson, we'll move on to deep segmentation or segmentation by deep learning.
So thank you for watching, and I'll see you in the next lesson.
But.