Skip to content
Discussion options

You must be logged in to vote

This was actually not as difficult as I initially thought. For anyone stumbling across this in future for their use case, essentially you make the point-face index unique across the batch by incrementing them (similar to what is done for the mesh face indices when collating) and then use scatter add across the one hot vectors to get the modal prediction (similar to how modal label is obtained here.

Sample implementation if interested:

increment = torch.concat([torch.tensor([0]), torch.cumsum(num_faces_per_sample)])[:-1]
unique_face_idxs = pointwise_face_idxs + offset.repeat_interleave(num_points_per_sample)

# We also increment the labels so that mesh faces that were missed in the point c…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rusty1s
Comment options

Answer selected by GericoVi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants