autonomousvision / gaussian-opacity-fields

Gaussian Opacity Fields: Efficient and Compact Surface Reconstruction in Unbounded Scenes
https://niujinshuchong.github.io/gaussian-opacity-fields/
Other
559 stars 26 forks source link

Question about add_densification_stats #47

Open programath opened 3 weeks ago

programath commented 3 weeks ago

I am quite confused that why does the code here use the last value of the last dimension of viewspace_point_tensor.grad to accumulate the absolute value of gradient, while the original gaussian splatting uses the first two value instead? I can't find the explanation from the equation (14) and (15) in the paper. https://github.com/autonomousvision/gaussian-opacity-fields/blob/98d0858974437d329720727ee34e42e388425112/scene/gaussian_model.py#L649

niujinshuchong commented 3 weeks ago

Hi, the third dimension is the sum of the norm of individual pixel gradients (eq. 15 in the paper). You can check the Cuda code here https://github.com/autonomousvision/gaussian-opacity-fields/blob/main/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.cu#L931-L933 .