Class RandomResizedCrop

java.lang.Object
ai.djl.modality.cv.transform.RandomResizedCrop
All Implemented Interfaces:
Transform

public class RandomResizedCrop extends Object implements Transform
A Transform that crop the input image with random scale and aspect ratio.
  • Constructor Details

    • RandomResizedCrop

      public RandomResizedCrop(int width, int height, double minAreaScale, double maxAreaScale, double minAspectRatio, double maxAspectRatio)
      Creates a RandomResizedCrop Transform.
      Parameters:
      width - the output width of the image
      height - the output height of the image
      minAreaScale - minimum targetArea/srcArea value
      maxAreaScale - maximum targetArea/srcArea value
      minAspectRatio - minimum aspect ratio
      maxAspectRatio - maximum aspect ratio
    • RandomResizedCrop

      public RandomResizedCrop(int width, int height)
      Creates a RandomResizedCrop Transform.
      Parameters:
      width - the output width of the image
      height - the output height of the image
  • Method Details