4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 18:44:21 +08:00

disallow fars <= nears (#881)

This commit is contained in:
Daniel Crispell 2022-11-02 13:04:04 -04:00 committed by GitHub
parent be70b86b18
commit c53df92b9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,6 +84,7 @@ class AABBBoxCollider(SceneBoxCollider):
# clamp to near plane
near_plane = self.near_plane if self.training else 0
nears = torch.clamp(nears, min=near_plane)
fars = torch.maximum(fars, nears + 1e-6)
return nears, fars