diff --git a/panoptica/panoptica_aggregator.py b/panoptica/panoptica_aggregator.py index 6460d6d..03beb25 100644 --- a/panoptica/panoptica_aggregator.py +++ b/panoptica/panoptica_aggregator.py @@ -22,7 +22,7 @@ class Panoptica_Aggregator: def __init__( self, panoptica_evaluator: Panoptica_Evaluator, - output_file: Path, + output_file: Path | str, continue_file: bool = True, ): """ @@ -36,6 +36,8 @@ def __init__( self.__output_buffer_file = None self.__evaluation_metrics = panoptica_evaluator.resulting_metric_keys + if isinstance(output_file, str): + output_file = Path(output_file) # uses tsv assert ( output_file.parent.exists() diff --git a/panoptica/panoptica_evaluator.py b/panoptica/panoptica_evaluator.py index cb6c46a..36ec399 100644 --- a/panoptica/panoptica_evaluator.py +++ b/panoptica/panoptica_evaluator.py @@ -158,6 +158,9 @@ def segmentation_class_groups_names(self) -> list[str]: return [NO_GROUP_KEY] return self.__segmentation_class_groups.keys() + def _set_instance_matcher(self, matcher: InstanceMatchingAlgorithm): + self.__instance_matcher = matcher + @property def resulting_metric_keys(self) -> list[str]: if self.__resulting_metric_keys is None: