1
00:00:00,240 --> 00:00:05,820
Hi and welcome back to the course in this section, we'll take a look at Point Cloud a classification,

2
00:00:06,420 --> 00:00:09,630
so most likely you don't know what point cloud data is.

3
00:00:09,660 --> 00:00:14,190
So let's jump into the lesson and I'll explain to you what it is and what we're doing.

4
00:00:14,880 --> 00:00:19,530
So look at Lesson 68, and here we see this notebook.

5
00:00:19,530 --> 00:00:25,380
Also, I should say, came from accuracies two official tutorial site.

6
00:00:25,830 --> 00:00:28,830
And this one was prepared by David Griffiths.

7
00:00:29,340 --> 00:00:32,190
So let's take a look at what point cloud data is.

8
00:00:32,250 --> 00:00:33,140
So a point cloud.

9
00:00:33,150 --> 00:00:40,860
It is actually just a set of points in 3D space, and you can see this little GIF animation here that

10
00:00:40,910 --> 00:00:43,440
would build millions or billions of points.

11
00:00:43,440 --> 00:00:50,820
You can recreate realistic treaty spaces just like this, adding textures and creating fetuses so you

12
00:00:50,820 --> 00:00:55,680
can see point cloud data basically is 3D X-Y-Z data.

13
00:00:57,090 --> 00:01:03,570
So to do this, firstly, we need to get the tri mesh package that allows us to load this type of mesh

14
00:01:03,570 --> 00:01:06,690
point cloud data and visualize it in Python.

15
00:01:07,350 --> 00:01:09,240
And so let's install that.

16
00:01:09,250 --> 00:01:12,810
They're about six seconds, then pull to a libraries.

17
00:01:13,320 --> 00:01:14,520
Then we loaded data data.

18
00:01:15,120 --> 00:01:17,730
This takes about a minute just to have a minute to run.

19
00:01:18,600 --> 00:01:19,720
So it might take some time.

20
00:01:20,460 --> 00:01:24,900
So now we can use the trimester to load function and just load the first.

21
00:01:25,920 --> 00:01:31,710
Zero zero one or file of that's type of file that has this type of mesh mesh data.

22
00:01:32,970 --> 00:01:35,730
And you can see we were seeing a chip.

23
00:01:36,120 --> 00:01:37,070
This is pretty cool, isn't it?

24
00:01:37,080 --> 00:01:41,280
And you can move around, you can zoom in, zoom out.

25
00:01:42,240 --> 00:01:48,200
And so you have just messing with it and you can experiment with different file names as well.

26
00:01:48,210 --> 00:01:50,880
You can see the files in the directory here.

27
00:01:50,880 --> 00:01:52,050
Let's just refresh.

28
00:01:55,600 --> 00:02:02,540
Office, Oh, oh, it's this this and this is in the stall here, you have to navigate back to find

29
00:02:02,560 --> 00:02:03,310
the directory.

30
00:02:04,270 --> 00:02:10,240
So we won't do that now, but either way, you can just find the file names and some visualizing your

31
00:02:10,240 --> 00:02:10,660
chairs.

32
00:02:11,740 --> 00:02:19,510
So let's take a look at what it looks like if we do some uniform random sampling for 2048 locations

33
00:02:19,510 --> 00:02:22,120
to generate our point cloud itself like this.

34
00:02:22,720 --> 00:02:23,780
So there we go.

35
00:02:23,800 --> 00:02:26,230
So we're converting a mess to a point cloud file.

36
00:02:26,290 --> 00:02:34,630
So to do that, we now have to possibly the set and create mesh file sorry point of files for all the

37
00:02:34,630 --> 00:02:35,080
data.

38
00:02:35,260 --> 00:02:41,560
So we just prepared this function here and we just passed the data here and we process all the classes

39
00:02:41,920 --> 00:02:44,300
of this takes about six minutes to run.

40
00:02:44,320 --> 00:02:48,900
It takes a little while for the ten classes, and we're only looking at 10 classes.

41
00:02:48,910 --> 00:02:54,570
Actually, I did not explain the dataset that we're using, but it's a 10 class version of the model.

42
00:02:54,590 --> 00:03:01,120
That 40 dataset model and 40 has 10 sort of 40 different classes of data, just like, Oh, we have

43
00:03:01,120 --> 00:03:01,690
ten here.

