Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on nerf matrix to ngp #169

Open
ckLibra opened this issue May 23, 2023 · 0 comments
Open

Question on nerf matrix to ngp #169

ckLibra opened this issue May 23, 2023 · 0 comments

Comments

@ckLibra
Copy link

ckLibra commented May 23, 2023

Hi, thanks for your great project! I have a question on the pose conversion in provider. Your function nerf_matrix_to_ngp seems transpose [x,y,z] as [y,z,x], which is not applied in https://github.com/NVlabs/instant-ngp/blob/b76004c8cf478880227401ae763be4c02f80b62f/include/neural-graphics-primitives/nerf_loader.h#L50. I wonder the reason of this.

`
def nerf_matrix_to_ngp(pose, scale=0.33, offset=[0, 0, 0]):

# for the fox dataset, 0.33 scales camera radius to ~ 2

new_pose = np.array([
    [pose[1, 0], -pose[1, 1], -pose[1, 2], pose[1, 3] * scale + offset[0]],
    [pose[2, 0], -pose[2, 1], -pose[2, 2], pose[2, 3] * scale + offset[1]],
    [pose[0, 0], -pose[0, 1], -pose[0, 2], pose[0, 3] * scale + offset[2]],
    [0, 0, 0, 1],
], dtype=np.float32)

return new_pose

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant