1
00:00:00,060 --> 00:00:07,860
Hi and welcome back to the course in this lesson, we'll take a look at using your vision for the darknet

2
00:00:07,860 --> 00:00:14,070
implementation, which is basically a framework that allows us to train your full, well, the military

3
00:00:14,070 --> 00:00:14,580
models.

4
00:00:15,150 --> 00:00:19,680
We're going to use that to train a website screenshot region detector.

5
00:00:19,710 --> 00:00:22,170
So let's take a look and see what exactly that is.

6
00:00:22,920 --> 00:00:29,760
So imagine you're browsing a website and you intuitively know where we're different links or where different

7
00:00:29,760 --> 00:00:32,100
images are how to navigate the website.

8
00:00:32,520 --> 00:00:39,600
You also know how to navigate like, I think, to court or, you know, use Google, Google Maps or

9
00:00:39,600 --> 00:00:40,050
something.

10
00:00:40,710 --> 00:00:46,830
So this data set here is an example of how it was annotated, so you can see they have buttons labeled

11
00:00:47,220 --> 00:00:47,670
field.

12
00:00:47,700 --> 00:00:54,000
This allows basically like a smart air application to navigate website that it hasn't seen before.

13
00:00:54,510 --> 00:00:55,260
Pretty cool, huh?

14
00:00:55,950 --> 00:00:59,420
So let's get started and see how we train darknet.

15
00:00:59,430 --> 00:01:00,990
Your wish for model.

16
00:01:01,620 --> 00:01:04,180
So we're going to use our overflow notebook again.

17
00:01:04,680 --> 00:01:06,120
So let's get started.

18
00:01:06,150 --> 00:01:11,610
No, I haven't run this notebook today, so let's see if everything still works.

19
00:01:15,570 --> 00:01:24,240
There it goes, we have connected if we're using this CPU at Tesla P100D, which is fairly good now,

20
00:01:24,240 --> 00:01:28,140
we just set some environments settings based on the GPU that we're using.

21
00:01:28,990 --> 00:01:32,130
Next, we have to install darknet for club.

22
00:01:32,610 --> 00:01:38,580
Let's do that and let's set some parameters and settings here that we need.

23
00:01:40,620 --> 00:01:43,170
This may all seem quite confusing, but don't worry about it.

24
00:01:43,410 --> 00:01:47,640
This is just how you get call up setup for darknet.

25
00:01:48,780 --> 00:01:50,280
So let's begin.

26
00:01:50,490 --> 00:01:52,110
Let's finish this up now.

27
00:02:05,380 --> 00:02:09,900
OK, so that set up is mostly done now, let's just get the weeds here.

28
00:02:13,210 --> 00:02:15,130
So it's downloading the yellow vehicle.

29
00:02:15,180 --> 00:02:21,550
With that, we're going to train using transfer learning, so we get the pre trained we it's there now

30
00:02:21,550 --> 00:02:23,170
we need to get the data set.

31
00:02:23,320 --> 00:02:25,270
So let's download datasets here.

32
00:02:29,690 --> 00:02:30,860
That should finish quickly.

33
00:02:31,910 --> 00:02:35,150
No, we're ready to almost ready to start training.

34
00:02:35,540 --> 00:02:41,780
We just have a few more things to set up, especially with like directory setup and setting those types

35
00:02:41,780 --> 00:02:42,620
of parameters.

36
00:02:43,820 --> 00:02:50,480
Next, now we can write our custom training config for dotNet your wish for so you can see these are

37
00:02:50,490 --> 00:02:52,970
the settings here that we were right to that file.

38
00:02:54,320 --> 00:02:55,160
And there we go.

39
00:02:55,260 --> 00:03:01,130
Now it could take a look at that here by using cat config to take a look at what the config actually

40
00:03:01,130 --> 00:03:01,520
is.

41
00:03:03,020 --> 00:03:06,230
So you can explore this if you want, you can make changes.

42
00:03:06,320 --> 00:03:10,790
It's not really recommended to do that on your own unless you know what you're doing.

43
00:03:11,780 --> 00:03:15,620
So now we're ready to train or you're looking for detectar.

44
00:03:16,970 --> 00:03:18,230
So this should start.

45
00:03:18,230 --> 00:03:21,680
You should see something like this with prints out the model architecture.

46
00:03:23,570 --> 00:03:29,630
And then, yep, it's going well, and then you'll see it start training quite shortly.

47
00:03:33,890 --> 00:03:38,570
Good, so you can see it's starting to trend right now and tells you how much time has left, so actually

48
00:03:38,570 --> 00:03:40,590
this one was taking quite a bit of time.

49
00:03:41,090 --> 00:03:44,480
And that's because this dataset is actually quite large as well.

50
00:03:45,200 --> 00:03:48,500
So now let's take a look at some of the other parts of this project.

51
00:03:48,680 --> 00:03:54,140
I'm not going to run this because we're training right now, but we can see how we can run inference

52
00:03:54,140 --> 00:03:58,610
on the final or the best weights that we got from what you live for detector.

53
00:03:59,540 --> 00:04:02,870
So to do that, all you have to do is just run this line here.

54
00:04:03,380 --> 00:04:09,400
Darkness detect point to the configured point to the model, but the best widths you can induce final

55
00:04:09,400 --> 00:04:13,270
or best, as well as the image path, which we get from up here.

56
00:04:13,310 --> 00:04:17,480
So it's going to do it in a random image, and let's take a look at the output.

57
00:04:18,320 --> 00:04:18,800
Ta da.

58
00:04:18,890 --> 00:04:23,900
So you can see it got an image of God and frame of what an eye for images.

59
00:04:23,900 --> 00:04:27,830
Maybe a better perhaps heading is identified correctly.

60
00:04:27,830 --> 00:04:30,770
This isn't a button, but it probably is clickable.

61
00:04:30,780 --> 00:04:31,340
Who knows?

62
00:04:32,570 --> 00:04:33,530
So yeah, it's pretty good.

63
00:04:33,770 --> 00:04:36,920
You can see that this actually worked fairly well and you can see this.

64
00:04:37,460 --> 00:04:41,390
This is probably trained on all the looking websites.

65
00:04:41,690 --> 00:04:42,800
This looks quite dated.

66
00:04:43,460 --> 00:04:50,750
Modern websites do have a very different look and feel and would be perhaps even easier to navigate

67
00:04:51,110 --> 00:04:55,670
because it's probably less confusing, but the UI improvements over the years.

68
00:04:56,330 --> 00:04:58,490
So that's it for this lesson.

69
00:04:58,490 --> 00:05:00,950
I hope you enjoyed it in the next lesson.

70
00:05:01,490 --> 00:05:08,000
We're going to train a drone who maritime time shot detector for boats and stuff.

71
00:05:08,030 --> 00:05:09,710
So stay tuned for that lesson.

72
00:05:09,830 --> 00:05:10,250
Thank you.
