qq456cvb / Point-Transformers

Point Transformers
MIT License
625 stars 103 forks source link

Question about modelnet40_normal_resampled #15

Closed jah05 closed 3 years ago

jah05 commented 3 years ago

Hi @qq456cvb,

I've had experience working with the ModelNet40 data which usually comes in the format of .OFF https://segeval.cs.princeton.edu/public/off_format.html with x, y, z listed in each file. However, the dataset provided on this repo is from the shapenet website and seems to be in a different format.

Digging through the files, I find that there are 3 extra values following the x, y, z. What do these 3 additional values represent? What are the differences between the two mentioned datsets?

Thanks!

engelnico commented 3 years ago

Hi @jah05,

The additional features compose the normal vector for each point (which is perpendicular with respect to the objects' surface). So you usually have x, y, z, n_x, n_y, n_z.

You can also see it in the dataset name: it's the reason why it's called modelnet40_normal

jah05 commented 3 years ago

Hi @engelnico ,

Thanks for the response! Is there a specific reason all 6 features were utilized in training and testing the model? Based on my knowledge, there was no mention of the normalized vector in the original code/paper.

Thanks!

engelnico commented 3 years ago

Hi @jah05,

Glad I could help. Just upfront, it's called the normal vector, not normalized. A Normalized vector means that the length is 1, but points in the same direction as the original vector. A Normal vector is a vector that is perpendicular to an object.

The reason why normal vectors are used as additional features, is simply because it leads to a better performance. And everybody likes to report higher accuracies ;)

If I remember correctly, Qi et al introduced their own version of ModelNet40 when they proposed PointNet in 2017. ModelNet contains CAD shapes and they uniformly sampled points from the shape. When you do that, you also have the possibility to calculate the normal vector for each point based on the CAD shape. Thus, the normal vector is perpendicular to the objects' shape at that given point.

Qi et al also performed a normal vector estimation task with Pointnet++. I guess, that this is also a reason they included it in their version of ModelNet.

Since PointNet is one of the pioneering approaches for point cloud processing, nearly all authors (including myself) adopted this approach.

Now if you ask me why including normal vectors for each point improves the overall performance, i can only make assumptions. I believe that the normals help the network understand geometrical shape information. But this is just my interpretation and I could go into much more detail ;)

I hope this answers your question. To summarize: normals boost the performance, Qi et al introduced using normals for ModelNet, but you could very well discard the last 3 values of each row (i.e just use the x y z coordinates) and most networks would still work as expected.

jah05 commented 3 years ago

Hi @engelnico,

Really appreciate the detailed response and thanks for an awesome codebase.