dataeval.outputs.DimensionStatsOutput

class dataeval.outputs.DimensionStatsOutput

Output class for dimensionstats() stats metric.

offset_x

Offsets from the left edge of images in pixels

Type:

NDArray[np.int32]

offset_y

Offsets from the top edge of images in pixels

Type:

NDArray[np.int32]

width

Width of the images in pixels

Type:

NDArray[np.uint32]

height

Height of the images in pixels

Type:

NDArray[np.uint32]

channels

Channel count of the images in pixels

Type:

NDArray[np.uint8]

size

Size of the images in pixels

Type:

NDArray[np.uint32]

aspect_ratio

Aspect Ratio of the images (width/height)

Type:

NDArray[np.float16]

depth

Color depth of the images in bits

Type:

NDArray[np.uint8]

center

Offset from center in [x,y] coordinates of the images in pixels

Type:

NDArray[np.uint32]

distance_center

Distance in pixels from center

Type:

NDArray[np.float32]

distance_edge

Distance in pixels from nearest edge

Type:

NDArray[np.uint32]

invalid_box

True if the bounding box is invalid

Type:

NDArray[bool]

data()

The output data as a dictionary.

Return type:

dict[str, Any]

factors(filter=None, exclude_constant=False)

Returns all 1-dimensional data as a dictionary of numpy arrays.

Parameters:
filter : str, Sequence[str] or None, default None:

If provided, only returns keys that match the filter.

exclude_constant : bool, default False

If True, exclude arrays that contain only a single unique value.

Return type:

Mapping[str, NDArray[Any]]

get_channel_mask(channel_index, channel_count=None)

Boolean mask for results filtered to specified channel index and optionally the count of the channels per image.

Parameters:
channel_index : int | Iterable[int] | None

Index or indices of channel(s) to filter for

channel_count : int | Iterable[int] | None

Optional count(s) of channels to filter for

Return type:

collections.abc.Sequence[bool]

meta()

Metadata about the execution of the function or method for the Output class.

Return type:

ExecutionMetadata

plot(log, channel_limit=None, channel_index=None)

Plots the statistics as a set of histograms.

Parameters:
log : bool

If True, plots the histograms on a logarithmic scale.

channel_limit : int or None

The maximum number of channels to plot. If None, all channels are plotted.

channel_index : int, Iterable[int] or None

The index or indices of the channels to plot. If None, all channels are plotted.

Return type:

matplotlib.Figure

to_dataframe()

Returns the processed factors a polars dataframe of shape (factors, samples)

Return type:

polars.DataFrame