EfficientNetRandomCrop¶
- class mmcls.datasets.transforms.EfficientNetRandomCrop(scale, min_covered=0.1, crop_padding=32, interpolation='bicubic', **kwarg)[source]¶
EfficientNet style RandomResizedCrop.
Required Keys:
img
Modified Keys:
img
img_shape
- Parameters
scale (int) – Desired output scale of the crop. Only int size is accepted, a square crop (size, size) is made.
min_covered (Number) – Minimum ratio of the cropped area to the original area. Defaults to 0.1.
crop_padding (int) – The crop padding parameter in efficientnet style center crop. Defaults to 32.
crop_ratio_range (tuple) – Range of the random size of the cropped image compared to the original image. Defaults to (0.08, 1.0).
aspect_ratio_range (tuple) – Range of the random aspect ratio of the cropped image compared to the original image. Defaults to (3. / 4., 4. / 3.).
max_attempts (int) – Maximum number of attempts before falling back to Central Crop. Defaults to 10.
interpolation (str) – Interpolation method, accepted values are ‘nearest’, ‘bilinear’, ‘bicubic’, ‘area’, ‘lanczos’. Defaults to ‘bicubic’.
backend (str) – The image resize backend type, accepted values are ‘cv2’ and ‘pillow’. Defaults to ‘cv2’.