liuyuan-pal / NeuRay

[CVPR2022] Neural Rays for Occlusion-aware Image-based Rendering
GNU General Public License v3.0
407 stars 31 forks source link

Possible bug in equation (9) #42

Open rakhimovv opened 4 months ago

rakhimovv commented 4 months ago

Hi! Thank you for your work!

In the equation (9) in the paper:

\tilde{\alpha}(z_0,z_1)=\frac{t(z_1)-t(z_0)}{1-t(z_0)}

the denominator = 1-t(z_0)

While in code: alpha_value = torch.log(hit_prob / (visibility - hit_prob + eps) + eps) If we omit log the denominator = visibility - hit_prob = 1 - t(z_0) - (t(z_1) - t(z_0)) = 1-t(z_1)

The denominator in the paper and the code do not match.

Is this intended behaviour? and where is the error in the paper or the code or none?

liuyuan-pal commented 2 months ago

Hi, this is an estimation of the alpha value. In an ideal continuous case, we need to divide the 1-z at z(t). But in discrete cases, we may divide by either the left point or right point here.