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

Question about calculating uncertainty of non-bayesian model when training #3

Open
lisosia opened this issue Aug 27, 2020 · 2 comments

Comments

@lisosia
Copy link

lisosia commented Aug 27, 2020

Hi, Thank you for your great work.

When training for non-bayesian model,
it seems that certainty map is calculated by softmax(logit):

UMA/train_bayesian_adapt.py

Lines 359 to 362 in b72dad9

predict = cv2.resize(predict, img_size, interpolation = cv2.INTER_CUBIC)
cv2.imwrite("%s/%s_p.png" % (saveDir, filename[:-4]), predict)
predict_seg = cv2.resize(predict_seg, img_size, interpolation = cv2.INTER_CUBIC)
cv2.imwrite("%s/%s_s.png" % (saveDir, filename[:-4]), predict_seg)

Is it more reasonable to use abs(softmax(logit) - 0.5) ?
It seems that Figure2(c) use something like the latter equation to calc (un)certainty map.

Thanks.

@lisosia lisosia changed the title Question about model uncertainty of non-bayesian model when training Question about calculating uncertainty of non-bayesian model when training Aug 27, 2020
@cai-mj
Copy link
Owner

cai-mj commented Aug 28, 2020

Hi, Thank you for your great work.

When training for non-bayesian model,
it seems that certainty map is calculated by softmax(logit):

UMA/train_bayesian_adapt.py

Lines 359 to 362 in b72dad9

predict = cv2.resize(predict, img_size, interpolation = cv2.INTER_CUBIC)
cv2.imwrite("%s/%s_p.png" % (saveDir, filename[:-4]), predict)
predict_seg = cv2.resize(predict_seg, img_size, interpolation = cv2.INTER_CUBIC)
cv2.imwrite("%s/%s_s.png" % (saveDir, filename[:-4]), predict_seg)

Is it more reasonable to use abs(softmax(logit) - 0.5) ?
It seems that Figure2(c) use something like the latter equation to calc (un)certainty map.

Thanks.

Hi, my code doesn't calculate uncertainty map for non-bayesian model. The comment before that four lines of code is mistakenly written (sorry).
The Figure 2(c) in the paper was indeed visualized based on uncertainty = 1 - abs(softmax(logit) - 0.5)*2 for demonstration.

@lisosia
Copy link
Author

lisosia commented Aug 28, 2020

Thanks for your clarification.
Is the equation uncertainty = 1 - abs(softmax(logit) - 0.5)*2 also used for the experimant of Table1 (CNN+uma) ?

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

No branches or pull requests

2 participants