dial_core.datasets.datatype.imagearray module

class dial_core.datasets.datatype.imagearray.ImageArray[source]

Bases: dial_core.datasets.datatype.datatype.DataType

Image, represented as an array of int values, each one representing a pixel intensity (0-255).

The array will have shape (W, H), for grayscale images, or (W, H, C), where C represents the number of color channels (For RGB images)

display(data)[source]

Return the display representation of the data.

For example, for Categorical types this will be the actual category name instead of an interger.

process(data)[source]

Return the data after processing given the data type.

For example, if the DataType is an ImagePath, process() will open the image and return the array corresponding to its content.

Return type:np.ndarray