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

Fix classwise dice metrics #718

Open
nkaenzig opened this issue Nov 28, 2024 · 0 comments · May be fixed by #719
Open

Fix classwise dice metrics #718

nkaenzig opened this issue Nov 28, 2024 · 0 comments · May be fixed by #719

Comments

@nkaenzig
Copy link
Collaborator

For calculating the classwise dice metrics, we currently use torchmetrics.segmentation.GeneralizedDiceScore, which in this context should be equivalent to standard dice score. (Standard Dice so far did not support classwise calculation, because the average='none' option was broken (see issue).

However, one issue with the current implementation of GeneralizedDiceScore in torchmetrics (<1.6.0) is that it assigns scores of 0.0 to samples that don't contain a particular class, which leads to very low classwise dice scores, even if the predictions are of good quality.

Seems that this issue is fixed in the new torchmetrics.segmentation.DiceScore which has been released in torchmetrics 1.6.0, so we should update to that version and move away from GeneralizedDiceScore.

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

Successfully merging a pull request may close this issue.

1 participant