mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 06:49:13 +08:00
Fix normal orientation loss
This commit is contained in:
1 parent
d2e08ed1bc
commit
127d1d08e4
1 file changed
+1
-1
@@ -182,7 +182,7 @@ def orientation_loss(
|
|||||||
"""
|
"""
|
||||||
w = weights
|
w = weights
|
||||||
n = normals
|
n = normals
|
||||||
v = viewdirs
|
v = viewdirs * -1
|
||||||
n_dot_v = (n * v[..., None, :]).sum(axis=-1)
|
n_dot_v = (n * v[..., None, :]).sum(axis=-1)
|
||||||
return (w[..., 0] * torch.fmin(torch.zeros_like(n_dot_v), n_dot_v) ** 2).sum(dim=-1)
|
return (w[..., 0] * torch.fmin(torch.zeros_like(n_dot_v), n_dot_v) ** 2).sum(dim=-1)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user