Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Conversation

@bguillard
Copy link

In the current code for sampling a grid of SDF values, there is a rounding error in the computation of the regularly spaced 3D coordinates of the grid.
To exemplify my point, for N=256 (default), the (x,y,z)=(1,1,1) edge of the bounding box instead has coordinates

>>> samples[-1, :]
tensor([1.0078, 1.0078, 1.0000, 0.0000])

This error does not only affect coordinates on the cube's boundaries, but the whole volume.
I propose to properly carry integer division, which now yields:

>>> samples[-1, :]
tensor([1., 1., 1., 0.])

Despite the error in 3D coordinates being small, I have found this fix to improve 3D reconstruction metrics quite a bit (~5% on my task).

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants