1
00:00:00,600 --> 00:00:02,900
Hey, welcome back in this lesson.

2
00:00:02,940 --> 00:00:12,000
Lesson 44 will be training is sign language detection model that's built upon the efficient detect model.

3
00:00:12,640 --> 00:00:17,610
So it's going to be using the TensorFlow object detection API again.

4
00:00:18,120 --> 00:00:19,380
So let's get started.

5
00:00:19,470 --> 00:00:24,440
So open Notebook 44, which I've already done here, and we'll see.

6
00:00:24,480 --> 00:00:27,690
So this is what the sign language one of the images looks like.

7
00:00:27,990 --> 00:00:34,080
And again, this is from a room floor notebook, so please visit them and give them your support.

8
00:00:34,110 --> 00:00:41,250
They're actually extremely, extremely good at probably one of the best computer vision type companies

9
00:00:41,250 --> 00:00:45,930
that enable model training model deployment data labeling out there.

10
00:00:45,930 --> 00:00:46,620
They're they're quite good.

11
00:00:46,620 --> 00:00:47,730
I'm quite impressed with them.

12
00:00:48,210 --> 00:00:52,160
So it says busier than that's because I'm training the network right now.

13
00:00:52,230 --> 00:00:59,130
However, I accidentally closed a club notebook and reopened it, so I lost the time it takes to run

14
00:00:59,130 --> 00:00:59,760
itself.

15
00:01:00,300 --> 00:01:03,400
But that's okay, because these things don't take too long the most.

16
00:01:03,420 --> 00:01:06,750
Each of these are going to take might be roughly about a minute.

17
00:01:06,990 --> 00:01:10,830
So you can just go through all of these different lines of code.

18
00:01:11,760 --> 00:01:14,010
These are the setup and import libraries.

19
00:01:14,490 --> 00:01:22,950
These are the cluding of the of the TensorFlow Object Detection API, as well as some of the model configuration

20
00:01:22,950 --> 00:01:23,640
files.

21
00:01:23,970 --> 00:01:28,110
So and installs, I should say actually what?

22
00:01:28,110 --> 00:01:34,130
This is this one here, this one actually builds the entire model builder here, so you can actually

23
00:01:34,140 --> 00:01:35,280
start that he had.

24
00:01:35,280 --> 00:01:37,430
This doesn't take that long to run, actually.

25
00:01:38,370 --> 00:01:40,010
Next, we create some functions.

26
00:01:40,020 --> 00:01:42,510
This is a mode image into an umpire ray function.

27
00:01:42,990 --> 00:01:44,920
This one plots detections.

28
00:01:45,600 --> 00:01:50,100
Next, we can prepare or TensorFlow for action training data.

29
00:01:50,700 --> 00:01:56,730
So we get the data TensorFlow t.f record, which, as you've seen before, has a duty of record file

30
00:01:56,730 --> 00:01:59,550
as well as a PBE to file these here.

31
00:02:00,150 --> 00:02:04,110
And we have it for Test Train and Val, so we get our data.

32
00:02:04,110 --> 00:02:07,200
Do we set our parts there?

33
00:02:07,800 --> 00:02:11,430
Then we create the custom model config here.

34
00:02:11,850 --> 00:02:13,830
So you can choose which backbone you want.

35
00:02:13,890 --> 00:02:14,640
This is efficient.

36
00:02:14,640 --> 00:02:20,610
Detect the zero, which is the latest with with model, and it's actually surprisingly accurate for

37
00:02:20,610 --> 00:02:21,750
such a lightweight model.

38
00:02:21,810 --> 00:02:28,130
I've used it in some real world applications, and it definitely performs better than the mobile SSD.

39
00:02:28,200 --> 00:02:29,190
I'm quite happy with it.

40
00:02:29,610 --> 00:02:31,950
D1 and D2 industry are all better.

41
00:02:32,040 --> 00:02:38,610
The tree and D4 actually D4 isn't available here, but the tree is quite good.

42
00:02:38,610 --> 00:02:42,520
It actually rivals Eula performance in the real world, in my opinion.

43
00:02:42,540 --> 00:02:47,640
Yellow is always a little bit better, though, and a little bit faster in some cases, but deficient

44
00:02:47,640 --> 00:02:48,390
exact models.

45
00:02:48,840 --> 00:02:55,540
They can be optimized for arm devices like Android or iOS using to test light conversion.

46
00:02:55,830 --> 00:02:59,910
So and he can even quantify it and prove it so you can get some quite.

47
00:02:59,910 --> 00:03:06,210
You can get quite small models that have quite powerful and quite efficient in inference time.

48
00:03:06,210 --> 00:03:11,640
Inference time is the time it takes the model to process one three one image.

49
00:03:12,120 --> 00:03:17,370
So if you have an inference time that's quite short, like under point zero five milliseconds seconds,

50
00:03:17,370 --> 00:03:23,730
actually, then you can sort of get almost real Real-Time Speed because you want to get to to reframe

51
00:03:23,730 --> 00:03:24,630
to second, ideally.

52
00:03:25,440 --> 00:03:30,540
So you can see these models can come quite close to that being so lightweight anyway.

53
00:03:31,680 --> 00:03:39,390
So now we just sort of the pre-trained checkpoint files and then we also get the base training configuration

54
00:03:39,390 --> 00:03:45,450
file, which is a tiny file anyway for the D0 model, which is what we'll be training next week.

