Types
Common custom types used across the lib.
ImageInterpolation
module-attribute
¶
Interpolation method used for resizing the input image.
ImageColorMode
module-attribute
¶
Input image color mode. Use grayscale
for single-channel input or rgb
for 3-channel input.
PaddingColor
module-attribute
¶
Padding colour for letterboxing (only used when keeping image aspect ratio).
ImgLike
module-attribute
¶
Image-like objects, including paths to image files and NumPy arrays of images.
BatchOrImgLike
module-attribute
¶
Image-like objects, including paths to image files and NumPy arrays of images, or a batch of images.
BatchArray
module-attribute
¶
BatchArray: TypeAlias = NDArray[uint8]
Numpy array of images, representing a batch of images.
TensorDataFormat
module-attribute
¶
Data format of the input tensor. It can be either channels_last
or channels_first
.
channels_last
corresponds to inputs with shape (batch, height, width, channels)
, while
channels_first
corresponds to inputs with shape (batch, channels, height, width)
.
KerasDtypes
module-attribute
¶
KerasDtypes: TypeAlias = Literal[
"float16",
"float32",
"float64",
"uint8",
"uint16",
"uint32",
"uint64",
"int8",
"int16",
"int32",
"int64",
"bfloat16",
"bool",
"string",
"float8_e4m3fn",
"float8_e5m2",
"complex64",
"complex128",
]
Keras data types supported by the library.