dataeval.outputs.VisualStatsOutput

class dataeval.outputs.VisualStatsOutput

Output class for visualstats() stats metric.

brightness

Brightness of the images

Type:

NDArray[np.float16]

contrast

Image contrast ratio

Type:

NDArray[np.float16]

darkness

Darkness of the images

Type:

NDArray[np.float16]

sharpness

Sharpness of the images

Type:

NDArray[np.float16]

percentiles

Percentiles of the pixel values of the images with quartiles of (0, 25, 50, 75, 100)

Type:

NDArray[np.float16]

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