From 8d8c86e86d103a4fdb464ced30cb45fd23bbe3ef Mon Sep 17 00:00:00 2001 From: pang Date: Wed, 10 Apr 2024 00:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8Fbug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/recorders/metric_recorder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/recorders/metric_recorder.py b/utils/recorders/metric_recorder.py index 98033c3..b1d4789 100644 --- a/utils/recorders/metric_recorder.py +++ b/utils/recorders/metric_recorder.py @@ -57,7 +57,7 @@ def round_w_zero_padding(x, bit_width): "dice": {"handler": py_sod_metrics.DICEHandler, "kwargs": gray_metric_kwargs}, "specificity": {"handler": py_sod_metrics.SpecificityHandler, "kwargs": gray_metric_kwargs}, # - "bif1": {"handler": py_sod_metrics.FmeasureHandler, "kwargs": dict(binary_metric_kwargs, beta=1)}, + "bif1": {"handler": py_sod_metrics.FmeasureHandler, "kwargs": dict(**binary_metric_kwargs, beta=1)}, "biprecision": {"handler": py_sod_metrics.PrecisionHandler, "kwargs": binary_metric_kwargs}, "birecall": {"handler": py_sod_metrics.RecallHandler, "kwargs": binary_metric_kwargs}, "biiou": {"handler": py_sod_metrics.IOUHandler, "kwargs": binary_metric_kwargs}, @@ -66,7 +66,7 @@ def round_w_zero_padding(x, bit_width): } GRAYSCALE_METRICS = ["em"] + [k for k in BINARY_METRIC_MAPPING.keys() if not k.startswith("bi")] SUPPORTED_METRICS = ["mae", "em", "sm", "wfm", "msiou"] + sorted(BINARY_METRIC_MAPPING.keys()) -# fmt: off +# fmt: on class GrayscaleMetricRecorder: