You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the medicaldetectiontoolkit/utils/model_utils.py, lines 883, batch_dice loss function,
I think should add if y[:, 1:, ...].max() == 0: y = 1 - y pred = 1 - pred
for the patch maybe it has no roi
The text was updated successfully, but these errors were encountered:
Hi CodingHHW,
thanks for your concern.
Since the dice loss is implemented over the whole batch, it is unlikely a class will not at all be present, however it is possible.
For that case, I have added an additive smooth which handles this special case and is negligible in other cases (this commit).
in the medicaldetectiontoolkit/utils/model_utils.py, lines 883, batch_dice loss function,
I think should add
if y[:, 1:, ...].max() == 0:
y = 1 - y
pred = 1 - pred
for the patch maybe it has no roi
The text was updated successfully, but these errors were encountered: