Open xiaomingjie opened 4 years ago
Have a look at the radius_graph
and knn_graph
methods. They exist both as normal functions and as transforms.
Thank you for your kindly reply. Is data.pos
a matrix of n*3 which n indicates point numbers and 3 indicateds xyz coordinate?
Yes, but both methods do also work with any number of features (not just 3).
Thanks. Question solved.
Excuse me. When I tried to perform knn_graph, I found that I cant get data.batch in my own dataset. my data format is like [b,n,c] while knn_graph needed [n,c]. How can I perform knn_graph batch by batch?
You need to either reshape your data to [b*n, c] and create your batch object manually
torch.arange(0, b).view(-1, 1).repeat(1, n).view(-1)
or default to other libraries such as the KeOps library which might handle this regular case much faster :)
Hey @xiaomingjie, have a look at https://github.com/nicolas-chaulet/deeppointcloud-benchmarks
❓ Questions & Help
Almost all the graph convolutions need edge_index which is provided by some certain datasets. With those datasests such as ShapeNet whose point clouds are unordered and with no edges in them, is there any approaches to get edge_index and perform such gnns?