-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 multi-processing support for cache_image. Fixed the issue of insufficient precision leading to a completely black image when converting from RGBA to RGB. #2867
Conversation
…d SplatfactoModel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me! Just left two comments 🙂
Hi! I have updated the code based on the comments. Thank you for your suggestions! |
Also fixed the issue of insufficient precision leading to a completely black image when converting from RGBA to RGB. |
@@ -103,7 +103,7 @@ def get_image_uint8(self, image_idx: int) -> UInt8[Tensor, "image_height image_w | |||
assert (self._dataparser_outputs.alpha_color >= 0).all() and ( | |||
self._dataparser_outputs.alpha_color <= 1 | |||
).all(), "alpha color given is out of range between [0, 1]." | |||
image = image[:, :, :3] * image[:, :, -1:] / 255.0 + 255.0 * self._dataparser_outputs.alpha_color * ( | |||
image = image[:, :, :3] * (image[:, :, -1:] / 255.0) + 255.0 * self._dataparser_outputs.alpha_color * ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this bug.
lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm!
…fficient precision leading to a completely black image when converting from RGBA to RGB. (nerfstudio-project#2867)
Add multi-processing support for cache_images. Now caching image is way more faster.
(Kind of messed up with branches and comments, the only changed file is full_images_datamanager.py. Please bear with me.)