Hi and welcome back to the course in this lesson, we'll take a look at using your vision for the darknet
implementation, which is basically a framework that allows us to train your full, well, the military
models.
We're going to use that to train a website screenshot region detector.
So let's take a look and see what exactly that is.
So imagine you're browsing a website and you intuitively know where we're different links or where different
images are how to navigate the website.
You also know how to navigate like, I think, to court or, you know, use Google, Google Maps or
something.
So this data set here is an example of how it was annotated, so you can see they have buttons labeled
field.
This allows basically like a smart air application to navigate website that it hasn't seen before.
Pretty cool, huh?
So let's get started and see how we train darknet.
Your wish for model.
So we're going to use our overflow notebook again.
So let's get started.
No, I haven't run this notebook today, so let's see if everything still works.
There it goes, we have connected if we're using this CPU at Tesla P100D, which is fairly good now,
we just set some environments settings based on the GPU that we're using.
Next, we have to install darknet for club.
Let's do that and let's set some parameters and settings here that we need.
This may all seem quite confusing, but don't worry about it.
This is just how you get call up setup for darknet.
So let's begin.
Let's finish this up now.
OK, so that set up is mostly done now, let's just get the weeds here.
So it's downloading the yellow vehicle.
With that, we're going to train using transfer learning, so we get the pre trained we it's there now
we need to get the data set.
So let's download datasets here.
That should finish quickly.
No, we're ready to almost ready to start training.
We just have a few more things to set up, especially with like directory setup and setting those types
of parameters.
Next, now we can write our custom training config for dotNet your wish for so you can see these are
the settings here that we were right to that file.
And there we go.
Now it could take a look at that here by using cat config to take a look at what the config actually
is.
So you can explore this if you want, you can make changes.
It's not really recommended to do that on your own unless you know what you're doing.
So now we're ready to train or you're looking for detectar.
So this should start.
You should see something like this with prints out the model architecture.
And then, yep, it's going well, and then you'll see it start training quite shortly.
Good, so you can see it's starting to trend right now and tells you how much time has left, so actually
this one was taking quite a bit of time.
And that's because this dataset is actually quite large as well.
So now let's take a look at some of the other parts of this project.
I'm not going to run this because we're training right now, but we can see how we can run inference
on the final or the best weights that we got from what you live for detector.
So to do that, all you have to do is just run this line here.
Darkness detect point to the configured point to the model, but the best widths you can induce final
or best, as well as the image path, which we get from up here.
So it's going to do it in a random image, and let's take a look at the output.
Ta da.
So you can see it got an image of God and frame of what an eye for images.
Maybe a better perhaps heading is identified correctly.
This isn't a button, but it probably is clickable.
Who knows?
So yeah, it's pretty good.
You can see that this actually worked fairly well and you can see this.
This is probably trained on all the looking websites.
This looks quite dated.
Modern websites do have a very different look and feel and would be perhaps even easier to navigate
because it's probably less confusing, but the UI improvements over the years.
So that's it for this lesson.
I hope you enjoyed it in the next lesson.
We're going to train a drone who maritime time shot detector for boats and stuff.
So stay tuned for that lesson.
Thank you.