crop

Several Crop transformations for the COCO images and annotations.

Classes

CenterCrop

Perform a crop around the center of the image.

Crop

Perform a crop on image and annotations.

RandomCrop

Perform a random crop on image and annotations.

SizeMode

Functions

_check_bbox([x, y, w, h, mode])

_crop_bbox(bbox, xywh)

_crop_segmentation(segmentations, xywh)

_norm_bbox(xywh, img_shape[, mode])

crop_img(img, anns, xywh)