-
Notifications
You must be signed in to change notification settings - Fork 44
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
How to use Custom RGB Image as background during rendering #52
Comments
Great suggestion! We have integrated the bg_image feature into both the dataset and the renderer. Now, when you train using a dataset that includes masks, we will automatically use the background portion of the original image as the background model. This should be beneficial in your scenario! |
To test the feature, you can utilize this repository. Refer to the implementation shown in the following code snippets from train.py: if viewpoint_cam.bg_image is not None:
bg = viewpoint_cam.bg_image.to("cuda").permute(2, 0, 1)
else:
if dataset.white_background:
bg_image_tensor = torch.ones((height, width, 3)).to("cuda")
else:
bg_image_tensor = torch.zeros((height, width, 3)).to("cuda") Additionally, in __init__.py: rendered_image = rendered_image + (1-rendered_final_opacity).repeat(3, 1, 1) * bg_color We have now added support to use the preloaded |
As shown in [colmap.py]https://github.com/GAP-LAB-CUHK-SZ/gaustudio/blob/master/gaustudio/datasets/colmap.py#L94C1-L105C87,
We use the given mask to calculate the background |
Hi,
This looks like an awesome library. I see that you are building support for background models. I was wondering if it would be possible to use a custom RBB image (3 channels) as background during training instead of using a single background color as done in vanilla 3DGS.
I want to reconstruct a scene with single object with precise boundaries, however the matting that I apply to my multiview images (using off-the-shelf matting methods) is not 100% perfect so I get some artefacts in my scene during rendering. Rendering it with a pre-captured background could solve it, I guess, but I think it's not possible to do this with vanilla 3DGS. Do you plan to provide something like that?
The text was updated successfully, but these errors were encountered: