If you have ever worked on a Computer Vision project, you might know that using augmentations to diversify the dataset is the best practice. On this page, we will:
Сover the Smallest max size augmentation;
Check out its parameters;
See how Smallest max size affects an image;
And check out how to work with Smallest max size using Python through the Albumentations library.
Let's jump in.
To define the term, Smallest max size is a data augmentation technique that reshapes an image so that the length of an image’s smallest size is equal to a certain number of pixels.
Note that Smallest max size preserves the image's aspect ratio. Hence the other side of the image will also be proportionally reshaped.
You can add several values to this parameter. In this case, each image's maximum length will be chosen randomly from the specified values. You might use this option to make your dataset more diversified.
- Interpolation - used to specify the interpolation algorithm;
Original image
Image after Smallest max size (maximum size 256 and Linear interpolation) is applied