Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute metrics individually per each class #19

Open
valosekj opened this issue Dec 10, 2024 · 1 comment
Open

Compute metrics individually per each class #19

valosekj opened this issue Dec 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@valosekj
Copy link
Member

valosekj commented Dec 10, 2024

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?
@valosekj valosekj added the enhancement New feature or request label Dec 10, 2024
@valosekj
Copy link
Member Author

I have had issues where even if the prediciton has only 1 class, I see two classes in the output csv file.

This is interesting and definitely not intended. If the prediction has only 1 class, the output CSV file should also contain only a single class. Would you have a sample subject for debugging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant