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

Check for normalized quats. #155

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Check for normalized quats. #155

merged 1 commit into from
Apr 2, 2024

Conversation

Mxbonn
Copy link
Contributor

@Mxbonn Mxbonn commented Mar 31, 2024

From #152 (comment) it seems like the quaternions should always be normalized because the back-propagate gradient implementation in cuda doesn't account the normalization step.
This PR adds a check for that.
Tagging @jb-ye .

@@ -57,6 +57,7 @@ def project_gaussians(
- **cov3d** (Tensor): 3D covariances.
"""
assert block_width > 1 and block_width <= 16, "block_width must be between 2 and 16"
assert (quats.norm(dim=-1) - 1 < 1e-6).all(), "quats must be normalized"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. But I want @vye16 to verify the change. See #153 for the reason of why we want to merge this PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely minor, but are there performance concerns here? This seems ~equivalent to a torch.cuda.synchronize() call.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

Copy link
Collaborator

@jb-ye jb-ye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prepare for next version 0.1.10

@jb-ye jb-ye merged commit c54fe8b into nerfstudio-project:main Apr 2, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants