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

@@ -98,6 +98,8 @@ class MaskFormerImageProcessingTester(unittest.TestCase):
image = image_inputs[0]
if isinstance(image, Image.Image):
w, h = image.size
elif isinstance(image, np.ndarray):
h, w = image.shape[0], image.shape[1]
else:
h, w = image.shape[1], image.shape[2]
if w < h: