1
00:00:00,150 --> 00:00:03,050
Hi, guys, welcome back to Lesson 46.

2
00:00:03,070 --> 00:00:07,620
We will train a mushroom type detector, which is pretty cool.

3
00:00:08,760 --> 00:00:10,200
Might be useful for some people.

4
00:00:10,200 --> 00:00:15,960
You know, if you're in the forest and you have this mushroom type detector on your mobile phone, you

5
00:00:15,960 --> 00:00:18,660
can use it and see what mushroom it is.

6
00:00:18,780 --> 00:00:23,790
I'm not sure why, but yeah, they actually are magic mushrooms, poisonous mushrooms.

7
00:00:24,300 --> 00:00:25,480
So that's a useful tool.

8
00:00:25,500 --> 00:00:32,940
Anyway, let me stop talking now, so let's open Notebook 46 and we'll begin to lesson so you can see

9
00:00:32,940 --> 00:00:35,220
this is another room of the notebook here.

10
00:00:35,670 --> 00:00:41,610
I have links on some of the accompanying blogs where they talk about the data set as well, so you can

11
00:00:41,610 --> 00:00:43,650
see this is what the labels look like.

12
00:00:44,010 --> 00:00:49,890
Every mushroom, all these mushrooms of the same type here that shinta really mushroom mushroom soup.

13
00:00:49,890 --> 00:00:51,330
I pronounce that right.

14
00:00:52,270 --> 00:00:54,750
So, so now let's set up detector on two.

15
00:00:54,760 --> 00:00:57,150
So this takes a little while, takes about two minutes.

16
00:00:57,570 --> 00:01:05,190
So we have to install the correct torch vision that detector on two uses and a few of the libraries

17
00:01:05,190 --> 00:01:05,880
as well.

18
00:01:06,450 --> 00:01:10,200
And that's not to say no to that, so it takes about two minutes to run.

19
00:01:10,320 --> 00:01:15,000
Then we can install detectors to the specific vision right here.

20
00:01:15,010 --> 00:01:21,490
So that's located in this URL as well, and that takes about five seconds as well.

21
00:01:21,510 --> 00:01:22,110
Pretty quick.

22
00:01:22,890 --> 00:01:28,780
Then we just import to libraries that we're going to use that we've done with our data set here and

23
00:01:28,800 --> 00:01:33,750
says the mushroom data so that you can see has quite a few different categories actually believe.

24
00:01:35,880 --> 00:01:37,080
Take a look at some of these here.

25
00:01:38,050 --> 00:01:43,110
I actually, I think, is just two categories, or it's not that make categories of mushroom.

26
00:01:43,650 --> 00:01:44,730
I should probably know this.

27
00:01:44,850 --> 00:01:46,170
We actually can see.

28
00:01:46,890 --> 00:01:51,810
We can investigate this a bit if we just take a look at this data sets here.

29
00:01:52,650 --> 00:01:59,460
You can see it should tell us how many different mushrooms, chicken of the woods and central elicit

30
00:01:59,670 --> 00:02:02,040
just to a species of mushroom, actually.

31
00:02:02,760 --> 00:02:04,740
So let's go back to the notebook.

32
00:02:04,890 --> 00:02:06,770
We were sorry about scrolling.

33
00:02:08,070 --> 00:02:09,240
It's going to make you a bit dizzy.

34
00:02:09,420 --> 00:02:17,640
You can imagine so this function here, we pointed to this that files this one is encoded as the cuckoo

35
00:02:17,820 --> 00:02:22,920
Jason so file, which you can take a look at here if you wanted to.

36
00:02:23,550 --> 00:02:25,230
Let's see if it's in this folder.

37
00:02:25,620 --> 00:02:26,220
Here it is.

38
00:02:26,790 --> 00:02:32,670
You can see the annotations are like this where you have the assets, as did actually the file.

39
00:02:32,670 --> 00:02:36,450
And for the categories, this is what annotations look like here.

40
00:02:36,720 --> 00:02:39,210
So you can see the height imitates.

41
00:02:40,590 --> 00:02:43,320
Actually, this doesn't have to be on the books, does it?

42
00:02:43,350 --> 00:02:43,890
Yes, it is.

43
00:02:43,890 --> 00:02:50,190
To be in the box corresponding to each of those IDs is here as well in the file format.

44
00:02:51,240 --> 00:02:56,540
So now we can move on to setting up and sorting out training.

45
00:02:57,150 --> 00:03:03,680
So firstly, with visualize some of the labels here, you can see this is the color of go with its standard

46
00:03:03,690 --> 00:03:06,760
stood for Chicken of the woods, apparently.

47
00:03:06,840 --> 00:03:10,380
And this is a chance to really mushroom here.

48
00:03:10,500 --> 00:03:15,590
So now we can just start training or custom detection to detect them.

49
00:03:16,350 --> 00:03:23,850
So we create this Katrina class here that is going to build which in the cuckoo evaluator set here and

50
00:03:23,850 --> 00:03:24,180
from that.

51
00:03:24,180 --> 00:03:32,570
So from our detection to libraries here and notices to file that actually start the starts, Katrina.

52
00:03:33,180 --> 00:03:38,310
You can see we can set some settings here, some woman by corrections, some different configurations

53
00:03:38,310 --> 00:03:38,760
of things.

54
00:03:38,760 --> 00:03:39,990
If you don't know what these are.

55
00:03:40,470 --> 00:03:42,240
I suggest you leave them alone.

56
00:03:44,040 --> 00:03:49,370
Either way, it's probably going to get decent results with the text one, two and no control.

57
00:03:50,130 --> 00:03:54,540
You can see it starts to train right here, and it's nice and neat display.

58
00:03:54,690 --> 00:03:59,220
Up until you can see how much memory is occupying this CPU memory.

59
00:03:59,220 --> 00:04:02,700
I believe you can see lots different lost functions here.

60
00:04:02,700 --> 00:04:07,920
You can see it going down south of that point nine point ninety one and starts to go down gradually

61
00:04:08,100 --> 00:04:09,300
as the box loss.

62
00:04:09,960 --> 00:04:13,080
Then there's different losses here.

63
00:04:13,800 --> 00:04:15,060
Total loss as well.

64
00:04:15,750 --> 00:04:21,390
And you can see it's turning each iteration here displays the output right here, every 20, it looks

65
00:04:21,390 --> 00:04:21,690
like.

66
00:04:22,680 --> 00:04:26,280
And you can also visualize the results later on in the tens of board here.

67
00:04:27,480 --> 00:04:33,300
And while the you can see how we can test a model so we can test it right now because that's training.

68
00:04:33,900 --> 00:04:40,200
But you can inference, which does seem to be its here, and you can see the inference we get here is

69
00:04:40,200 --> 00:04:41,170
these are the bounding box.

70
00:04:41,190 --> 00:04:42,930
This is what our model is predicting.

71
00:04:43,650 --> 00:04:50,250
This is quite good, quite accurate because these definitely do look like the correct classes and not

72
00:04:50,250 --> 00:04:52,500
a mushroom expert, but I believe these are correct.

73
00:04:53,700 --> 00:04:54,720
So that's pretty good.

74
00:04:55,350 --> 00:04:57,270
So that's it for this lesson.

75
00:04:57,300 --> 00:04:58,350
Thank you for watching.

76
00:04:58,500 --> 00:04:59,940
And in the next.

77
00:05:00,030 --> 00:05:06,090
Listen, we'll take a look at website screenshot region detection using your look for darknet.

78
00:05:06,210 --> 00:05:07,710
So stay tuned for that lesson.

79
00:05:07,830 --> 00:05:08,280
Thank you.
