dataeval.metrics.stats.boxratiostats ==================================== .. py:function:: dataeval.metrics.stats.boxratiostats(boxstats, imgstats) Calculates ratio :term:`statistics` of box outputs over image outputs :param boxstats: Box statistics outputs to perform calculations on :type boxstats: DimensionStatsOutput | PixelStatsOutput | VisualStatsOutput :param imgstats: Image statistics outputs to perform calculations on :type imgstats: DimensionStatsOutput | PixelStatsOutput | VisualStatsOutput :returns: A dictionary-like object containing the computed ratio of the box statistics divided by the image statistics. :rtype: DimensionStatsOutput | PixelStatsOutput | VisualStatsOutput .. seealso:: :obj:`dimensionstats`, :obj:`pixelstats`, :obj:`visualstats` .. note:: DimensionStatsOutput values for channels, depth and distances are the original values provided by the box outputs .. rubric:: 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]