DeepLearningExamples
DeepLearningExamples copied to clipboard
fix(nnUNet): Correct background mask in BraTS preprocessor
Hi, Maintainer.
This PR fixes the issue described in #1438.
Problem:
The preprocessing code for the BraTS nnU-Net example was using np.where(image[i] <= 0) to create a background mask. This incorrectly masked out foreground voxels that had negative values after z-score normalization.
Solution:
This fix changes the condition to np.where(image[i] == 0), which correctly identifies only the true background voxels. This ensures the 5th channel mask is generated as intended.
Fixes #1438