dataeval.metrics.stats.boxratiostats¶
- dataeval.metrics.stats.boxratiostats(boxstats, imgstats)¶
Calculates ratio statistics of box outputs over image outputs.
- Parameters:¶
- boxstats : DimensionStatsOutput | PixelStatsOutput | VisualStatsOutput¶
Box statistics outputs to perform calculations on
- imgstats : DimensionStatsOutput | PixelStatsOutput | VisualStatsOutput¶
Image statistics outputs to perform calculations on
- Returns:¶
A dictionary-like object containing the computed ratio of the box statistics divided by the image statistics.
- Return type:¶
See also
Note
DimensionStatsOutput values for channels, depth and distances are the original values provided by the box outputs
Examples
Calculating the box ratio statistics using the dimension stats of the boxes and images
>>> from dataeval.metrics.stats import dimensionstats >>> imagestats = dimensionstats(stats_images) >>> boxstats = dimensionstats(stats_images, bboxes) >>> ratiostats = boxratiostats(boxstats, imagestats) >>> print(ratiostats.aspect_ratio) [ 0.86376953 0.58837891 16. 0.85714286 1.26959707 0.43772894 0.66650391 3.83296703 1.95018315] >>> print(ratiostats.size) [0.0255127 0.01037598 0.00097656 0.01822917 0.02327474 0.00683594 0.00915527 0.03369141 0.02115885]