From f769e4a73d572a1fb8a8d569f4939702029af8bb Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Wed, 14 Dec 2022 19:20:20 +0800 Subject: [PATCH] Fix image mode issue Signed-off-by: Jael Gu --- timm_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm_image.py b/timm_image.py index b0188a7..98bf302 100644 --- a/timm_image.py +++ b/timm_image.py @@ -83,7 +83,7 @@ class TimmImage(NNOperator): imgs = data img_list = [] for img in imgs: - img = self.convert_img(img) if isinstance(img, numpy.ndarray) else img + img = self.convert_img(img) if isinstance(img, numpy.ndarray) else img.convert('RGB') img = img if self.skip_tfms else self.tfms(img) img_list.append(img) inputs = torch.stack(img_list)