@@ -410,7 +410,7 @@ class DPTModelIntegrationTest(unittest.TestCase):
|
|||||||
predicted_depth.unsqueeze(0).unsqueeze(1), size=(500, 500), mode="bicubic", align_corners=False
|
predicted_depth.unsqueeze(0).unsqueeze(1), size=(500, 500), mode="bicubic", align_corners=False
|
||||||
).squeeze()
|
).squeeze()
|
||||||
self.assertTrue(output_enlarged.shape == expected_shape)
|
self.assertTrue(output_enlarged.shape == expected_shape)
|
||||||
torch.testing.assert_close(predicted_depth_l, output_enlarged, rtol=1e-3)
|
torch.testing.assert_close(predicted_depth_l, output_enlarged, atol=1e-3, rtol=1e-3)
|
||||||
|
|
||||||
def test_export(self):
|
def test_export(self):
|
||||||
for strict in [True, False]:
|
for strict in [True, False]:
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ class ZoeDepthModelIntegrationTest(unittest.TestCase):
|
|||||||
for img, out, expected_slice in zip(images, outputs, expected_slices):
|
for img, out, expected_slice in zip(images, outputs, expected_slices):
|
||||||
out = out["predicted_depth"]
|
out = out["predicted_depth"]
|
||||||
self.assertTrue(img.size == out.shape[::-1])
|
self.assertTrue(img.size == out.shape[::-1])
|
||||||
torch.testing.assert_close(expected_slice, out[:3, :3], rtol=1e-3)
|
torch.testing.assert_close(expected_slice, out[:3, :3], atol=1e-3, rtol=1e-3)
|
||||||
|
|
||||||
self.check_target_size(image_processor, pad_input, images, outputs, raw_outputs, raw_outputs_flipped)
|
self.check_target_size(image_processor, pad_input, images, outputs, raw_outputs, raw_outputs_flipped)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user