RandomCrop¶
- class mmocr.datasets.transforms.RandomCrop(min_side_ratio=0.4)[源代码]¶
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)
- 参数
min_side_ratio (float) – The ratio of the shortest edge of the cropped image to the original image size.
- 返回类型