octree-nn / ocnn-pytorch

Octree-based 3D Convolutional Neural Networks
MIT License
152 stars 17 forks source link

Fix a bug in octree.to_points() #38

Closed sh8 closed 2 months ago

sh8 commented 2 months ago

Hi!

Thank you so much for the great work! I fixed a bug in octree.to_points() which does not rescale the coordinates of xyz correctly when self.points[self.depth] is None. Could you please check the code and merge it if this change looks good to you?

Thanks!

wang-ps commented 2 months ago

Thanks for figuring out this issue! I could not understand the purpose of the first line of modifictions. Please see my comments above.

sh8 commented 2 months ago

Since self.xyzb(depth, nempty=True) gives unnormalized points in the range of [0, 2^d], you have to rescale it to obtain correct xyz. I think that overriding the rescale argument is a bit ugly, but less confusing for users.

sh8 commented 2 months ago

Yes, you're right! I deleted L.497 accordingly

wang-ps commented 2 months ago

Thank you so much @sh8 , I have merged the pull request.