Add ViTImageProcessorFast to tests (#31424)

* Add ViTImageProcessor to tests

* Correct data format

* Review comments
This commit is contained in:
amyeroberts
2024-06-25 13:36:58 +01:00
committed by GitHub
parent aab0829790
commit 0f67ba1d74
26 changed files with 230 additions and 87 deletions

View File

@@ -66,6 +66,8 @@ class GLPNImageProcessingTester(unittest.TestCase):
def expected_output_image_shape(self, images):
if isinstance(images[0], Image.Image):
width, height = images[0].size
elif isinstance(images[0], np.ndarray):
height, width = images[0].shape[0], images[0].shape[1]
else:
height, width = images[0].shape[1], images[0].shape[2]