Skip to content

Commit e0624ee

Browse files
committed
Minor precision fix on unproject
1 parent 013ff4f commit e0624ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch3d/renderer/cameras.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def unproject_points(self, xy_depth: torch.Tensor, **kwargs):
135135
xy_depth = torch.cat((xy, depth), dim=2)
136136
# unproject to the world coordinates
137137
xyz_unproj_world = cameras.unproject_points(xy_depth, world_coordinates=True)
138-
print(torch.allclose(xyz, xyz_unproj_world)) # True
138+
print(torch.allclose(xyz, xyz_unproj_world, atol=1e-4)) # True
139139
# unproject to the camera coordinates
140140
xyz_unproj = cameras.unproject_points(xy_depth, world_coordinates=False)
141141
print(torch.allclose(xyz_cam, xyz_unproj)) # True

0 commit comments

Comments
 (0)