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:
Let's jump in.
To define the term, Random Crop is a data augmentation technique that helps researchers to crop the images into a particular dimension, creating synthetic data. The cropping could result in any patch of the image and is therefore called "Random Crop."
import albumentations as albu from PIL import Image transform = albu.RandomCrop(200,200) augmented_image = transform(image=figure)['image'] # We have our required cropped image in augmented_image.