We adhere to the protocol of Yu et al. [62] and evaluate on their
reported test set of 15 scenes
For LLFF, we adhere to community standards [36] and use every 8-th
image as the held-out test set and select the input views evenly from
the remaining images.
defPILtoTorch(pil_image, resolution): # When resizing RGBA, PIL pre-multiplies the resulting RGB with the resized alpha channel. This gives # different training behaviors depending on whether the image is actually resized (via -r flag) or not. # Moreover, the resized alpha is no longer a perfect binary image due to interpolation, which produces # a significant amount of floaters along the edges. To fix this, we manually mask the RGB if the input # is an RGBA, then we forget the alpha channel entirely. The multiplication of the rendered image with # the alpha_mask during training thus becomes a no-op for RGBA. if pil_image.mode == 'RGBA': from PIL import Image image_np = np.array(pil_image) rgb_np = image_np[..., :3] alpha_np = image_np[..., 3:] masked_rgb_np = (rgb_np / 255.0) * (alpha_np / 255.0) masked_rgb_np = np.clip(masked_rgb_np, 0.0, 1.0) pil_image = Image.fromarray((masked_rgb_np * 255).astype(np.uint8)) resized_image_PIL = pil_image.resize(resolution) resized_image = torch.from_numpy(np.array(resized_image_PIL)) / 255.0 iflen(resized_image.shape) == 3: return resized_image.permute(2, 0, 1) else: return resized_image.unsqueeze(dim=-1).permute(2, 0, 1)
I have a video of an indoor scene with an object bouncing around it
but I want to mask away the object. How is this possible?
I have the segmentation masks for it. I saw #101
that mentioned to append an A channel where the 0 means the pixel should
not be rendered but I had some questions about that.
Will it still work if in some frames, parts of my scene are blocked
by the object but are again visible in future frames if I mask this
way?
My goal is the get a fully fleshed 3D representation of the scene
minus the object