55
00:03:45,450 --> 00:03:51,530
Propel Pipeline to get the number of classes and the classes in this data set is going to be actually

56
00:03:51,540 --> 00:03:52,110
don't know it.

57
00:03:52,140 --> 00:03:59,300
Often I need to check that dataset again, but quite a quite a few and sign language signs before.

58
00:03:59,300 --> 00:04:03,240
In the previous two models, we were training basically one class.

59
00:04:03,270 --> 00:04:08,910
Now we're going to train a multi class object detector, which obviously is harder because you have

60
00:04:08,910 --> 00:04:10,350
so many classes to distinguish.

61
00:04:10,830 --> 00:04:13,530
You can have a lot of confusion between classes.

62
00:04:13,530 --> 00:04:18,360
Sometimes confidences can be quite close for two different classes at times.

63
00:04:18,990 --> 00:04:25,140
So next we write to a custom configuration file here and then we can do splits here so it can take a

64
00:04:25,140 --> 00:04:29,100
look and just make sure everything is as what you expect.

65
00:04:29,100 --> 00:04:30,840
All your settings are correct.

66
00:04:31,320 --> 00:04:37,170
These things matter, especially when you're hard coding that I shouldn't say hard coding, but when

67
00:04:37,170 --> 00:04:43,350
you're converting the model to be deployed on a different server, a lot of these things need to be

68
00:04:43,350 --> 00:04:45,430
set correctly in the model as well.

69
00:04:45,450 --> 00:04:50,970
So just remember that that's something I tend to take for granted sometimes in research.

70
00:04:50,970 --> 00:04:57,580
But in reality, when you're in the working world and deploying models, that's what you have to consider.

71
00:04:57,600 --> 00:04:59,520
So now you can see this is what I'm doing here.

72
00:05:00,110 --> 00:05:03,080
I'm training to models, you can see how it starts here.

73
00:05:03,890 --> 00:05:09,110
Then you can see all of these warnings that come up with TensorFlow because TensorFlow is constantly

74
00:05:09,110 --> 00:05:12,830
changing, so they're going to be warnings about things being deprecated.

75
00:05:13,010 --> 00:05:16,130
So what you should use, but we will ignore those for now.

76
00:05:17,150 --> 00:05:23,480
Next, you can see Prince, the localization, Los regularisation loss, total loss, as well as learning

77
00:05:23,480 --> 00:05:27,410
rate, which is which is an adaptive learning rate that can see it changes constantly.

78
00:05:28,100 --> 00:05:31,700
And you can see that it goes through epoch of footsteps here.

79
00:05:32,000 --> 00:05:36,230
It's done very poorly book and you can see that we're getting better and better.

80
00:05:37,280 --> 00:05:45,680
Losses total loss point sixty six now, whereas when we started, it was sort of the one you can see

81
00:05:45,680 --> 00:05:49,010
here, and it's probably higher 1.4 to two.

82
00:05:49,040 --> 00:05:51,380
You can see the losses going down as we expect.

83
00:05:51,410 --> 00:05:52,640
Always good to check that.

84
00:05:53,420 --> 00:05:54,830
So that's a death.

85
00:05:54,920 --> 00:06:00,410
What we're going to do now, I'm not going to interrupt the training, but what we'll do is we'll take

86
00:06:00,410 --> 00:06:02,510
a look at the previous stuff around before.

87
00:06:02,990 --> 00:06:07,130
So you can see how the inference looks here so we can run some test images here.

88
00:06:07,130 --> 00:06:11,630
So let's just download the images again and get our test images here.

89
00:06:13,220 --> 00:06:14,190
We have the same functions.

90
00:06:14,190 --> 00:06:19,840
This function actually has been declared previously, but there were still from check points.

91
00:06:19,840 --> 00:06:23,230
That's the model with us free and certain model parts.

92
00:06:23,240 --> 00:06:25,550
You see, it's a lot of work actually to get this done.

93
00:06:26,060 --> 00:06:26,630
But no.

94
00:06:26,720 --> 00:06:33,290
Finally, we can see this is the letter Q and one image you can probably alternate changing different

95
00:06:33,290 --> 00:06:35,930
images somewhere in these files here right here.

96
00:06:36,440 --> 00:06:39,110
You can choose a random choice every time you run this block of code.

97
00:06:39,110 --> 00:06:43,010
It's going to create a new image and you can see if it's correct or not.

98
00:06:43,010 --> 00:06:47,060
I actually don't know sign language, so I'm hoping this is correct.

99
00:06:47,300 --> 00:06:50,720
But nevertheless, this is quite cool.

100
00:06:51,110 --> 00:06:56,840
This is quite a cool project and you can learn a lot from this and this can actually be used in a mobile

101
00:06:56,840 --> 00:06:57,680
phone afterward.

102
00:06:58,190 --> 00:07:04,490
You can just check out later lessons, which I might put up, hopefully, which is a which is about

103
00:07:04,490 --> 00:07:08,990
deploying these models to Android and iOS.

104
00:07:09,320 --> 00:07:11,360
So stay tuned for the next lesson.

105
00:07:11,960 --> 00:07:19,310
We will look at pothole detection using tiny little vision four, so I'll stop there and I'll see you

106
00:07:19,310 --> 00:07:19,970
in the next lesson.

107
00:07:20,180 --> 00:07:20,570
Thank you.
