question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError when "brats_mri_segmentation_v0.2.1" from monaibundle is used.

See original GitHub issue

Describe 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:

  1. pip install monailabel
  2. monailabel apps --download --name monaibundle --output apps
  3. monailabel datasets --download --name Task01_BrainTumour --output datasets
  4. monailabel start_server --app apps/monaibundle --studies datasets/Task01_BrainTumour/imagesTr --conf models brats_mri_segmentation_v0.2.1
  5. Run the model in 3D slicer with any image from the dataset.

Expected behavior Segmentation should be displayed in 3D slicer.

Screenshots image image

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:open
  • Created a year ago
  • Reactions:1
  • Comments:52 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
lassoancommented, Oct 28, 2022

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.

1reaction
ulphyprocommented, Nov 25, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto Segmentation error error in 'brats_mri_segmentation_v0 ...
But I can't extract brain tumor as following figure. image. Environment. Printing MONAI config… MONAI version: 1.0.1. Numpy version: 1.23.4
Read more >
MONAI Model Zoo
MONAI team. A pre-trained model for volumetric (3D) segmentation of brain tumor subregions from multimodal MRIs based on BraTS 2018 data. Model Details....
Read more >
Multimodal Brain Tumor Segmentation Challenge 2020: Data
Specifically, the datasets used in this year's challenge have been updated, since BraTS'19, with more routine clinically-acquired 3T multimodal MRI scans, ...
Read more >
Automatic Liver Segmentation — Part 3/4: Common Errors
I know this is a stupid error that you may encounter and that you will say that you can easily find it, but...
Read more >
NVIDIA Data Scientists Take Top Spots in MICCAI 2021 Brain ...
MONAI was used for data preprocessing to clean and denoise the data, ... Reduction in Semantic Segmentation of 3D Brain MRIs – Rank...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found