Hi, guys.
Welcome back.
In this section, we'll take a look at using the to detect drone to framework to implement and train
a mask.
Our CNN.
So let's get started.
So open Notebook 56 will begin to listen.
So firstly, I will say this requires some setup in and it takes a while.
So this block of could probably will take you about five minutes to run.
And at the end of it, you will have to restart runtime.
Don't worry that that doesn't change anything.
Right after that, you can import to run these imports.
He can run all of the detection to imports as well.
So for the first part of this lesson, we're going to download a test image and then run an inference
on this test image.
So we're going to get boot bounding boxes as well as the segmentations, so you can see the pixel level
predictions for this image.
This is the input test image we'll be using.
So first, we create the detection to configure and add the electron to object called the full predictor.
And that is a move that allows us to run prediction.
So it does have the image here.
This is the input image that we loaded above here, just using open speak to him read, and we can just
run it simply to predictor and get the outputs at the end.
This is very nicely done and very easy to move it.
Next, you can see you can look at those objects here.
The outputs, you can see the instances you can get, the prediction classes, the prediction boxes.
You can get the pixel level summary as well.
We can check out the document on the output format for more details on it.
And now you can use a visual laser detection to packages as well.
And you can visualize both the segmentations and the bounding box predictions right here, and you can
see this works exceptionally well.
Actually, it gets pretty much everything, even the umbrella, right?
Although it does say this person know this is a person here.
I think it just, yeah, there are two different imbalances here.
So that's why the person is here, umbrella.
Again, you can see this is very, very after it gets to horse at 100 percent accuracy and confidence
person as well on it.
So overall, you can see this pre-trained detection to mask or seeing them works very, very well.
Now let's see how we can train a custom dataset using the actual two framework.
So the dataset we're going to download is the balloon dataset, and you can visualize some of it here.
This is some pre-processing tools.
You will need to basically pass the annotations and get them to the format for the detector on to training
model.
So don't worry too much about this.
Now we just need to run that and then we can display some of the data using the visualizer, some of
the annotated data, along with the validity of the images.
So you can see these are the balloons here in this image, you can see there's quite a few balloons.
This one has two women with these balloons, although they didn't label this balloon.
But to be fair, it doesn't really look too much like a traditional balloon.
And these are the balloons here.
So you can see just some examples of how the dataset was annotated.
So now we're going to train this model so you can see it takes about two minutes to train 200 iterations
on a P 100, but we don't have a few 100.
We have something a bit slower.
I think I haven't actually checked to see what you gave us.
Either way, you can run this industry.
This small print this out and you can get two iterations of printed out here of early treatment models
and looking to retrain it now for the interests of progressing to this lesson.
However, you should be seeing these outputs when you start training in Mexico and visualization on
board as well, so you can see our losses and seconds and different metrics as well.
Now we can run inference on the train model, so to do that, you do a similar thing where you just
create the default predictor.
We set the load, the model part as well, and causes of THC notes using PI torch in the background.
Guess you didn't realize from before we did install PI torch specific vision one point nine by touch
and then we can visualize the predictions so you can see it gets a balloon here.
However, it kind of says this child's head is a balloon, which is not.
But that's so understandable mistake it gets.
All of these balloons right here, gets all of these balloons right.
So you can see that it's quite good.
So ignore this error here.
We don't need to actually run that.
Now what I want to showcase here is some of detections detection tools.
Other amazing features.
So I'm going to stop this now, and I'm going to show you that in the next section.
Thank you.