From 52d541bb7b9dfb02cc69f5e9180a5e479d2ae64f Mon Sep 17 00:00:00 2001 From: Can Korkut <33387838+CanKorkut@users.noreply.github.com> Date: Tue, 12 Sep 2023 20:46:37 +0300 Subject: [PATCH] fix image loading for transform --- src/inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inference.py b/src/inference.py index 564dd7685..65ee6a0c1 100644 --- a/src/inference.py +++ b/src/inference.py @@ -884,7 +884,7 @@ def main(): for count, img_file in enumerate(img_files): print("({}/{})".format(count+1, num_files)) img_path = os.path.join(args.image_dir, img_file) - img = Image.open(img_path) + img = Image.open(img_path).convert('RGB') print("Image loaded.") if not args.words_dir is None: