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(Image.open('/some/image/file/path')) image = transform(image=image)['image'] # Now the image is preprocessed and ready to be accepted by the model
Only 13% of vision AI projects make it to production, with Hasty we boost that number to 100%.