diff --git a/panoptica/panoptica_result.py b/panoptica/panoptica_result.py index 5e5419a..24a446e 100644 --- a/panoptica/panoptica_result.py +++ b/panoptica/panoptica_result.py @@ -264,7 +264,7 @@ def _calc_global_bin_metric(self, metric: Metric, prediction_arr, reference_arr) if metric not in self._global_metrics: raise MetricCouldNotBeComputedException(f"Global Metric {metric} not set") if self.tp == 0: - is_edgecase, result = self._edge_case_handler.handle_zero_tp(metric, self.tp, res.num_pred_instances, res.num_ref_instances) + is_edgecase, result = self._edge_case_handler.handle_zero_tp(metric, self.tp, self.num_pred_instances, self.num_ref_instances) if is_edgecase: return result pred_binary = prediction_arr