@@ -304,21 +304,23 @@ def get_mask2former_resize_output_image_size(
304304 size_divisor : int = 0 ,
305305 default_to_square : bool = True ,
306306 input_data_format : Optional [Union [str , ChannelDimension ]] = None ,
307- ) -> tuple :
307+ ) -> Tuple [ int , int ] :
308308 """
309309 Computes the output size given the desired size.
310310
311311 Args:
312- input_image (`np.ndarray`):
312+ image (`np.ndarray`):
313313 The input image.
314- size (`int`, `Tuple[int, int]`, `List[int]`, `Tuple[int]`):
314+ size (`int` or `Tuple[int, int]` or `List[int]` or `Tuple[int]`):
315315 The size of the output image.
316- default_to_square (`bool`, *optional*, defaults to `True`):
317- Whether to default to square if no size is provided.
318316 max_size (`int`, *optional*):
319317 The maximum size of the output image.
320- size_divisible (`int`, *optional*, defaults to 0):
321- If size_divisible is given, the output image size will be divisible by the number.
318+ size_divisor (`int`, *optional*, defaults to 0):
319+ If `size_divisor` is given, the output image size will be divisible by the number.
320+ default_to_square (`bool`, *optional*, defaults to `True`):
321+ Whether to default to square if no size is provided.
322+ input_data_format (`ChannelDimension` or `str`, *optional*):
323+ The channel dimension format of the input image. If unset, will use the inferred format from the input.
322324
323325 Returns:
324326 `Tuple[int, int]`: The output size.
@@ -471,10 +473,10 @@ def resize(
471473 size (`Dict[str, int]`):
472474 The size of the output image.
473475 size_divisor (`int`, *optional*, defaults to 0):
474- If size_divisor is given, the output image size will be divisible by the number.
476+ If ` size_divisor` is given, the output image size will be divisible by the number.
475477 resample (`PILImageResampling` resampling filter, *optional*, defaults to `PILImageResampling.BILINEAR`):
476478 Resampling filter to use when resizing the image.
477- data_format (`str ` or `ChannelDimension `, *optional*):
479+ data_format (`ChannelDimension ` or `str `, *optional*):
478480 The channel dimension format for the output image. If unset, the channel dimension format of the input
479481 image is used.
480482 input_data_format (`ChannelDimension` or `str`, *optional*):
0 commit comments