Add blender dataset + alpha training support #573
+208
−30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds the following:
The latter is the main intended purpose of the pull request, and the former is to allow for convenient testing on a public dataset with transparent images. Building off of this work, users can train models using matted photos to only produce splats for the object of interest - however this would require a small additional change on the COLMAP parsing to load the alpha channel (and is not included in this pull request).
Alpha is handled in the following way:
random_bkgd
isTrue
: on each iteration the same random background color is applied for both the photo and renderUsing the random background in training encourages better alpha consistency and reduces floaters. However, the final evaluation metrics are marginally worse than if using a fixed background. For this reason, I have not enforced a setting of
random_bkgd = True
when blender data is used.The metrics are included below.
alpha_iou
is the intersection over union comparing the rendered alpha to the source image alpha channel (thresholding on> 127
). nerfbaselines has also assessed the Blender dataset on an earlier version ofgsplat
(patching in the dataset compatibility on their end). Compared to their results, 6 scenes show marginally better PSNR while 2 (materials and ficus) have marginally worse PSNR.