← Back to all transforms

Crop

Description

Crop region from image.

    Args:
        x_min: Minimum upper left x coordinate.
        y_min: Minimum upper left y coordinate.
        x_max: Maximum lower right x coordinate.
        y_max: Maximum lower right y coordinate.

    Targets:
        image, mask, bboxes, keypoints

    Image types:
        uint8, float32

    

Parameters

  • p: float (default: 1)
  • x_min: int (default: 0)
  • y_min: int (default: 0)
  • x_max: int (default: 1024)
  • y_max: int (default: 1024)

Targets

  • Image
  • Mask
  • BBoxes
  • Keypoints

Try it out

Original Image (width = 484, height = 733):

Original

Transformed Image:

Transform not yet applied