Random Resized Crop and Interpolation
Learn to perform data augmentation with the random resized crop and interpolation techniques.
We'll cover the following
By default, the PyTorch Image Model framework will apply the RandomResizedCropAndInterpolation
data augmentation during training.
As the name implies, it will randomly crop or resize the input image. It also changes the aspect ratio of the image randomly.
The RandomResizedCropAndInterpolation
data augmentation works very well with most datasets. It helps to boost the performance of our image classification model.
Random resized crop and interpolation
The RandomResizedCropAndInterpolation
class is part of the timm.data.transforms
module. Since it accepts a PIL.Image
as input, we can load our image as usual and implement the remaining code like this:
Get hands-on with 1400+ tech skills courses.