boxratiostats#
- dataeval.metrics.stats.boxratiostats(boxstats: TStatOutput, imgstats: TStatOutput) TStatOutput#
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
>>> imagestats = dimensionstats(images) >>> boxstats = dimensionstats(images, bboxes) >>> ratiostats = boxratiostats(boxstats, imagestats) >>> print(ratiostats.aspect_ratio) [ 1.15169271 0.78450521 21.33333333 1.5234375 2.25651042 0.77799479 0.88867188 3.40625 1.73307292 1.11132812 0.75018315 0.45018315 0.69596354 20. 5.11197917 2.33333333 0.75 0.70019531] >>> print(ratiostats.size) [0.03401693 0.01383464 0.00130208 0.01822917 0.02327474 0.00683594 0.01220703 0.0168457 0.01057943 0.00976562 0.00130208 0.01098633 0.02246094 0.0012207 0.01123047 0.00911458 0.02636719 0.06835938]