Closed DuskNgai closed 5 months ago
Thanks a lot for pointing out! I never used it without setting the ignore label, so this didn't appear to me. But you're absolutely correct. I fixed the bug in the latest PR (https://github.com/teamtomo/membrain-seg/pull/45).
Merged now into the main repository, so closing this issue
In
src/membrain_seg/segmentation/training/metric_utils.py
, I found whenignore_label
is set toNone
, the function returns anan
. I examined the code and found that there may be a bug in your functionmasked_accuracy
:I think it should be
torch.zeros_like(y_gt).bool()
instead oftorch.ones_like(y_gt).bool()
.Looking forward to your reply and hope it can be fixed soon~