crop

dnois.utils.crop(image: Tensor, cropping: int | tuple[int, int]) Tensor

Crop an image with given cropping width.

Parameters:
  • image (Tensor) – The image to be cropped.

  • cropping (int | tuple[int, int]) – Cropping width in vertical and horizontal direction.

Returns:

Cropped image.

Return type:

Tensor