# Smallest max size

## Parameters

### 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.

### Interpolation

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(Image.open('/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

## Get AI confident. Start using Hasty today.

Automate 90% of the work, reduce your time to deployment by 40%, and replace your whole ML software stack with our platform.