pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.01k stars 3.62k forks source link

Meshes with different topology #2066

Open asadabbas09 opened 3 years ago

asadabbas09 commented 3 years ago

❓ Questions & Help

Thanks for the awesome library.

I'm trying to implement SpiralNet++ for a node/vertex regression task. SpiralNet architecture assumes that input meshes having the same topology.

But my dataset has input meshes with a different number of vertices/faces. How should I use SpiralNet or any other geometric convolutional operator in this case?

Is it possible to sample input meshes and apply convolution on a subset of meshes and then aggregate the result? Or is there any other way to deal with meshes having different topologies?

Thanks.

ldv1 commented 3 years ago

Another way would be pooling. But it is going not to be easy because you do not specify the number of nodes but the pooling ratio.

asadabbas09 commented 3 years ago

Thanks, @ldv1 yeah that's another issue.

One other way that I can think of is to use use simplify_quadratic_decimation from trimesh to get a fixed number of faces/vertices across all meshes.

Then I need to do interpolation of node features from original mesh to interpolated mesh, and I'm not sure if there is an easier way of doing it.

Another way that I can think of is to do sampling on original mesh and reconstruct mesh from sampled points, then I am afraid I will lose information about sharp edges and overall geometrical structure.

But ideally, I would like to do something within the network to account for different topologies and not use any preprocessing/postprocessing steps.

rusty1s commented 3 years ago

In general, message passing point cloud networks are invariant to node size, and at first look, I do not see a reason why SpiralNet++ is limited to the same number of vertices across examples. Can you clarify?