dataeval.metrics.stats.visualstats¶
-
dataeval.metrics.stats.visualstats(dataset, *, per_box=
False, 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,OutliersExamples
Calculate the visual statistics of a dataset of 8 images, whose shape is (C, H, W).
>>> results = visualstats(dataset) >>> print(results.brightness) [0.084 0.13 0.259 0.38 0.508 0.63 0.755 0.88 ] >>> print(results.contrast) [2.04 1.331 1.261 1.279 1.253 1.268 1.265 1.263]