Dice value changes depending on Ignore_index pixel values #1524
Unanswered
CuriousMonkey7
asked this question in
Classification
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been using torchmetric to calculate Dice, JaccardIndex and Accuracy with
ignore_index
for a segmentation problem. Ideally pixel value of ignore_index pixels should not affect the metrics. But when I change the pixel value of ignore_index pixel in the predicted mask, Dice changes.Also, in all three metrics, when
average="macro
ignore_index class is considered while taking the average, so even if the pixel is exact the same(other than ignore_index pixels), the metric value is less than 1.Code:
Example 1
Example 2
Is this a bug, or I'm doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions