jingsenzhu / i2-sdf

[CVPR 2023] I^2-SDF: Intrinsic Indoor Scene Reconstruction and Editing via Raytracing in Neural SDFs
MIT License
184 stars 10 forks source link

Inconsistent normal losses #12

Open cr333 opened 1 year ago

cr333 commented 1 year ago

I wanted to let you know about an inconsistency in the code.

The code seems to contain two normal losses:

  1. get_normal_l1_loss, which actually computes an angular loss, as pointed out in Equation 12 of your paper. This name seems confusing, as it does not compute the L1 normal loss.
  2. get_normal_angular_loss, which actually computes the truncated scaled angle.

However, the loss computation in forward uses loss 1 above twice (see this line), weighted by (self.normal_weight + self.angular_weight), and loss 2 above is not used at all.