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.02124 0.1213 0.2212 0.1013 0.1076 0.11383 0.2013 0.2076 0.2139 0.3013 0.3076 0.3137 0.4014 0.4075 0.4138 0.5015 0.508 0.5137 0.6016 0.6074 0.614 0.701 0.7075 0.714 0.8013 0.8076 0.814 0.9014 0.9077 0.914 ]