Package ai.djl.modality.cv.transform
Class RandomResizedCrop
java.lang.Object
ai.djl.modality.cv.transform.RandomResizedCrop
- All Implemented Interfaces:
Transform
A
Transform
that crop the input image with random scale and aspect ratio.-
Constructor Summary
ConstructorsConstructorDescriptionRandomResizedCrop
(int width, int height) Creates aRandomResizedCrop
Transform
.RandomResizedCrop
(int width, int height, double minAreaScale, double maxAreaScale, double minAspectRatio, double maxAspectRatio) Creates aRandomResizedCrop
Transform
. -
Method Summary
-
Constructor Details
-
RandomResizedCrop
public RandomResizedCrop(int width, int height, double minAreaScale, double maxAreaScale, double minAspectRatio, double maxAspectRatio) Creates aRandomResizedCrop
Transform
.- Parameters:
width
- the output width of the imageheight
- the output height of the imageminAreaScale
- minimum targetArea/srcArea valuemaxAreaScale
- maximum targetArea/srcArea valueminAspectRatio
- minimum aspect ratiomaxAspectRatio
- maximum aspect ratio
-
RandomResizedCrop
public RandomResizedCrop(int width, int height) Creates aRandomResizedCrop
Transform
.- Parameters:
width
- the output width of the imageheight
- the output height of the image
-
-
Method Details