google / mipnerf

Apache License 2.0
894 stars 109 forks source link

How to understand "The variance of the conical frustum with respect to its radius r is equal to the variance of the frustum with respect to x or (by symmetry) y. " #44

Open qhdqhd opened 1 year ago

qhdqhd commented 1 year ago

How to understand "The variance of the conical frustum with respect to its radius r is equal to the variance of the frustum with respect to x or (by symmetry) y. "in Supplemental Material? I think Var(r)=E(r^2)-E(r)^2 where -R<r<R so E(r)=0 E(r^2)=E(x^2+y^2)=E(x^2)+E(y^2)=E(x^2)-E(x)^2+E(y^2)-E(y)^2=Var(x)+Var(y) where E(x)=0 E(y)=0 SO Var(r)=Var(x)+Var(y) rather than Var(r)=Var(x) Where is my mistake?

qhdqhd commented 1 year ago

@jonbarron

wuzirui commented 1 year ago

same question here: since $$Var[r]=E[r^2]-E[r]^2=E[x^2]+E[y^2]-E[r]^2,$$ $$E[r] = \iiint rt\cdot r\text{d}r\text{d}t\text{d}\theta=\frac{\pi}{3}\dot{r}^3(t_1^3-t_0^3) $$

which does not correspond to the results in the supplementary materials @jonbarron

jonbarron commented 1 year ago

Hi everyone, thanks for helping investigate this! It seems like there's almost certainly a bug in the math where I missed a 2x multiplier. My mistake, sorry! This explains a lot, as we've noticed other places in the math where we seem to be wrong by a factor of two. I will dig into this and attempt to fix it --- though if anyone else wants to patch the math and push a CL with updated unit tests, feel free!

qhdqhd commented 1 year ago

I don't know if this improvement will improve the effect? The fitting ability of neural networks is too strong, may a difference of two times not affect the results too much? Look forward to your reply!