Skip to content

Commit

Permalink
Merge pull request #125 from BrainLesion/quick_fix
Browse files Browse the repository at this point in the history
Quick fix
  • Loading branch information
Hendrik-code authored Aug 30, 2024
2 parents 3320978 + b922b67 commit a0c84cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion panoptica/panoptica_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
"""
Expand All @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions panoptica/panoptica_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a0c84cb

Please sign in to comment.