All annotation is now free in Hasty.

Smallest max size


Minimum size of smallest side

The parameter that specifies the length of the maximum size that is to be used to resize minimum side of the image.

The aspect ratio of the original image is preserved.


The algorithm to be used for the resizing of the image. For more information regarding the interpolation, you can see it here .

import albumentations as albu
from PIL import Image
import numpy as np

transform =albu.SmallestMaxSize(max_size=1024, interpolation=1,p=1)
#default interpolation is INTER_LINEAR

image = np.array('/some/image/file/path'))
image = transform(image=image)['image']

# Now the image is preprocessed and ready to be accepted by the model

Further Resources

Last updated on Jun 01, 2022

Removing the risk from vision AI.

Only 13% of vision AI projects make it to production, with Hasty we boost that number to 100%.