Skip to content

UNETR validation metric stuck on 0.5 #1159

Answered by tangy5
carlpe asked this question in Q&A
Jan 11, 2023 · 2 comments · 10 replies
Discussion options

You must be logged in to vote

The code looks normal, I feel the post label and pred are correct:

post_label = AsDiscrete(to_onehot=2)
post_pred = AsDiscrete(argmax=True, to_onehot=2)
dice_metric = DiceMetric(include_background=True, reduction="mean", get_not_nans=False)

I guess there is one class Dice is 1 and the other one is all 0, resulting Dice=0.5 all the time. Can you confirm the data and labels are correct after merging classes?

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
8 replies
@carlpe
Comment options

@carlpe
Comment options

@carlpe
Comment options

@tangy5
Comment options

tangy5 Jan 12, 2023
Collaborator

@carlpe
Comment options

Answer selected by carlpe
Comment options

You must be logged in to vote
2 replies
@KumoLiu
Comment options

@carlpe
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants