You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cotcurv method of the mesh_laplacian_smoothing function is supposed to compute loss as: \sum_j w_ij(u_j - u_i) / (4 A[i])
where w_ij = (cot a_ij + cot b_ij) following reference [1] in the docs.
However, the implementation does not follow this, and computes loss as: (\sum_j (w_ij u_j) - u_i) / (4 A[i])
These two aren't equivalent as \sum_j w_ij doesn't sum-up to 1.
Instructions To Reproduce the Issue:
The effect of this bug is evident when you compute the cotcurv laplacian loss for ico-spheres of different levels. Since the 'cotcurv' laplacian is supposed to capture mean curvature, we expect the laplacian loss to be the same at different level ico-spheres. However, that's not the case:
I implemented those and there is a high chance you are right. I don't quite remember the details now but I can check them soon. If you want you can submit a PR with the fix and I will review it!
🐛 Bugs / Unexpected behaviors
The
cotcurv
method of themesh_laplacian_smoothing
function is supposed to compute loss as:\sum_j w_ij(u_j - u_i) / (4 A[i])
where
w_ij = (cot a_ij + cot b_ij)
following reference [1] in the docs.However, the implementation does not follow this, and computes loss as:
(\sum_j (w_ij u_j) - u_i) / (4 A[i])
pytorch3d/pytorch3d/loss/mesh_laplacian_smoothing.py
Line 120 in cd9786e
These two aren't equivalent as
\sum_j w_ij
doesn't sum-up to 1.Instructions To Reproduce the Issue:
The effect of this bug is evident when you compute the cotcurv laplacian loss for ico-spheres of different levels. Since the 'cotcurv' laplacian is supposed to capture mean curvature, we expect the laplacian loss to be the same at different level ico-spheres. However, that's not the case:
The implementation can be fixed as:
Once fixed, the cotcurv laplacian loss remains same across different ico_sphere levels:
The text was updated successfully, but these errors were encountered: