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)