channelstats#
- dataeval.metrics.stats.channelstats(images: Iterable[ArrayLike], bboxes: Iterable[ArrayLike] | None = None) ChannelStatsOutput#
Calculates various per-channel statistics for each image
This function computes pixel and visual metrics on the images or individual bounding boxes for each image.
- Parameters:
images (Iterable[ArrayLike]) – Images to perform calculations on
bboxes (Iterable[ArrayLike] or None) – Bounding boxes in xyxy format for each image to perform calculations on
- Returns:
Output class containing the per-channel outputs of various stats functions
- Return type:
See also
Examples
Calculating the per-channel pixel and visual stats for a dataset
>>> stats = channelstats(images) >>> print(stats.visualstats.darkness) [0.07495 0.1748 0.275 0.1047 0.11096 0.1172 0.2047 0.2109 0.2172 0.3047 0.311 0.3171 0.4048 0.411 0.4172 0.505 0.5107 0.517 0.6045 0.611 0.617 0.7046 0.711 0.7173 0.8047 0.811 0.8174 0.905 0.911 0.917 ]