mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 02:24:38 +08:00
Don't apply near plane during eval (#716)
This commit is contained in:
parent
9252a46273
commit
eff62f7c6c
@ -82,7 +82,8 @@ class AABBBoxCollider(SceneBoxCollider):
|
||||
).values
|
||||
|
||||
# clamp to near plane
|
||||
nears = torch.clamp(nears, min=self.near_plane)
|
||||
near_plane = self.near_plane if self.training else 0
|
||||
nears = torch.clamp(nears, min=near_plane)
|
||||
|
||||
return nears, fars
|
||||
|
||||
@ -115,6 +116,7 @@ class NearFarCollider(SceneBoxCollider):
|
||||
|
||||
def forward(self, ray_bundle: RayBundle) -> RayBundle:
|
||||
ones = torch.ones_like(ray_bundle.origins[..., 0:1])
|
||||
ray_bundle.nears = ones * self.near_plane
|
||||
near_plane = self.near_plane if self.training else 0
|
||||
ray_bundle.nears = ones * near_plane
|
||||
ray_bundle.fars = ones * self.far_plane
|
||||
return ray_bundle
|
||||
|
||||
Loading…
Reference in New Issue
Block a user