Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Add DiceCELoss as a metric #6693

Closed
matt3o opened this issue Jul 3, 2023 · 1 comment
Closed

Add DiceCELoss as a metric #6693

matt3o opened this issue Jul 3, 2023 · 1 comment

Comments

@matt3o
Copy link
Contributor

matt3o commented Jul 3, 2023

Is your feature request related to a problem? Please describe.
Since DiceCELoss is available as a loss, it would make sense for it to be available as a metric too.

Describe the solution you'd like
Either a dedicated DiceCELoss metric like e.g. MeanDice for the DiceLoss OR a pluggable DiceCELossMetric which can be used as input to IgniteMetric.

Describe alternatives you've considered
Passing the DiceCELoss into IgniteMetric results in an error since it does not have a reset button. Which kinda makes sense, this is no metric, it does something different.

Additional context
I am also curious about why the dice got implemented at two places, namely MeanDice and the DiceLoss. From a quick glance I believe they do the same computation - so is there any reason for the code to duplicated here? The calculation logic for both should be the same.

@wyli
Copy link
Contributor

wyli commented Jul 3, 2023

This function actually wraps any loss as part of cumulative metric https://github.com/Project-MONAI/MONAI/blob/dev/monai/metrics/loss_metric.py perhaps we can focus on this class.

Meandice is not differentiable and (thus) is much faster than dice loss.

@Project-MONAI Project-MONAI locked and limited conversation to collaborators Jul 3, 2023
@wyli wyli converted this issue into discussion #6694 Jul 3, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants