dataeval.metrics.stats.visualstats¶
-
dataeval.metrics.stats.visualstats(images, bboxes=
None, per_channel=False)¶ Calculates visual statistics for each image.
This function computes various visual metrics (e.g., brightness, darkness, contrast, blurriness) on the images as a whole.
- Parameters:¶
- Returns:¶
A dictionary-like object containing the computed visual statistics for each image. The keys correspond to the names of the statistics (e.g., ‘brightness’, ‘blurriness’), and the values are lists of results for each image or NumPy arrays when the results are multi-dimensional.
- Return type:¶
See also
dimensionstats,pixelstats,OutliersNote
zeros and missing are presented as a percentage of total pixel counts
Examples
Calculating the statistics on the images, whose shape is (C, H, W)
>>> results = visualstats(stats_images) >>> print(results.brightness) [0.1353 0.2085 0.4143 0.6084 0.8135] >>> print(results.contrast) [2.04 1.331 1.261 1.279 1.253]