From 7933a58c197e487c9e2358a65e48e805add3bb12 Mon Sep 17 00:00:00 2001 From: iback Date: Tue, 23 Jan 2024 15:20:39 +0000 Subject: [PATCH] updated to dynamic_result branch from panoptica --- panoptica/metrics/__init__.py | 2 +- panoptica/panoptic_result.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panoptica/metrics/__init__.py b/panoptica/metrics/__init__.py index 1ebfd9c..f636541 100644 --- a/panoptica/metrics/__init__.py +++ b/panoptica/metrics/__init__.py @@ -14,4 +14,4 @@ _compute_centerline_dice, _compute_centerline_dice_coefficient, ) -from panoptica.metrics.metrics import Metric, Metric, _Metric, MetricMode +from panoptica.metrics.metrics import Metric, _Metric, MetricMode diff --git a/panoptica/panoptic_result.py b/panoptica/panoptic_result.py index 7493fd5..650f14f 100644 --- a/panoptica/panoptic_result.py +++ b/panoptica/panoptic_result.py @@ -363,7 +363,7 @@ def __str__(self) -> str: return text def to_dict(self) -> dict: - return self._evaluation_metrics + return {k: getattr(self, v.id) for k,v in self._evaluation_metrics.items() if (v.error == False and v.was_calculated)} def get_list_metric(self, metric: Metric, mode: MetricMode): if metric in self._list_metrics: