From 8d85329aed8506ea3672e3e208971345973ea761 Mon Sep 17 00:00:00 2001 From: Leon Dong Date: Mon, 14 Oct 2024 16:16:51 -0700 Subject: [PATCH] Import Detector Eval Dataloader Summary: Imports eval dataloaders to vizard - Modified dataloader to accept one big dataset - Modified loaded data to include "mode" field indicated word or line eval Reviewed By: srihari2761 Differential Revision: D64222758 fbshipit-source-id: 785cecff7df038d20adb93d48adb4625f47b609c --- detectron2/data/detection_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/detectron2/data/detection_utils.py b/detectron2/data/detection_utils.py index 8d6173e568..469a3ba33b 100644 --- a/detectron2/data/detection_utils.py +++ b/detectron2/data/detection_utils.py @@ -183,6 +183,7 @@ def read_image(file_name, format=None): # work around this bug: https://github.com/python-pillow/Pillow/issues/3973 image = _apply_exif_orientation(image) return convert_PIL_to_numpy(image, format) + raise ValueError(f"Failed to read image at: {file_name}") def check_image_size(dataset_dict, image):