dataeval.utils.preprocessing¶
Utility functions for preprocessing images and bounding boxes.
Attributes¶
Bounding box as tuple of floats in xyxy format. |
|
Bounding box as tuple of integers in xyxy format. |
Classes¶
Dataclass representing image bit depth information. |
|
A bounding box representation that supports multiple coordinate formats. |
|
Supported bounding box coordinate formats. |
Functions¶
|
Extract a region from an image based on a bounding box. |
|
Clip the box to inside the provided image dimensions. |
|
Return the image filtered using a 3x3 edge detection kernel. |
|
Approximates the bit depth of the image using the min and max pixel values. |
|
Check if the box dimensions provided are valid (non-empty). |
|
Normalize the image shape into (C,H,W) format. |
|
Rescales the image using the bit depth provided. |
|
Resizes a grayscale (HxW) 8-bit image using PIL or scipy.ndimage.zoom. |
|
Convert a box-like input to a BoundingBox instance. |
|
Convert an image of arbitrary channels (CHW) to a single-channel uint8 grayscale image (HW). |
|
Convert a bounding box from float to int format. |
Module Contents¶
- dataeval.utils.preprocessing.FloatBox¶
Bounding box as tuple of floats in xyxy format.
- dataeval.utils.preprocessing.IntBox¶
Bounding box as tuple of integers in xyxy format.