diff --git a/tests/fixtures/tests_samples/DocVQA/document.png b/tests/fixtures/tests_samples/DocVQA/document.png deleted file mode 100644 index d3f56ede15140..0000000000000 Binary files a/tests/fixtures/tests_samples/DocVQA/document.png and /dev/null differ diff --git a/tests/fixtures/tests_samples/DocVQA/document_2.png b/tests/fixtures/tests_samples/DocVQA/document_2.png deleted file mode 100644 index 1109fd8fe415d..0000000000000 Binary files a/tests/fixtures/tests_samples/DocVQA/document_2.png and /dev/null differ diff --git a/tests/test_feature_extraction_layoutlmv2.py b/tests/test_feature_extraction_layoutlmv2.py index f92dcf8812bff..1a01ec6a2a97c 100644 --- a/tests/test_feature_extraction_layoutlmv2.py +++ b/tests/test_feature_extraction_layoutlmv2.py @@ -185,7 +185,11 @@ def test_layoutlmv2_integration_test(self): # with apply_OCR = True feature_extractor = LayoutLMv2FeatureExtractor() - image = Image.open("tests/fixtures/tests_samples/DocVQA/document.png").convert("RGB") + from datasets import load_dataset + + ds = load_dataset("hf-internal-testing/fixtures_docvqa", split="test") + + image = Image.open(ds[0]["file"]).convert("RGB") encoding = feature_extractor(image, return_tensors="pt") diff --git a/tests/test_processor_layoutlmv2.py b/tests/test_processor_layoutlmv2.py index 1a20476920cf9..009871303659f 100644 --- a/tests/test_processor_layoutlmv2.py +++ b/tests/test_processor_layoutlmv2.py @@ -141,8 +141,12 @@ class LayoutLMv2ProcessorIntegrationTests(unittest.TestCase): @cached_property def get_images(self): # we verify our implementation on 2 document images from the DocVQA dataset - image_1 = Image.open("tests/fixtures/tests_samples/DocVQA/document.png").convert("RGB") - image_2 = Image.open("tests/fixtures/tests_samples/DocVQA/document_2.png").convert("RGB") + from datasets import load_dataset + + ds = load_dataset("hf-internal-testing/fixtures_docvqa", split="test") + + image_1 = Image.open(ds[0]["file"]).convert("RGB") + image_2 = Image.open(ds[1]["file"]).convert("RGB") return image_1, image_2