Project-MONAI / Project-MONAI/MONAILabel

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

Open
#1,051 61 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
891
Forks
269
Avg merge
15h 41m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the monaibundle app and the brats_mri_segmentation_v0.2.1 model configuration, then reproduce the failure using the documented monailabel start_server command and the Task01_BrainTumour dataset. Trace the input shape into the model and verify the result in 3D Slicer; done means the model runs without the channel-mismatch RuntimeError and displays a segmentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.