autonomousvision / mip-splatting

[CVPR'24 Best Student Paper] Mip-Splatting: Alias-free 3D Gaussian Splatting
https://niujinshuchong.github.io/mip-splatting/
Other
1.01k stars 65 forks source link

About subpixel_offset #42

Closed Gatswei closed 1 month ago

Gatswei commented 1 month ago

Great work! And I have a question about code? This parameter(subpixel_offset)is not used by default in the code. What is the meaning of this code?

 #TODO ignore border pixels
        if dataset.ray_jitter:
            subpixel_offset = torch.rand((int(viewpoint_cam.image_height), int(viewpoint_cam.image_width), 2), dtype=torch.float32, device="cuda") - 0.5
            # subpixel_offset *= 0.0
        else:
            subpixel_offset = None

        if dataset.resample_gt_image:
            gt_image = create_offset_gt(gt_image, subpixel_offset)
niujinshuchong commented 1 month ago

Hi, the goal is to simulate rendering higher resolution images by sampling different pixel locations and supervise it with interpolated results from the ground truth images such that we don't see artifacts when rendering higher resolution images after training. We implemented it at the beginning of this project but in the end we found using a 3D smoothing filter is simpler and works better.