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

add argument to provide a background depth when using RGB+D #512

Open
martinResearch opened this issue Dec 6, 2024 · 1 comment
Open

Comments

@martinResearch
Copy link
Contributor

When using RGB+D for rendering the depth, the depth in region or the image where there are not gaussians is zero.
This seems to be a somewhat arbitrary choice and in some cases we would like to use a positive constant value instead.
We can do that as a post-process using the rendered depth and the alpha value using
rendered_depth + (1-alpha) * background_depth, but it would make things clearer if the gsplat rendering function had a background_depth argument that defaults to 0 and that would allow the user to provide a different background depth.
To implement this we would modify the line here

[backgrounds, torch.zeros(C, 1, device=backgrounds.device)], dim=-1

by [backgrounds, background_depth * torch.ones(C, 1, device=backgrounds.device)], dim=-1

@Jai2500
Copy link

Jai2500 commented Dec 6, 2024

Can I take this up? The change seems simple enough and would be my first contribution.
However, I suggest using
torch.full((C, 1), background_depth, device=backgrounds.device, dtype=backgrounds.dtype)
as that should remove the redundant filling with 1 and subsequent multiplication.

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

2 participants