tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

ConvertToMultiChannelBasedOnBratsClassesd might be wrong

Open guopengf opened this issue 2 years ago • 2 comments

Describe the bug

This Class ConvertToMultiChannelBasedOnBratsClassesd is used in brats_training_ddp.py and brats_segmentation_3d.ipynb. It may map the label data to wrong classes. According to its docstring, it describes that label 2 is the GD-enhancing tumor, and label 3 is the non-enhancing tumor core.

image

However, the json file in this downloaded dataset describes that label 2 is the non-enhancing tumor and label 3 is the GD-enhancing tumor.

To Reproduce

Download the dataset by from the official website or call monai.apps.DecathlonDataset(task="Task01_BrainTumour"). Find the dataset.json. image

Expected behavior N/A

Screenshots I also visually verified labels. It seems like json file is right. label 2 should be the non-enhancing tumor and label 3 should be the GD-enhancing tumor. image

Environment (please complete the following information):

  • OS
  • Python version
  • MONAI version [e.g. git commit hash]
  • CUDA/cuDNN version
  • GPU models and configuration

Additional context Add any other context about the problem here.

guopengf avatar Apr 28 '23 03:04 guopengf

agreed, it seems this version of the transform is correct https://github.com/Project-MONAI/MONAI/blob/a1c437111a511d17dcd0e04d491747f6677f4def/monai/transforms/utility/array.py#L1078-L1086 which is not needed for the dataset used in the tutorials. however we can still use this as an example of customized transforms, with revised docstrings cc @Nic-Ma @myron

wyli avatar Jun 13 '23 21:06 wyli

If this is true, it seems like quite a significant problem.

25benjaminli avatar Jan 20 '24 15:01 25benjaminli

Should be fixed in https://github.com/Project-MONAI/MONAI/pull/8246. @guopengf, please help confirm, thanks!

KumoLiu avatar Dec 08 '24 15:12 KumoLiu