Random Sized Crop
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 Random Sized Crop augmentation;
Check out its parameters;
See how Random Sized Crop affects an image;
And check out how to work with Random Sized Crop using Python through the Albumentations library.
Let's get into it!
Random Sized Crop augmentation explained
To define the term, Random Sized Crop is a data augmentation technique that helps researchers to crop an image to any size within a certain specified bound.
Random Sized Crop augmentation parameters
Min max height - sets the crop size limits;
Height - sets the height of the desired resized and cropped image in pixels;
Width - sets the width of the desired resized and cropped image in pixels.
Random Sized Crop advanced options
- Width to height ratio - defines an aspect ratio of the crop;
- Interpolation - used to specify the interpolation algorithm: