Open memani1 opened 2 years ago
This issue arises with scikit-image = 0.19.x. The older version of skimage.transform.resize function converts the inputs from uint8 to an output of float64 and normalizes it within the function. But in the latest it produces an output of uint8 itself and does not normalize. So additional normalization of the mask is required so that it values are contained with 0s and 1s instead of a value of 255.
Suggested changes:
def normalize_mask(mask): mask = mask / (np.max(mask)) return mask
self.volumes = [(normalize_volume(v), normalize_mask(m)) for v, m in self.volumes]
thanks!really useful !
When I train this model with the default run command python train.py
I see negative loss values and 0 Dice coefficient value
This code is using Torch 1.10 on Nvidia GPU with CUDA 11. Is there something that needs fixing in the code (dataloader etc.)?