44
00:03:02,740 --> 00:03:11,230
So now that we have all point cloud data, we can now read our data in and start creating or training

45
00:03:11,230 --> 00:03:12,370
and test data here.

46
00:03:12,580 --> 00:03:19,270
So we just do some augmentation here just to kind of very the point to that, a slightly to create some

47
00:03:19,840 --> 00:03:22,090
sort of realistic digital to the data.

48
00:03:22,630 --> 00:03:24,430
So now we're ready to build the model.

49
00:03:25,180 --> 00:03:30,340
However, these two functions aren't basically the model, they're just functions we use to create a

50
00:03:30,340 --> 00:03:37,270
conveyor along with to batch normalization normalization live there, as well as a dense net filter

51
00:03:37,270 --> 00:03:37,690
here.

52
00:03:37,700 --> 00:03:43,120
Would you just specify a number of filters and also the batch norm part of it as well?

53
00:03:43,570 --> 00:03:49,600
So point that actually consists of two main components did this the primary MLP multilayer perception

54
00:03:49,600 --> 00:03:56,320
head and the transformer that Tenet and Tenet aims to learn, and I find transmission metrics by its

55
00:03:56,320 --> 00:03:59,110
own mini network, so it's actually used twice here.

56
00:03:59,710 --> 00:04:03,310
So to do that, we actually need to have the orthogonal matrix.

57
00:04:03,310 --> 00:04:08,020
So we use this orthogonal regularised class here to create that for us.

58
00:04:08,020 --> 00:04:11,590
And then now we can define the general function that builds Tenet.

59
00:04:12,040 --> 00:04:15,730
So this returns Tenet model that we're going to be using.

60
00:04:16,180 --> 00:04:21,520
And now we can put together the main network here, which is Tenet, combining the different layers

61
00:04:21,520 --> 00:04:25,150
and densely as I remember these functions we defined previously.

62
00:04:25,870 --> 00:04:29,020
So now that gives us to final point net model.

63
00:04:29,470 --> 00:04:32,320
Now you may think this is a pretty heavy big model.

64
00:04:32,330 --> 00:04:38,770
However, it's actually just just under a million 740000 parameters inside of it.

65
00:04:38,770 --> 00:04:40,480
So it's quite a lightweight network.

66
00:04:41,440 --> 00:04:48,490
So no, that's compile and build sorry component fit to model, and you can see we have our training

67
00:04:48,490 --> 00:04:54,020
steps takes about 20 seconds, but epochs it shouldn't take you more than 10 minutes to train.

68
00:04:54,640 --> 00:05:00,850
You can see in the end, the validation sparse category accuracy is up to 83 percent, which is pretty

69
00:05:00,850 --> 00:05:05,170
good if you probably trained for longer, you may have gotten some slightly better results.

70
00:05:05,770 --> 00:05:14,200
Now we can visualize its predictions, so we just take one sample dataset here and basically we can

71
00:05:14,200 --> 00:05:14,760
predict it.

72
00:05:15,010 --> 00:05:17,790
By the way, when you say take one taking a batch, by the way.

73
00:05:17,800 --> 00:05:23,080
So this is where we have a batch of images here, so you can see everything looks pretty good.

74
00:05:23,260 --> 00:05:24,730
This was predicted to be a chair.

75
00:05:24,730 --> 00:05:25,420
It's a chair.

76
00:05:26,020 --> 00:05:27,100
This is also a chair.

77
00:05:27,130 --> 00:05:30,610
This is also a desk nightstand and got correct.

78
00:05:30,940 --> 00:05:36,190
This one predicted that some of it's a table, but to be honest, that's pretty much the same.

79
00:05:37,030 --> 00:05:41,620
This one is dressed search here so far, so just not work is working quite well.

80
00:05:42,310 --> 00:05:47,020
So we can stop this loop here because I don't need to save to keep this notebook alive anymore.

81
00:05:48,130 --> 00:05:51,640
So that's it for the point in that point.

82
00:05:51,640 --> 00:05:57,580
Cloud classification model, it's a quite useful model if you're dealing with treaty data that you want

83
00:05:57,580 --> 00:05:58,520
to classify.

84
00:05:59,170 --> 00:06:02,800
So hopefully you enjoyed a lesson and I'll see you in the next one.

85
00:06:02,920 --> 00:06:03,370
Thank you.
