From e0624ee32177cfc48afcf00e142c23f4cb41598f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Idil=20S=C3=BClo?= Date: Mon, 6 Mar 2023 15:01:20 +0100 Subject: [PATCH] Minor precision fix on unproject --- pytorch3d/renderer/cameras.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch3d/renderer/cameras.py b/pytorch3d/renderer/cameras.py index 22df74a8f..795bb5f2d 100644 --- a/pytorch3d/renderer/cameras.py +++ b/pytorch3d/renderer/cameras.py @@ -135,7 +135,7 @@ def unproject_points(self, xy_depth: torch.Tensor, **kwargs): xy_depth = torch.cat((xy, depth), dim=2) # unproject to the world coordinates xyz_unproj_world = cameras.unproject_points(xy_depth, world_coordinates=True) - print(torch.allclose(xyz, xyz_unproj_world)) # True + print(torch.allclose(xyz, xyz_unproj_world, atol=1e-4)) # True # unproject to the camera coordinates xyz_unproj = cameras.unproject_points(xy_depth, world_coordinates=False) print(torch.allclose(xyz_cam, xyz_unproj)) # True