import albumentations as albu
transform =albu.RandomSizedCrop([1500,2000],100,100,1.0,cv2.INTER_NEAREST,1)
augmented_image = transform(image=figure)['image']
# we have our required cropped image in augmented_image.
# the first argument defines the crop size limits.
# second and third are the height and width of the image after crop and resize
# fourth is the aspect ratio of crop
# fifth is the interpolation technique, and the last is the probability of the