Hi and welcome back to the course in this section, we'll take a look at Point Cloud a classification,
so most likely you don't know what point cloud data is.
So let's jump into the lesson and I'll explain to you what it is and what we're doing.
So look at Lesson 68, and here we see this notebook.
Also, I should say, came from accuracies two official tutorial site.
And this one was prepared by David Griffiths.
So let's take a look at what point cloud data is.
So a point cloud.
It is actually just a set of points in 3D space, and you can see this little GIF animation here that
would build millions or billions of points.
You can recreate realistic treaty spaces just like this, adding textures and creating fetuses so you
can see point cloud data basically is 3D X-Y-Z data.
So to do this, firstly, we need to get the tri mesh package that allows us to load this type of mesh
point cloud data and visualize it in Python.
And so let's install that.
They're about six seconds, then pull to a libraries.
Then we loaded data data.
This takes about a minute just to have a minute to run.
So it might take some time.
So now we can use the trimester to load function and just load the first.
Zero zero one or file of that's type of file that has this type of mesh mesh data.
And you can see we were seeing a chip.
This is pretty cool, isn't it?
And you can move around, you can zoom in, zoom out.
And so you have just messing with it and you can experiment with different file names as well.
You can see the files in the directory here.
Let's just refresh.
Office, Oh, oh, it's this this and this is in the stall here, you have to navigate back to find
the directory.
So we won't do that now, but either way, you can just find the file names and some visualizing your
chairs.
So let's take a look at what it looks like if we do some uniform random sampling for 2048 locations
to generate our point cloud itself like this.
So there we go.
So we're converting a mess to a point cloud file.
So to do that, we now have to possibly the set and create mesh file sorry point of files for all the
data.
So we just prepared this function here and we just passed the data here and we process all the classes
of this takes about six minutes to run.
It takes a little while for the ten classes, and we're only looking at 10 classes.
Actually, I did not explain the dataset that we're using, but it's a 10 class version of the model.
That 40 dataset model and 40 has 10 sort of 40 different classes of data, just like, Oh, we have
ten here.
So now that we have all point cloud data, we can now read our data in and start creating or training
and test data here.
So we just do some augmentation here just to kind of very the point to that, a slightly to create some
sort of realistic digital to the data.
So now we're ready to build the model.
However, these two functions aren't basically the model, they're just functions we use to create a
conveyor along with to batch normalization normalization live there, as well as a dense net filter
here.
Would you just specify a number of filters and also the batch norm part of it as well?
So point that actually consists of two main components did this the primary MLP multilayer perception
head and the transformer that Tenet and Tenet aims to learn, and I find transmission metrics by its
own mini network, so it's actually used twice here.
So to do that, we actually need to have the orthogonal matrix.
So we use this orthogonal regularised class here to create that for us.
And then now we can define the general function that builds Tenet.
So this returns Tenet model that we're going to be using.
And now we can put together the main network here, which is Tenet, combining the different layers
and densely as I remember these functions we defined previously.
So now that gives us to final point net model.
Now you may think this is a pretty heavy big model.
However, it's actually just just under a million 740000 parameters inside of it.
So it's quite a lightweight network.
So no, that's compile and build sorry component fit to model, and you can see we have our training
steps takes about 20 seconds, but epochs it shouldn't take you more than 10 minutes to train.
You can see in the end, the validation sparse category accuracy is up to 83 percent, which is pretty
good if you probably trained for longer, you may have gotten some slightly better results.
Now we can visualize its predictions, so we just take one sample dataset here and basically we can
predict it.
By the way, when you say take one taking a batch, by the way.
So this is where we have a batch of images here, so you can see everything looks pretty good.
This was predicted to be a chair.
It's a chair.
This is also a chair.
This is also a desk nightstand and got correct.
This one predicted that some of it's a table, but to be honest, that's pretty much the same.
This one is dressed search here so far, so just not work is working quite well.
So we can stop this loop here because I don't need to save to keep this notebook alive anymore.
So that's it for the point in that point.
Cloud classification model, it's a quite useful model if you're dealing with treaty data that you want
to classify.
So hopefully you enjoyed a lesson and I'll see you in the next one.
Thank you.