Project-MONAI / MONAILabel

MONAI Label is an intelligent open source image labeling and learning tool.
https://docs.monai.io/projects/label
Apache License 2.0
592 stars 189 forks source link

Auto segmentation fails due to wrong amount of channels #1367

Closed MatthiasCami8 closed 1 year ago

MatthiasCami8 commented 1 year ago

Describe the bug I want to use Slicer to visualize some MRI images and use auto segmentation on the MONAILabel server. My server is running on a GCP VM, which is set up successfully and can connect to Slicer. Can also load the data, but when I try to run 'auto segmentation' I get the following error (server loggs from starting server -> loading 1 image (by clicking 'next sample') -> running auto segmentation:

Server logs 2023-03-28 13:13:50,951 - USING:: version = False 2023-03-28 13:13:50,951 - USING:: app = /home/matthias/radiology 2023-03-28 13:13:50,951 - USING:: studies = /home/matthias/Task05_Prostate/imagesTr 2023-03-28 13:13:50,951 - USING:: verbose = INFO 2023-03-28 13:13:50,951 - USING:: conf = [['models', 'segmentation']] 2023-03-28 13:13:50,951 - USING:: host = 0.0.0.0 2023-03-28 13:13:50,951 - USING:: port = 8000 2023-03-28 13:13:50,951 - USING:: uvicorn_app = monailabel.app:app 2023-03-28 13:13:50,951 - USING:: ssl_keyfile = None 2023-03-28 13:13:50,952 - USING:: ssl_certfile = None 2023-03-28 13:13:50,952 - USING:: ssl_keyfile_password = None 2023-03-28 13:13:50,952 - USING:: ssl_ca_certs = None 2023-03-28 13:13:50,952 - USING:: workers = None 2023-03-28 13:13:50,952 - USING:: limit_concurrency = None 2023-03-28 13:13:50,952 - USING:: access_log = False 2023-03-28 13:13:50,952 - USING:: log_config = None 2023-03-28 13:13:50,952 - USING:: dryrun = False 2023-03-28 13:13:50,952 - USING:: action = start_server 2023-03-28 13:13:50,952 - ENV SETTINGS:: MONAI_LABEL_API_STR = 2023-03-28 13:13:50,952 - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_APP_DIR = 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_STUDIES = 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_AUTH_ENABLE = False 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_AUTH_DB = 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_APP_CONF = '{}' 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_DATASTORE = 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_URL = 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_USERNAME = 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PASSWORD = 2023-03-28 13:13:50,953 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_API_KEY = 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_CACHE_PATH = 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PROJECT = 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_ASSET_PATH = 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_DSA_ANNOTATION_GROUPS = 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME = 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD = 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH = 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX = None 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX = None 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX = None 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CONVERT_TO_NIFTI = True 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_SEARCH_FILTER = '{"Modality": "CT"}' 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_EXPIRY = 180 2023-03-28 13:13:50,954 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PROXY_TIMEOUT = 30.0 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_READ_TIMEOUT = 5.0 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_READ_ONLY = False 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = '["*.nii.gz", "*.nii", "*.nrrd", "*.jpg", "*.png", "*.tif", "*.svs", "*.xml"]' 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = '[]' 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH = 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_TRACKING_ENABLED = True 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_LABEL_TRACKING_URI = 2023-03-28 13:13:50,955 - ENV SETTINGS:: MONAI_ZOO_SOURCE = github 2023-03-28 13:13:50,956 - ENV SETTINGS:: MONAI_ZOO_REPO = Project-MONAI/model-zoo/hosting_storage_v1 2023-03-28 13:13:50,956 - ENV SETTINGS:: MONAI_ZOO_AUTH_TOKEN = 2023-03-28 13:13:50,956 - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True 2023-03-28 13:13:50,956 - Allow Origins: ['*'] [2023-03-28 13:13:51,429] [25839] [MainThread] [INFO] (uvicorn.error:75) - Started server process [25839] [2023-03-28 13:13:51,430] [25839] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup. [2023-03-28 13:13:51,430] [25839] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: /home/matthias/radiology; studies: /home/matthias/Task05_Prostate/imagesTr; conf: {'models': 'segmentation'} [2023-03-28 13:13:53,314] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for MONAILabelApp Found: <class 'main.MyApp'> [2023-03-28 13:13:53,319] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_3d.Deepgrow3D'> [2023-03-28 13:13:53,319] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.localization_spine.LocalizationSpine'> [2023-03-28 13:13:53,320] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation.Segmentation'> [2023-03-28 13:13:53,321] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_spleen.SegmentationSpleen'> [2023-03-28 13:13:53,322] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_vertebra.SegmentationVertebra'> [2023-03-28 13:13:53,322] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepedit.DeepEdit'> [2023-03-28 13:13:53,323] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.localization_vertebra.LocalizationVertebra'> [2023-03-28 13:13:53,323] [25839] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_2d.Deepgrow2D'> [2023-03-28 13:13:53,323] [25839] [MainThread] [INFO] (main:93) - +++ Adding Model: segmentation => lib.configs.segmentation.Segmentation [2023-03-28 13:13:53,324] [25839] [MainThread] [INFO] (monailabel.utils.others.generic:185) - Downloading resource: /home/matthias/radiology/model/pretrained_segmentation.pt from https://github.com/Project-MONAI/MONAILabel/releases/download/pretrained/radiology_segmentation_unet_multilabel.pt pretrained_segmentation.pt: 18.5MB [00:01, 15.9MB/s] 2023-03-28 13:13:54,546 - INFO - Downloaded: /home/matthias/radiology/model/pretrained_segmentation.pt 2023-03-28 13:13:54,546 - INFO - Expected md5 is None, skip md5 check for file /home/matthias/radiology/model/pretrained_segmentation.pt. [2023-03-28 13:13:55,599] [25839] [MainThread] [INFO] (main:96) - +++ Using Models: ['segmentation'] [2023-03-28 13:13:55,599] [25839] [MainThread] [INFO] (monailabel.interfaces.app:135) - Init Datastore for: /home/matthias/Task05_Prostate/imagesTr [2023-03-28 13:13:55,600] [25839] [MainThread] [INFO] (monailabel.datastore.local:129) - Auto Reload: True; Extensions: ['*.nii.gz', '*.nii', '*.nrrd', '*.jpg', '*.png', '*.tif', '*.svs', '*.xml'] [2023-03-28 13:13:55,605] [25839] [MainThread] [INFO] (monailabel.datastore.local:576) - Invalidate count: 0 [2023-03-28 13:13:55,605] [25839] [MainThread] [INFO] (monailabel.datastore.local:150) - Start observing external modifications on datastore (AUTO RELOAD) [2023-03-28 13:13:55,617] [25839] [MainThread] [INFO] (main:126) - +++ Adding Inferer:: segmentation => <lib.infers.segmentation.Segmentation object at 0x7fafa482ab50> [2023-03-28 13:13:55,617] [25839] [MainThread] [INFO] (main:191) - {'segmentation': <lib.infers.segmentation.Segmentation object at 0x7fafa482ab50>, 'Histogram+GraphCut': <monailabel.scribbles.infer.HistogramBasedGraphCut object at 0x7fafa47ccb50>, 'GMM+GraphCut': <monailabel.scribbles.infer.GMMBasedGraphCut object at 0x7fafa47ccbd0>} [2023-03-28 13:13:55,618] [25839] [MainThread] [INFO] (main:206) - +++ Adding Trainer:: segmentation => <lib.trainers.segmentation.Segmentation object at 0x7fafa47ccc10> [2023-03-28 13:13:55,618] [25839] [MainThread] [INFO] (monailabel.utils.sessions:51) - Session Path: /home/matthias/.cache/monailabel/sessions [2023-03-28 13:13:55,618] [25839] [MainThread] [INFO] (monailabel.utils.sessions:52) - Session Expiry (max): 3600 [2023-03-28 13:13:55,618] [25839] [MainThread] [INFO] (monailabel.interfaces.app:475) - App Init - completed [2023-03-28 13:13:55,619] [timeloop] [INFO] Starting Timeloop.. [2023-03-28 13:13:55,619] [25839] [MainThread] [INFO] (timeloop:60) - Starting Timeloop.. [2023-03-28 13:13:55,619] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x7fafa47b67a0> [2023-03-28 13:13:55,619] [25839] [MainThread] [INFO] (timeloop:42) - Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x7fafa47b67a0> [2023-03-28 13:13:55,619] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set [2023-03-28 13:13:55,619] [25839] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set [2023-03-28 13:13:55,619] [25839] [MainThread] [INFO] (uvicorn.error:59) - Application startup complete. [2023-03-28 13:13:55,620] [25839] [MainThread] [INFO] (uvicorn.error:211) - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) [2023-03-28 13:14:04,697] [25839] [MainThread] [INFO] (monailabel.endpoints.activelearning:43) - Active Learning Request: {'strategy': 'random', 'client_id': 'user-xyz'} [2023-03-28 13:14:04,699] [25839] [MainThread] [INFO] (monailabel.tasks.activelearning.random:47) - Random: Selected Image: prostate_41; Weight: 1680009244 [2023-03-28 13:14:04,702] [25839] [MainThread] [INFO] (monailabel.endpoints.activelearning:59) - Next sample: {'id': 'prostate_41', 'weight': 1680009244, 'path': '/home/matthias/Task05_Prostate/imagesTr/prostate_41.nii.gz', 'ts': 1680008931, 'name': 'prostate_41.nii.gz'} [2023-03-28 13:14:20,018] [25839] [MainThread] [INFO] (monailabel.endpoints.infer:160) - Infer Request: {'model': 'segmentation', 'image': 'prostate_41', 'largest_cc': True, 'device': 'cuda', 'result_extension': '.nrrd', 'result_dtype': 'uint8', 'client_id': 'user-xyz'} [2023-03-28 13:14:20,019] [25839] [MainThread] [INFO] (monailabel.tasks.infer.basic_infer:279) - Infer Request (final): {'largest_cc': True, 'device': 'cuda', 'model': 'segmentation', 'image': '/home/matthias/Task05_Prostate/imagesTr/prostate_41.nii.gz', 'result_extension': '.nrrd', 'result_dtype': 'uint8', 'client_id': 'user-xyz', 'description': 'A pre-trained model for volumetric (3D) segmentation over 3D Images'} [2023-03-28 13:14:20,022] [25839] [MainThread] [INFO] (monailabel.interfaces.utils.transform:76) - PRE - Run Transform(s) [2023-03-28 13:14:20,022] [25839] [MainThread] [INFO] (monailabel.interfaces.utils.transform:77) - PRE - Input Keys: ['largest_cc', 'device', 'model', 'image', 'result_extension', 'result_dtype', 'client_id', 'description', 'image_path'] [2023-03-28 13:14:23,080] [25839] [MainThread] [INFO] (monailabel.interfaces.utils.transform:122) - PRE - Transform (LoadImaged): Time: 3.0573; image: torch.Size([256, 256, 18, 2])(torch.float32) [2023-03-28 13:14:24,648] [25839] [MainThread] [INFO] (monailabel.interfaces.utils.transform:122) - PRE - Transform (EnsureTyped): Time: 1.5684; image: torch.Size([256, 256, 18, 2])(torch.float32) [2023-03-28 13:14:24,649] [25839] [MainThread] [INFO] (monailabel.interfaces.utils.transform:122) - PRE - Transform (EnsureChannelFirstd): Time: 0.0004; image: torch.Size([2, 256, 256, 18])(torch.float32) [2023-03-28 13:14:25,670] [25839] [MainThread] [INFO] (monailabel.interfaces.utils.transform:122) - PRE - Transform (Spacingd): Time: 1.0211; image: torch.Size([2, 192, 192, 52])(torch.float32) [2023-03-28 13:14:25,673] [25839] [MainThread] [INFO] (monailabel.interfaces.utils.transform:122) - PRE - Transform (ScaleIntensityRanged): Time: 0.0023; image: torch.Size([2, 192, 192, 52])(torch.float32) [2023-03-28 13:14:25,673] [25839] [MainThread] [INFO] (monailabel.tasks.infer.basic_infer:471) - Inferer:: cuda => SlidingWindowInferer => {'roi_size': (128, 128, 128), 'sw_batch_size': 1, 'overlap': 0.25, 'mode': constant, 'sigma_scale': 0.125, 'padding_mode': constant, 'cval': 0.0, 'sw_device': None, 'device': None, 'progress': False, 'cpu_thresh': None, 'roi_weight_map': None} [2023-03-28 13:14:25,674] [25839] [MainThread] [INFO] (monailabel.tasks.infer.basic_infer:420) - Infer model path: /home/matthias/radiology/model/pretrained_segmentation.pt [2023-03-28 13:14:25,750] [25839] [MainThread] [ERROR] (uvicorn.error:369) - Exception in ASGI application Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi result = await app(self.scope, self.receive, self.send) File "/opt/conda/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/opt/conda/lib/python3.7/site-packages/fastapi/applications.py", line 269, in __call__ await super().__call__(scope, receive, send) File "/opt/conda/lib/python3.7/site-packages/starlette/applications.py", line 124, in __call__ await self.middleware_stack(scope, receive, send) File "/opt/conda/lib/python3.7/site-packages/starlette/middleware/errors.py", line 184, in __call__ raise exc File "/opt/conda/lib/python3.7/site-packages/starlette/middleware/errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "/opt/conda/lib/python3.7/site-packages/starlette/middleware/cors.py", line 84, in __call__ await self.app(scope, receive, send) File "/opt/conda/lib/python3.7/site-packages/starlette/exceptions.py", line 93, in __call__ raise exc File "/opt/conda/lib/python3.7/site-packages/starlette/exceptions.py", line 82, in __call__ await self.app(scope, receive, sender) File "/opt/conda/lib/python3.7/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__ raise e File "/opt/conda/lib/python3.7/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "/opt/conda/lib/python3.7/site-packages/starlette/routing.py", line 670, in __call__ await route.handle(scope, receive, send) File "/opt/conda/lib/python3.7/site-packages/starlette/routing.py", line 266, in handle await self.app(scope, receive, send) File "/opt/conda/lib/python3.7/site-packages/starlette/routing.py", line 65, in app response = await func(request) File "/opt/conda/lib/python3.7/site-packages/fastapi/routing.py", line 228, in app dependant=dependant, values=values, is_coroutine=is_coroutine File "/opt/conda/lib/python3.7/site-packages/fastapi/routing.py", line 160, in run_endpoint_function return await dependant.call(**values) File "/opt/conda/lib/python3.7/site-packages/monailabel/endpoints/infer.py", line 179, in api_run_inference return run_inference(background_tasks, model, image, session_id, params, file, label, output) File "/opt/conda/lib/python3.7/site-packages/monailabel/endpoints/infer.py", line 161, in run_inference result = instance.infer(request) File "/opt/conda/lib/python3.7/site-packages/monailabel/interfaces/app.py", line 307, in infer result_file_name, result_json = task(request) File "/opt/conda/lib/python3.7/site-packages/monailabel/tasks/infer/basic_infer.py", line 306, in __call__ data = self.run_inferer(data, device=device) File "/opt/conda/lib/python3.7/site-packages/monailabel/tasks/infer/basic_infer.py", line 481, in run_inferer outputs = inferer(inputs, network) File "/opt/conda/lib/python3.7/site-packages/monai/inferers/inferer.py", line 218, in __call__ **kwargs, File "/opt/conda/lib/python3.7/site-packages/monai/inferers/utils.py", line 185, in sliding_window_inference seg_prob_out = predictor(window_data, *args, **kwargs) # batched patch segmentation File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/lib/python3.7/site-packages/monai/networks/nets/unet.py", line 311, in forward x = self.model(x) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/container.py", line 204, in forward input = module(input) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/lib/python3.7/site-packages/monai/networks/blocks/convolutions.py", line 314, in forward res: torch.Tensor = self.residual(x) # create the additive residual from x File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 613, in forward return self._conv_forward(input, self.weight, self.bias) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 609, in _conv_forward input, weight, bias, self.stride, self.padding, self.dilation, self.groups RuntimeError: Given groups=1, weight of size [16, 1, 3, 3, 3], expected input[1, 2, 128, 128, 128] to have 1 channels, but got 2 channels instead

To Reproduce Steps to reproduce the behavior:

  1. Use slicer to connect to monailabel server
  2. Run 'monailabel start_server --app radiology --studies Task05_Prostate/imagesTr --conf models segmentation'
  3. Load in new image on slicer and do 'auto segmentation'

Expected behavior I expect the model to do segmentation on the example image. Also tested with deepedit model but the same error occurs.

Environment

================================
Printing MONAI config...
================================
MONAI version: 1.1.0
Numpy version: 1.21.6
Pytorch version: 1.13.1+cu117
MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
MONAI rev id: a2ec3752f54bfc3b40e7952234fbeb5452ed63e3
MONAI __file__: /opt/conda/lib/python3.7/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.4.0
Tensorboard version: 2.11.2
gdown version: 4.7.1
TorchVision version: 0.14.1+cu117
tqdm version: 4.64.1
lmdb version: 1.4.0
psutil version: 5.9.3
pandas version: 1.3.5
einops version: 0.6.0
transformers version: NOT INSTALLED or UNKNOWN VERSION.
mlflow version: 1.30.0
pynrrd version: 0.4.3

For details about installing the optional dependencies, please visit:
    https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies

================================
Printing system config...
================================
System: Linux
Linux version: Debian GNU/Linux 10 (buster)
Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-debian-10.13
Processor: 
Machine: x86_64
Python version: 3.7.12
Process name: python
Command: ['python', '-c', 'import monai; monai.config.print_debug_info()']
Open files: []
Num physical CPUs: 1
Num logical CPUs: 2
Num usable CPUs: 2
CPU usage (%): [2.1, 100.0]
CPU freq. (MHz): 2300
Load avg. in last 1, 5, 15 mins (%): [9.0, 7.5, 5.0]
Disk usage (%): 79.8
Avg. sensor temp. (Celsius): UNKNOWN for given OS
Total physical memory (GB): 7.3
Available memory (GB): 6.3
Used memory (GB): 0.7

================================
Printing GPU config...
================================
Num GPUs: 1
Has CUDA: True
CUDA version: 11.7
cuDNN enabled: True
cuDNN version: 8500
Current device: 0
Library compiled for CUDA architectures: ['sm_37', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'sm_80', 'sm_86']
GPU 0 Name: Tesla T4
GPU 0 Is integrated: False
GPU 0 Is multi GPU board: False
GPU 0 Multi processor count: 40
GPU 0 Total memory (GB): 14.6
GPU 0 CUDA capability (maj.min): 7.5
diazandr3s commented 1 year ago

Hi @MatthiasCami8,

Thanks for the detailed log. From the logs, I can see that you're trying to run inference on the _Task05Prostate images. These images are 4D MR - I think the modalities are T2 and ADC. The available segmentation model on MONAI Label was trained on single modality images (CT images). You could train a Segmentation model on multimodality images in MONAI Label, but some changes have to be made before that. For context, here is the issue we've seen on multimodality images being in a single NIfTI file as is the case of the Medical Segmentation Decathlon. A similar case is the BRATS dataset in the Medical Segmentation Decathlon: https://github.com/Project-MONAI/MONAILabel/issues/1051

If you'd like to get a sense of how MONAI Label works, my suggestion then is to separate the modalities and work with a single modality (either T2 or ADC).

MatthiasCami8 commented 1 year ago

Thanks for the answer @diazandr3s, makes sense!

As a follow up: is there an easy way to just convert the 4D MR to T2/ADC? My main goal for now is just testing out how MONAI Label works and see what the auto segmentation can do.

SachidanandAlle commented 1 year ago

In that case.. just try on liver or spleen dataset and run auto segmentation for the model 'segemenation' or 'segemenation_spleen'

Also note that we don't have pre trained models for MR/Prostate

MatthiasCami8 commented 1 year ago

Are you sure about that, what about the "Prostate MRI Anatomy" model on the model-zoo https://monai.io/model-zoo.html ? (I specifically want to focus on prostates, that's why)

diazandr3s commented 1 year ago

You're right @MatthiasCami8 The Prostate MRI Model uses only T2 (https://github.com/Project-MONAI/model-zoo/tree/dev/models/prostate_mri_anatomy). You should be able to use it in MONAI Label. It'll be great to try it. Follow these instructions and let us know how that goes on T2 images of the Task05_Prostate dataset.

SachidanandAlle commented 1 year ago

Closing this issue. Please do not that, always the example models (provided here for reference) always depends on the kind of input that was used for training.