google / mipnerf

Apache License 2.0
894 stars 109 forks source link

calculate the variance in 3D space? #11

Open shuochen365 opened 2 years ago

shuochen365 commented 2 years ago

Hi, this is a very interesting work that solves a key problem in NeRF. I don’t quite understand your code for calculating variance. Can you explain why it is calculated like this?

d_outer = d[..., :, None] * d[..., None, :]
eye = jnp.eye(d.shape[-1])
null_outer = eye - d[..., :, None] * (d / d_mag_sq)[..., None, :]
t_cov = t_var[..., None, None] * d_outer[..., None, :, :]
xy_cov = r_var[..., None, None] * null_outer[..., None, :, :]
cov = t_cov + xy_cov
jonbarron commented 2 years ago

Section 1 of the supplemental material has a complete derivation.