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

Replace depth alpha mask logic with torch.where for gradients in splatfacto #2856

Merged
merged 92 commits into from
Jan 31, 2024

Conversation

kerrj
Copy link
Collaborator

@kerrj kerrj commented Jan 31, 2024

No description provided.

kerrj and others added 30 commits October 10, 2023 17:11
kerrj and others added 22 commits January 19, 2024 10:51
@kerrj kerrj requested a review from ethanweber January 31, 2024 18:05
Copy link
Collaborator

@ethanweber ethanweber left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -779,8 +779,7 @@ def get_outputs(self, camera: Cameras) -> Dict[str, Union[torch.Tensor, List]]:
W,
background=torch.zeros(3, device=self.device),
)[..., 0:1] # type: ignore
depth_im[alpha > 0] = depth_im[alpha > 0] / alpha[alpha > 0]
depth_im[alpha == 0] = 1000
depth_im = torch.where(alpha > 0, depth_im / alpha, depth_im.detach().max())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just an unrelated comment, compute the mean(depth) has very high variance in estimation. I would prefer to compute mean(1/depth) as this is more related to disparity maps across views.

@kerrj kerrj merged commit 0e01a90 into main Jan 31, 2024
2 checks passed
@kerrj kerrj deleted the justin/fix_splat_depth branch January 31, 2024 22:03
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.

None yet

5 participants