RuntimeError when "brats_mri_segmentation_v0.2.1" from monaibundle is used.
See original GitHub issueDescribe the bug MONAI Label server is giving the following error when “brats_mri_segmentation_v0.2.1” is used for brain tumor segmentation.
RuntimeError: Given groups=1, weight of size [16, 4, 3, 3, 3], expected input[1, 240, 240, 240, 160] to have 4 channels, but got 240 channels instead
To Reproduce Steps to reproduce the behavior:
- pip install monailabel
- monailabel apps --download --name monaibundle --output apps
- monailabel datasets --download --name Task01_BrainTumour --output datasets
- monailabel start_server --app apps/monaibundle --studies datasets/Task01_BrainTumour/imagesTr --conf models brats_mri_segmentation_v0.2.1
- Run the model in 3D slicer with any image from the dataset.
Expected behavior Segmentation should be displayed in 3D slicer.
Screenshots
Environment
Ensuring you use the relevant python executable, please paste the output of:
python -c 'import monai; monai.config.print_debug_info()'
================================ Printing MONAI config…
MONAI version: 1.0.0 Numpy version: 1.22.4 Pytorch version: 1.12.1+cpu MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False MONAI rev id: 170093375ce29267e45681fcec09dfa856e1d7e7 MONAI file: C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\monai_init_.py
Optional dependencies: Pytorch Ignite version: 0.4.10 Nibabel version: 4.0.2 scikit-image version: 0.19.3 Pillow version: 9.2.0 Tensorboard version: 2.10.0 gdown version: 4.5.1 TorchVision version: 0.13.1+cpu tqdm version: 4.64.0 lmdb version: 1.3.0 psutil version: 5.9.1 pandas version: 1.4.3 einops version: 0.4.1 transformers version: NOT INSTALLED or UNKNOWN VERSION. mlflow version: NOT INSTALLED or UNKNOWN VERSION. pynrrd version: 0.4.3
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:52 (1 by maintainers)
Top GitHub Comments
Those 4-channel NIFTI images in BRATS is a complete nonsense, because 4 completely independent images are resampled and dumped into a single image file. This misuse is possible in NIFTI (although it breaks several rules of the standard and you lose information about what kind of images you have in the file), but it is not even possible in DICOM. If you want to store images in DICOM then you need to create a separate series from each channel.
@diazandr3s
Thank you for answering my question.
I downloaded BraTS2021 dataset as you mention.
Should I run using apps/radiology with BraTS2021 dataset?
After starting monailabel server using command ‘monailabel start_server --app apps/radiology --studies datasets/Task01_BrainTumour/imagesTr --conf models segmentation’ in Window Powershell, I can’t run 3D-Slicer.
Because It doesn’t support segmentation model associated with brain tumor.
Person that I posted in Project-MONAI/model-zoo#239 is also me.