Replies: 2 comments 12 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @RY-97, please follow the example to generate Dice. Pay attention to the indentation.
For more details you can refer to the tutorial repo: Hope it helps, thanks. |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The behavior you're seeing with the
DiceMetric
is likely due to a misunderstanding of the ignore_empty parameter's functionality.When the
ignore_empty
option is set to True, it's supposed to set a NaN value for cases where the ground truth is empty. However, this does not mean that a NaN will be returned for such classes when computing the metric. Instead, these cases are ignored during the calculation process.Thus, even if some classes are ignored (due to being absent in the ground truth when ignore_empty=True), the metric computation does not return NaN for these classes. Instead, it computes the metric over the non-ignored classes only.If the
DiceMetric
were to return a NaN for an ignored class, this would also affect the computed average Dice score (since any mathematical operation with NaN results in NaN), rendering the metric not well-defined for batches that include at least one empty class in the ground truth.I hope this helps and let me know if you have any other questions!
Thanks.
Originally posted by @KumoLiu in #7504 (comment)
Beta Was this translation helpful? Give feedback.
All reactions