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

Handle alpha images properly for instant-ngp and tensorf models #2979

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

trinh31201
Copy link
Contributor

instant-ngp and tensorf models are currently not handling training on transparent images properly as other models do, resulting in worse performance on synthetic datasets.

Currently, the alpha channel is simply being removed which prevents proper handling of background rendering which blend_background_for_loss_computation is supposed to handle for support of rendering random background color during training etc.

This PR just changes the code to pass the full image to be consistent with other models:

image = batch["image"].to(self.device)

image = batch["image"].to(self.device)

Copy link
Collaborator

@kerrj kerrj left a comment

Choose a reason for hiding this comment

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

sgtm

@kerrj kerrj enabled auto-merge (squash) March 5, 2024 20:44
@kerrj kerrj merged commit 6e6cedd into nerfstudio-project:main Mar 5, 2024
2 checks passed
Michael-Spleenlab pushed a commit to Michael-Spleenlab/nerfstudio that referenced this pull request Apr 26, 2024
…studio-project#2979)

Co-authored-by: Đinh Trinh <dinhtrinh@MacBook-Air-cua-Trinh.local>
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

2 participants