MIC-DKFZ / medicaldetectiontoolkit

The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
Apache License 2.0
1.31k stars 297 forks source link

is it a small fault in batch_dice #88

Closed CodingHHW closed 5 years ago

CodingHHW commented 5 years ago

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 if it has no roi.