RandomCrop¶
- class mmocr.datasets.transforms.RandomCrop(min_side_ratio=0.4)[source]¶
Randomly crop images and make sure to contain at least one intact instance.
Required Keys:
img
gt_polygons
gt_bboxes
gt_bboxes_labels
gt_ignored
gt_texts (optional)
Modified Keys:
img
img_shape
gt_polygons
gt_bboxes
gt_bboxes_labels
gt_ignored
gt_texts (optional)
- Parameters
min_side_ratio (float) – The ratio of the shortest edge of the cropped image to the original image size.
- Return type