Skip to content

Compute metrics individually per each class #19

@valosekj

Description

@valosekj

Originally posted by @naga-karthik in #17 (comment)

might be unrelated but because we're on the topic, i am documenting it

I think we should compute the metrics individually per each class. That is, say, if we have region-based seg/lesion label, then the current script automatically computes metrics for both of them sequentially in a for loop. But, for the bavaria-quebec project, I have had issues where even if the prediciton has only 1 class, I see two classes in the output csv file. When metrics are aggregated across all subjects then this results in incorrect scores. All I'm tyring to say here is that the for loop and iterating across unique labels is not robust. In the end, I had to separate SC and lesion labels and then compute the metrics for SC and lesions independently (to be sure)

how about we:

  1. create temporary masks for each available class in the predictino mask
  2. run the metrics on these temporary (single-class) masks
  3. delete the temporary masks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions