Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test transposing image with EXIF Orientation tag #30319

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/utils/test_image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import numpy as np
import pytest
from huggingface_hub.file_download import http_get
from packaging import version
from requests import ConnectTimeout, ReadTimeout

from tests.pipelines.test_pipelines_document_question_answering import INVOICE_URL
Expand Down Expand Up @@ -586,7 +587,7 @@ def test_load_img_exif_transpose(self):

self.assertEqual(
img_arr_without_exif_transpose.shape,
(333, 500, 3),
(500, 333, 3) if version.parse(datasets.__version__) > version.parse("2.18.0") else (333, 500, 3),
)

img_with_exif_transpose = load_image(dataset[3]["image"])
Expand Down
Loading