import albumentations as albu
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