From 8e6a2d937e067c1a972b9b7801a4dfac144796fb Mon Sep 17 00:00:00 2001 From: yonigozlan Date: Wed, 30 Oct 2024 14:15:20 +0000 Subject: [PATCH] fix owlv2 size dict --- src/transformers/models/owlv2/image_processing_owlv2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transformers/models/owlv2/image_processing_owlv2.py b/src/transformers/models/owlv2/image_processing_owlv2.py index dd32dc9f141183..3dcf145ea41ffc 100644 --- a/src/transformers/models/owlv2/image_processing_owlv2.py +++ b/src/transformers/models/owlv2/image_processing_owlv2.py @@ -19,7 +19,7 @@ import numpy as np -from ...image_processing_utils import BaseImageProcessor, BatchFeature +from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict from ...image_transforms import ( center_to_corners_format, pad, @@ -399,6 +399,7 @@ def preprocess( image_std = image_std if image_std is not None else self.image_std size = size if size is not None else self.size + size = get_size_dict(size) # for BC images = make_list_of_images(images)