dataeval.utils.preprocessing.resize

dataeval.utils.preprocessing.resize(image, resize_dim, use_pil=True)

Resizes a grayscale (HxW) 8-bit image using PIL or scipy.ndimage.zoom.

Parameters:
image : NDArray[np.uint8]

Grayscale image to resize

resize_dim : int

Target dimension (output will be resize_dim x resize_dim)

use_pil : bool, default True

Whether to use PIL for resizing (if available)

Returns:

Resized image

Return type:

NDArray[np.uint8]