1
00:00:00,870 --> 00:00:01,420
Hi, guys.

2
00:00:01,470 --> 00:00:02,190
Welcome back.

3
00:00:02,340 --> 00:00:09,390
In this section, we'll take a look at using the to detect drone to framework to implement and train

4
00:00:09,480 --> 00:00:10,060
a mask.

5
00:00:10,080 --> 00:00:10,920
Our CNN.

6
00:00:11,070 --> 00:00:12,270
So let's get started.

7
00:00:12,330 --> 00:00:15,960
So open Notebook 56 will begin to listen.

8
00:00:16,650 --> 00:00:21,900
So firstly, I will say this requires some setup in and it takes a while.

9
00:00:22,380 --> 00:00:26,280
So this block of could probably will take you about five minutes to run.

10
00:00:26,700 --> 00:00:29,520
And at the end of it, you will have to restart runtime.

11
00:00:29,520 --> 00:00:31,740
Don't worry that that doesn't change anything.

12
00:00:31,950 --> 00:00:34,530
Right after that, you can import to run these imports.

13
00:00:35,130 --> 00:00:38,130
He can run all of the detection to imports as well.

14
00:00:38,670 --> 00:00:46,050
So for the first part of this lesson, we're going to download a test image and then run an inference

15
00:00:46,050 --> 00:00:47,050
on this test image.

16
00:00:47,070 --> 00:00:53,790
So we're going to get boot bounding boxes as well as the segmentations, so you can see the pixel level

17
00:00:53,790 --> 00:00:55,920
predictions for this image.

18
00:00:56,040 --> 00:00:57,930
This is the input test image we'll be using.

19
00:00:58,590 --> 00:01:06,090
So first, we create the detection to configure and add the electron to object called the full predictor.

20
00:01:06,420 --> 00:01:09,810
And that is a move that allows us to run prediction.

21
00:01:09,820 --> 00:01:11,310
So it does have the image here.

22
00:01:11,340 --> 00:01:19,470
This is the input image that we loaded above here, just using open speak to him read, and we can just

23
00:01:19,470 --> 00:01:21,960
run it simply to predictor and get the outputs at the end.

24
00:01:22,590 --> 00:01:25,670
This is very nicely done and very easy to move it.

25
00:01:26,400 --> 00:01:28,800
Next, you can see you can look at those objects here.

26
00:01:28,860 --> 00:01:33,720
The outputs, you can see the instances you can get, the prediction classes, the prediction boxes.

27
00:01:34,230 --> 00:01:36,920
You can get the pixel level summary as well.

28
00:01:36,920 --> 00:01:41,910
We can check out the document on the output format for more details on it.

29
00:01:42,420 --> 00:01:46,950
And now you can use a visual laser detection to packages as well.

30
00:01:47,370 --> 00:01:52,500
And you can visualize both the segmentations and the bounding box predictions right here, and you can

31
00:01:52,500 --> 00:01:55,380
see this works exceptionally well.

32
00:01:55,410 --> 00:01:59,730
Actually, it gets pretty much everything, even the umbrella, right?

33
00:01:59,790 --> 00:02:03,120
Although it does say this person know this is a person here.

34
00:02:03,570 --> 00:02:05,910
I think it just, yeah, there are two different imbalances here.

35
00:02:05,910 --> 00:02:09,280
So that's why the person is here, umbrella.

36
00:02:09,300 --> 00:02:16,350
Again, you can see this is very, very after it gets to horse at 100 percent accuracy and confidence

37
00:02:16,620 --> 00:02:18,030
person as well on it.

38
00:02:18,630 --> 00:02:25,100
So overall, you can see this pre-trained detection to mask or seeing them works very, very well.

39
00:02:25,860 --> 00:02:32,380
Now let's see how we can train a custom dataset using the actual two framework.

40
00:02:32,970 --> 00:02:38,490
So the dataset we're going to download is the balloon dataset, and you can visualize some of it here.

41
00:02:39,030 --> 00:02:41,250
This is some pre-processing tools.

42
00:02:41,250 --> 00:02:50,310
You will need to basically pass the annotations and get them to the format for the detector on to training

43
00:02:50,310 --> 00:02:50,670
model.

44
00:02:51,540 --> 00:02:53,160
So don't worry too much about this.

45
00:02:53,520 --> 00:03:00,510
Now we just need to run that and then we can display some of the data using the visualizer, some of

46
00:03:00,510 --> 00:03:04,150
the annotated data, along with the validity of the images.

47
00:03:04,170 --> 00:03:08,610
So you can see these are the balloons here in this image, you can see there's quite a few balloons.

48
00:03:09,420 --> 00:03:12,810
This one has two women with these balloons, although they didn't label this balloon.

49
00:03:12,810 --> 00:03:16,770
But to be fair, it doesn't really look too much like a traditional balloon.

50
00:03:18,300 --> 00:03:20,160
And these are the balloons here.

51
00:03:20,460 --> 00:03:25,050
So you can see just some examples of how the dataset was annotated.

52
00:03:25,170 --> 00:03:31,410
So now we're going to train this model so you can see it takes about two minutes to train 200 iterations

53
00:03:31,410 --> 00:03:34,050
on a P 100, but we don't have a few 100.

54
00:03:34,530 --> 00:03:36,570
We have something a bit slower.

55
00:03:37,080 --> 00:03:40,490
I think I haven't actually checked to see what you gave us.

56
00:03:40,950 --> 00:03:43,290
Either way, you can run this industry.

57
00:03:43,290 --> 00:03:50,010
This small print this out and you can get two iterations of printed out here of early treatment models

58
00:03:50,010 --> 00:03:54,340
and looking to retrain it now for the interests of progressing to this lesson.

59
00:03:54,360 --> 00:04:01,080
However, you should be seeing these outputs when you start training in Mexico and visualization on

60
00:04:01,380 --> 00:04:07,290
board as well, so you can see our losses and seconds and different metrics as well.

61
00:04:08,190 --> 00:04:13,680
Now we can run inference on the train model, so to do that, you do a similar thing where you just

62
00:04:13,680 --> 00:04:15,120
create the default predictor.

63
00:04:15,570 --> 00:04:22,620
We set the load, the model part as well, and causes of THC notes using PI torch in the background.

64
00:04:22,720 --> 00:04:29,040
Guess you didn't realize from before we did install PI torch specific vision one point nine by touch

65
00:04:29,910 --> 00:04:34,390
and then we can visualize the predictions so you can see it gets a balloon here.

66
00:04:34,430 --> 00:04:39,180
However, it kind of says this child's head is a balloon, which is not.

67
00:04:39,450 --> 00:04:43,290
But that's so understandable mistake it gets.

68
00:04:43,290 --> 00:04:47,850
All of these balloons right here, gets all of these balloons right.

69
00:04:48,450 --> 00:04:50,310
So you can see that it's quite good.

70
00:04:51,000 --> 00:04:53,230
So ignore this error here.

71
00:04:53,250 --> 00:04:54,540
We don't need to actually run that.

72
00:04:55,080 --> 00:04:59,700
Now what I want to showcase here is some of detections detection tools.

73
00:05:00,400 --> 00:05:02,170
Other amazing features.

74
00:05:02,680 --> 00:05:06,430
So I'm going to stop this now, and I'm going to show you that in the next section.

75
00:05:06,610 --> 00:05:07,090
Thank you.
