Skip to content

Commit

Permalink
Merge pull request #8 from JosefBuchner/results_to_dict
Browse files Browse the repository at this point in the history
Results to dict
  • Loading branch information
neuronflow authored Nov 7, 2023
2 parents 4e09b38 + 5564df6 commit 94601c0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions panoptica/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ def __str__(self):
f"volumetric instance-wise DICE: {self.instance_dice} ± {self.instance_dice_sd}"
)

def to_dict(self):
return ({
"num_pred_instances": self.num_pred_instances,
"num_ref_instances": self.num_ref_instances,
"tp": self.tp,
"fp": self.fp,
"fn": self.fn,
"rq": self.rq,
"sq": self.sq,
"sq_sd": self.sq_sd,
"pq": self.pq,
"instance_dice": self.instance_dice,
"instance_dice_sd": self.instance_dice_sd
}
)

@property
def num_ref_instances(self) -> int:
"""
Expand Down

0 comments on commit 94601c0

Please sign in to comment.