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
610 stars 196 forks source link

Segmentation_[anatomy] model does not show up under Auto Segmentation header. #852

Closed MathijsdeBoer closed 1 year ago

MathijsdeBoer commented 2 years ago

Describe the bug When using a fairly straightforward non-interactive segmentation model, I expected to be able to provide a handful of manual segmentations, train the model, and simply run the auto segmentation to finish up the rest of my dataset.

However, I unfortunately can't select the model in the Auto Segmentation header.

I am using a custom implementation of the segmentation_spleen.py example files, with only the label name and class names changed.

To Reproduce Steps to reproduce the behavior:

  1. Provide a number of manual segmentations to start off the segmentation model
  2. Train model successfully
  3. Notice that there is no way to actually use the trained model

Expected behavior After providing a few manual segmentations, I expect to be able to use the now trained model in segmenting my anatomy of choice.

Screenshots WhereModel

Environment

Ensuring you use the relevant python executable, please paste the output of:

================================
Printing MONAI config...
================================
MONAI version: 0.9.0
Numpy version: 1.22.4
Pytorch version: 1.11.0+cpu
MONAI flags: HAS_EXT = False, USE_COMPILED = False
MONAI rev id: af0e0e9f757558d144b655c63afcea3a4e0a06f5
MONAI __file__: C:\Users\[Username]\AppData\Local\pypoetry\Cache\virtualenvs\nnunetdocker-uHdzYLSm-py3.9\lib\site-packages\monai\__init__.py

Optional dependencies:
Pytorch Ignite version: 0.4.8
Nibabel version: 3.2.2
scikit-image version: 0.19.3
Pillow version: 9.1.1
Tensorboard version: 2.9.1
gdown version: 4.4.0
TorchVision version: 0.12.0+cpu
tqdm version: 4.64.0
lmdb version: 1.3.0
psutil version: 5.9.1
pandas version: 1.4.2
einops version: 0.4.1
transformers version: NOT INSTALLED or UNKNOWN VERSION.
mlflow version: NOT INSTALLED or UNKNOWN VERSION.
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: Windows
Win32 version: ('10', '10.0.19044', 'SP0', 'Multiprocessor Free')
Win32 edition: Enterprise
Platform: Windows-10-10.0.19044-SP0
Processor: Intel64 Family 6 Model 85 Stepping 4, GenuineIntel
Machine: AMD64
Python version: 3.9.13
Process name: python.exe
Command: ['C:\\Users\\[Username]\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-c', 'import monai; monai.config.print_debug_info()']
Open files: [popenfile(path='C:\\Windows\\System32\\en-US\\kernel32.dll.mui', fd=-1), popenfile(path='C:\\Windows\\System32\\en-US\\tzres.dll.mui', fd=-1), popenfile(path='C:\\Windows\\System32\\en-US\\KernelBase.dll.mui', fd=-1)]  
Num physical CPUs: 12
Num logical CPUs: 24
Num usable CPUs: 24
CPU usage (%): [5.0, 3.8, 1.9, 0.6, 0.0, 1.2, 1.9, 1.9, 0.6, 0.0, 0.6, 0.6, 2.5, 72.3, 0.6, 0.6, 0.6, 1.2, 1.9, 0.0, 1.2, 1.9, 0.0, 13.8]
CPU freq. (MHz): 3504
Load avg. in last 1, 5, 15 mins (%): [0.0, 0.0, 0.0]
Disk usage (%): 66.6
Avg. sensor temp. (Celsius): UNKNOWN for given OS
Total physical memory (GB): 31.7
Available memory (GB): 15.7
Used memory (GB): 16.0

================================
Printing GPU config...
================================
Num GPUs: 0
Has CUDA: False
cuDNN enabled: False

Additional context None, however CUDA 11.6 and 11.7 are installed, and nvidia-smi works, while MONAI tells me CUDA is not available. This is (probably) not relevant to my issue though, and I might open a new issue for that.

SachidanandAlle commented 2 years ago

Try to refresh it.. or check 127.0.0.1:8000/info

It will be enable inference only when a pretrained/trained model exists.. https://github.com/Project-MONAI/MONAILabel/blob/main/monailabel/interfaces/tasks/infer.py#L135-L143

https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/configs/segmentation_spleen.py#L51-L55 https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/configs/segmentation_spleen.py#L84 https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/configs/segmentation_spleen.py#L97-L98

MathijsdeBoer commented 2 years ago

127.0.0.1:8000/info response:

{
  "name": "MONAILabel - Radiology",
  "description": "DeepLearning models for radiology",
  "version": "2.0",
  "labels": [
    "skin"
  ],
  "models": {
    "segmentation_skin": {
      "type": "segmentation",
      "labels": [
        "skin"
      ],
      "dimension": 3,
      "description": "A pre-trained model for volumetric (3D) segmentation of the skin on T1CE MR images",
      "config": {}
    },
    "Histogram+GraphCut": {
      "type": "scribbles",
      "labels": [
        "skin"
      ],
      "dimension": 3,
      "description": "A post processing step with histogram-based GraphCut for Generic segmentation",
      "config": {
        "num_bins": 64,
        "lamda": 1,
        "sigma": 0.1
      }
    },
    "GMM+GraphCut": {
      "type": "scribbles",
      "labels": [
        "skin"
      ],
      "dimension": 3,
      "description": "A post processing step with GMM-based GraphCut for Generic segmentation",
      "config": {
        "num_mixtures": 20,
        "lamda": 5,
        "sigma": 0.5
      }
    }
  },
  "trainers": {
    "segmentation_skin": {
      "description": "Train Skin Segmentation Model",
      "config": {
        "name": "train_01",
        "pretrained": true,
        "device": "cuda",
        "max_epochs": 50,
        "early_stop_patience": -1,
        "val_split": 0.2,
        "train_batch_size": 1,
        "val_batch_size": 1,
        "multi_gpu": true,
        "gpus": "all",
        "dataset": [
          "CacheDataset",
          "PersistentDataset",
          "SmartCacheDataset",
          "Dataset"
        ],
        "dataloader": [
          "ThreadDataLoader",
          "DataLoader"
        ]
      }
    }
  },
  "strategies": {
    "random": {
      "description": "Random Strategy"
    },
    "first": {
      "description": "Get First Sample"
    }
  },
  "scoring": {},
  "train_stats": {
    "segmentation_skin": {
      "total_epochs": 50,
      "total_iterations": 27,
      "epoch": 50,
      "start_ts": 1656343332,
      "total_time": "0:07:20",
      "best_metric": 0.9623164534568787,
      "train": {
        "metrics": {
          "train_dice": 0.9760086536407471
        },
        "key_metric_name": "train_dice",
        "best_metric": 0.9857580661773682,
        "best_metric_epoch": 30
      },
      "eval": {
        "metrics": {
          "val_mean_dice": 0.9611228108406067
        },
        "key_metric_name": "val_mean_dice",
        "best_metric": 0.9623164534568787,
        "best_metric_epoch": 25
      }
    }
  },
  "datastore": {
    "total": 61,
    "completed": 38,
    "label_tags": {
      "final": 38
    }
  }
}

Yes, I am aware where of the path to the model .pt file. I have a trained model.

(Note that while the description may state that it's a pre-trained model, I just Ctrl+F and replaced 'spleen' with 'skin', so it's a fresh model.)

SachidanandAlle commented 2 years ago

Info says the model is available.. have you tried to restart slicer?

MathijsdeBoer commented 2 years ago

Yeah, I've restarted it several times throughout the day. As a random thought I had, I've gone back to an older slicer version I've got installed still (4.13.0-2022-04-24), the model does seem to show up there.

This probably indicates something is different between different Slicer versions?

SachidanandAlle commented 2 years ago

Once u have model listed in /info/ then its mostly a client issue for not showing up in the list.. Have u tried using client plugin in dev mode

MathijsdeBoer commented 2 years ago

I have not, however, both my Slicer 4.13.0 and 5.0.2 are running the same plugin that I directly pulled from this repo. The only difference between the two is the slicer version. When I enable dev mode, what would you want me to look for?

SachidanandAlle commented 2 years ago

i mean.. configure your plugin in development mode (uninstall earlier one).. based on the main branch of github.. https://github.com/Project-MONAI/MONAILabel/tree/main/plugins/slicer#install-plugin-in-developer-mode

MathijsdeBoer commented 2 years ago

I did install directly from your main branch right from the start. Switching on developer mode changes nothing of note? It just adds some additional options.

diazandr3s commented 2 years ago

Thanks for the detailed info, @MathijsdeBoer Here is a 30-seconds video showing how you can configure the plugin in dev mode Also, please try using the Slicer Preview Release instead of the stable release.

preview-release

Let us know how that goes

MathijsdeBoer commented 2 years ago

Yup, that's how I had installed the plugin on my end. We had a little issue with our hospital's network temporarily blocking Slicer's extension server, so I just cloned your repo and installed from there.

I downloaded 5.1.0, installed the plugin directly from the current version of this repo and the model name is now visible in the Auto Segmentation section. However, whenever I try to get the next sample, I get a Slicer error with the following details:

Slicer 5.1.0 Preview error:

Traceback (most recent call last):
  File "[snip]/MONAILabel/plugins/slicer/MONAILabel/MONAILabel.py", line 1236, in onNextSampleButton
    self.initSample(sample)
  File "[snip]/MONAILabel/plugins/slicer/MONAILabel/MONAILabel.py", line 1257, in initSample
    self.ui.embeddedSegmentEditorWidget.setMasterVolumeNode(self._volumeNode)
AttributeError: qMRMLSegmentEditorWidget has no attribute named 'setMasterVolumeNode'

Additionally, loading a patient for uploading to the server also does not trigger the master volume to update, so I can't run inference.

diazandr3s commented 2 years ago

Thanks for the update, @MathijsdeBoer Could you please share the server logs? It's difficult to know what's happening with the Slicer error.

MathijsdeBoer commented 2 years ago

Sure thing, this are the server logs up until I press the "Next Sample" Button in Slicer 5.1.0 and the error pops up:

(nnunetdocker-uHdzYLSm-py3.9) PS D:\HANARTH\nnUNetDocker> monailabel start_server --ap .\App\radiology\ --studies D:\HANARTH\MonaiDBVentriclesZurich\ --conf models segmentation_ventricles
Using PYTHONPATH=[snip]\AppData\Local\pypoetry\Cache\virtualenvs;
[2022-06-30 11:45:24,365] [28616] [MainThread] [INFO] (__main__:269) - USING:: app = D:\HANARTH\nnUNetDocker\App\radiology
[2022-06-30 11:45:24,365] [28616] [MainThread] [INFO] (__main__:269) - USING:: studies = D:\HANARTH\MonaiDBVentriclesZurich  
[2022-06-30 11:45:24,365] [28616] [MainThread] [INFO] (__main__:269) - USING:: verbose = INFO                                
[2022-06-30 11:45:24,365] [28616] [MainThread] [INFO] (__main__:269) - USING:: conf = [['models', 'segmentation_ventricles']]
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: host = 0.0.0.0                                
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: port = 8000                                   
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: uvicorn_app = monailabel.app:app              
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: ssl_keyfile = None                            
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: ssl_certfile = None                           
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: ssl_keyfile_password = None                   
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: ssl_ca_certs = None                           
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: workers = None                                
[2022-06-30 11:45:24,366] [28616] [MainThread] [INFO] (__main__:269) - USING:: limit_concurrency = None                      
[2022-06-30 11:45:24,367] [28616] [MainThread] [INFO] (__main__:269) - USING:: access_log = False                            
[2022-06-30 11:45:24,367] [28616] [MainThread] [INFO] (__main__:269) - USING:: log_config = None
[2022-06-30 11:45:24,367] [28616] [MainThread] [INFO] (__main__:269) - USING:: dryrun = False
[2022-06-30 11:45:24,367] [28616] [MainThread] [INFO] (__main__:269) - USING:: action = start_server
[2022-06-30 11:45:24,367] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_API_STR =
[2022-06-30 11:45:24,368] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel
[2022-06-30 11:45:24,368] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_APP_DIR =
[2022-06-30 11:45:24,368] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_STUDIES =
[2022-06-30 11:45:24,368] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_APP_CONF = '{}'
[2022-06-30 11:45:24,368] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True
[2022-06-30 11:45:24,368] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True
[2022-06-30 11:45:24,368] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True
[2022-06-30 11:45:24,369] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True
[2022-06-30 11:45:24,369] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME =
[2022-06-30 11:45:24,369] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD =
[2022-06-30 11:45:24,369] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH =
[2022-06-30 11:45:24,369] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX =
[2022-06-30 11:45:24,369] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX =
[2022-06-30 11:45:24,370] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX =
[2022-06-30 11:45:24,370] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False
[2022-06-30 11:45:24,370] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True
[2022-06-30 11:45:24,370] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = '["*.nii.gz", "*.nii", "*.nrrd", "*.jpg", "*.png", "*.tif", "*.svs", "*.xml"]'
[2022-06-30 11:45:24,370] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000
[2022-06-30 11:45:24,370] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = '[]'
[2022-06-30 11:45:24,370] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True
[2022-06-30 11:45:24,371] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH =
[2022-06-30 11:45:24,371] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600
[2022-06-30 11:45:24,371] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1
[2022-06-30 11:45:24,371] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600
[2022-06-30 11:45:24,371] [28616] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True
[2022-06-30 11:45:24,371] [28616] [MainThread] [INFO] (__main__:274) -
[2022-06-30 11:45:25,032] [28616] [MainThread] [INFO] (uvicorn.error:75) - Started server process [28616]
[2022-06-30 11:45:25,033] [28616] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup.
[2022-06-30 11:45:25,033] [28616] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: D:\HANARTH\nnUNetDocker\App\radiology; studies: D:\HANARTH\MonaiDBVentriclesZurich; conf: {'models': 'segmentation_v
entricles'}
[2022-06-30 11:45:25,064] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for MONAILabelApp Found: <class 'main.MyApp'>
[2022-06-30 11:45:25,173] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepedit.DeepEdit'>
[2022-06-30 11:45:25,174] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_2d.Deepgrow2D'>
[2022-06-30 11:45:25,175] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_3d.Deepgrow3D'>
[2022-06-30 11:45:25,176] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation.Segmentation'>
[2022-06-30 11:45:25,177] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_brain.SegmentationBrain'>
[2022-06-30 11:45:25,178] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_skin.SegmentationSkin'>
[2022-06-30 11:45:25,179] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_skull.SegmentationSkull'>
[2022-06-30 11:45:25,180] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_spleen.SegmentationSpleen'>
[2022-06-30 11:45:25,181] [28616] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_ventricles.SegmentationVentricles'>
[2022-06-30 11:45:25,182] [28616] [MainThread] [INFO] (main:83) - +++ Adding Model: segmentation_ventricles => lib.configs.segmentation_ventricles.SegmentationVentricles
[2022-06-30 11:45:25,290] [28616] [MainThread] [INFO] (lib.configs.segmentation_ventricles:71) - EPISTEMIC Enabled: 0; Samples: 5
[2022-06-30 11:45:25,290] [28616] [MainThread] [INFO] (lib.configs.segmentation_ventricles:75) - TTA Enabled: 0; Samples: 5
[2022-06-30 11:45:25,291] [28616] [MainThread] [INFO] (main:87) - +++ Using Models: ['segmentation_ventricles']
[2022-06-30 11:45:25,291] [28616] [MainThread] [INFO] (monailabel.interfaces.app:126) - Init Datastore for: D:\HANARTH\MonaiDBVentriclesZurich
[2022-06-30 11:45:25,292] [28616] [MainThread] [INFO] (monailabel.datastore.local:125) - Auto Reload: True; Extensions: ['*.nii.gz', '*.nii', '*.nrrd', '*.jpg', '*.png', '*.tif', '*.svs', '*.xml']
[2022-06-30 11:45:25,311] [28616] [MainThread] [INFO] (monailabel.datastore.local:540) - Invalidate count: 0
[2022-06-30 11:45:25,311] [28616] [MainThread] [INFO] (monailabel.datastore.local:145) - Start observing external modifications on datastore (AUTO RELOAD)
[2022-06-30 11:45:25,314] [28616] [MainThread] [INFO] (main:112) - +++ Adding Inferer:: segmentation_ventricles => <lib.infers.segmentation_ventricles.SegmentationVentricles object at 0x000002086E305A90>
[2022-06-30 11:45:25,314] [28616] [MainThread] [INFO] (main:161) - +++ Adding Trainer:: segmentation_ventricles => <lib.trainers.segmentation_ventricles.SegmentationVentricles object at 0x000002086E48B430>
[2022-06-30 11:45:25,315] [28616] [MainThread] [INFO] (monailabel.utils.sessions:51) - Session Path: [snip]\.cache\monailabel\sessions
[2022-06-30 11:45:25,315] [28616] [MainThread] [INFO] (monailabel.utils.sessions:52) - Session Expiry (max): 3600
[2022-06-30 11:45:25,315] [28616] [MainThread] [INFO] (monailabel.interfaces.app:429) - App Init - completed
[2022-06-30 11:45:25,316] [timeloop] [INFO] Starting Timeloop..
[2022-06-30 11:45:25,316] [28616] [MainThread] [INFO] (timeloop:60) - Starting Timeloop..
[2022-06-30 11:45:25,317] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x000002086E3EAF70>
[2022-06-30 11:45:25,317] [28616] [MainThread] [INFO] (timeloop:42) - Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x000002086E3EAF70>
[2022-06-30 11:45:25,317] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
[2022-06-30 11:45:25,317] [28616] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set
[2022-06-30 11:45:25,318] [28616] [MainThread] [INFO] (uvicorn.error:59) - Application startup complete.
[2022-06-30 11:45:25,318] [28616] [MainThread] [INFO] (uvicorn.error:206) - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
[2022-06-30 11:45:34,409] [28616] [MainThread] [INFO] (monailabel.endpoints.activelearning:42) - Active Learning Request: {'strategy': 'random', 'client_id': 'Mathijs de Boer'}
[2022-06-30 11:45:34,415] [28616] [MainThread] [INFO] (monailabel.tasks.activelearning.random:44) - Random: Images: ['Patient 118 Mare', 'Patient 119 Mare', 'Patient 120 Mare', 'Patient 121 Mare', 'Patient 122 Mare', 'Patient 123 Ma
re', 'Patient 124 Mare', 'Patient 125 Mare', 'Patient 126 Mare', 'Patient 127 Mare', 'Patient 128 Mare', 'Patient 129 Mare', 'Patient 130 Mare', 'Patient 131 Mare', 'Patient 132 Mare', 'Patient 133 Vince', 'Patient 134 Vince', 'Pati
ent 136 Vince', 'Patient 138 Jesse', 'Patient 139 Jesse', 'Patient 141 Vince', 'Patient 142 Jesse', 'Patient 143 Vince', 'Patient 144 Vince', 'Patient 145 Vince', 'Patient 243 Jesse']; Weight: [3631, 1656582334, 1656582334, 16565823
34, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 1656582334, 3618, 1656582334, 3638, 1656582334, 1656582334, 1656582334, 1656582334, 
1656582334, 1656582334]
[2022-06-30 11:45:34,415] [28616] [MainThread] [INFO] (monailabel.tasks.activelearning.random:45) - Random: Selected Image: Patient 121 Mare
[2022-06-30 11:45:34,419] [28616] [MainThread] [INFO] (monailabel.endpoints.activelearning:58) - Next sample: {'id': 'Patient 121 Mare', 'ts': 1656578692, 'name': 'Patient 121 Mare.nrrd', 'path': 'D:\\HANARTH\\MonaiDBVentriclesZuric
h\\Patient 121 Mare.nrrd'}
diazandr3s commented 2 years ago

This's a bit strange. I don't see any error in the logs. I was wondering whether the spacing in the volume names creates issues when loading in Slicer. What do you think, @SachidanandAlle?

@MathijsdeBoer can you please start the server with a single image in a folder without spacing in the names? Just to discard that's not the issue.

Let us know.

lassoan commented 2 years ago

Oh no, I've just noticed that as part of the DEI efforts, master volume has been renamed to reference volume. This would be OK, except we should have backward compatibility methods in place for several years to give time for extension developers to update. I'll fix the issue ASAP. In the meantime, the Slicer Stable Release should work.

diazandr3s commented 2 years ago

Thanks for letting us know, @lassoan

MathijsdeBoer commented 2 years ago

Do you still need me to run a server with a single patient without any spaces in the name?

Edit: Went and did it anyway:

(nnunetdocker-uHdzYLSm-py3.9) PS D:\HANARTH\nnUNetDocker> monailabel start_server --ap .\App\radiology\ --studies D:\HANARTH\test\ --conf models segmentation_ventricles
Using PYTHONPATH=[snip]\AppData\Local\pypoetry\Cache\virtualenvs;
[2022-06-30 13:56:17,717] [17772] [MainThread] [INFO] (__main__:269) - USING:: app = D:\HANARTH\nnUNetDocker\App\radiology
[2022-06-30 13:56:17,717] [17772] [MainThread] [INFO] (__main__:269) - USING:: studies = D:\HANARTH\test
[2022-06-30 13:56:17,717] [17772] [MainThread] [INFO] (__main__:269) - USING:: verbose = INFO
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: conf = [['models', 'segmentation_ventricles']]
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: host = 0.0.0.0
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: port = 8000
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: uvicorn_app = monailabel.app:app
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: ssl_keyfile = None
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: ssl_certfile = None
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: ssl_keyfile_password = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: ssl_ca_certs = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: workers = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: limit_concurrency = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: access_log = False
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: log_config = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: dryrun = False
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: action = start_server
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_API_STR =
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_APP_DIR =
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_STUDIES =
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_APP_CONF = '{}'
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME =
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD =
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH =
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX =
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX =
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX =
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = '["*.nii.gz", "*.nii", "*.nrrd", "*.jpg", "*.png", "*.tif", "*.svs", "*.xml"]'
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = '[]'
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH =
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:274) -
[2022-06-30 13:56:18,473] [17772] [MainThread] [INFO] (uvicorn.error:75) - Started server process [17772]
[2022-06-30 13:56:18,473] [17772] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup.
[2022-06-30 13:56:18,474] [17772] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: D:\HANARTH\nnUNetDocker\App\radiology; studies: D:\HANARTH\test; conf: {'models': 'segmentation_ventricles'}        
[2022-06-30 13:56:18,529] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for MONAILabelApp Found: <class 'main.MyApp'>
[2022-06-30 13:56:18,635] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepedit.DeepEdit'>
[2022-06-30 13:56:18,636] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_2d.Deepgrow2D'>
[2022-06-30 13:56:18,637] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_3d.Deepgrow3D'>
[2022-06-30 13:56:18,638] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation.Segmentation'>
[2022-06-30 13:56:18,639] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_brain.SegmentationBrain'>
[2022-06-30 13:56:18,640] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_skin.SegmentationSkin'>
[2022-06-30 13:56:18,641] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_skull.SegmentationSkull'>
[2022-06-30 13:56:18,642] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_spleen.SegmentationSpleen'>
[2022-06-30 13:56:18,643] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_ventricles.SegmentationVentricles'>
[2022-06-30 13:56:18,644] [17772] [MainThread] [INFO] (main:83) - +++ Adding Model: segmentation_ventricles => lib.configs.segmentation_ventricles.SegmentationVentricles
[2022-06-30 13:56:18,751] [17772] [MainThread] [INFO] (lib.configs.segmentation_ventricles:71) - EPISTEMIC Enabled: 0; Samples: 5
[2022-06-30 13:56:18,751] [17772] [MainThread] [INFO] (lib.configs.segmentation_ventricles:75) - TTA Enabled: 0; Samples: 5
[2022-06-30 13:56:18,752] [17772] [MainThread] [INFO] (main:87) - +++ Using Models: ['segmentation_ventricles']
[2022-06-30 13:56:18,752] [17772] [MainThread] [INFO] (monailabel.interfaces.app:126) - Init Datastore for: D:\HANARTH\test
[2022-06-30 13:56:18,753] [17772] [MainThread] [INFO] (monailabel.datastore.local:125) - Auto Reload: True; Extensions: ['*.nii.gz', '*.nii', '*.nrrd', '*.jpg', '*.png', '*.tif', '*.svs', '*.xml']
[2022-06-30 13:56:18,758] [17772] [MainThread] [INFO] (monailabel.datastore.local:557) - Adding New Image: Patient => Patient.nii.gz
[2022-06-30 13:56:18,761] [17772] [MainThread] [INFO] (monailabel.datastore.local:540) - Invalidate count: 1
[2022-06-30 13:56:18,763] [17772] [MainThread] [INFO] (monailabel.datastore.local:145) - Start observing external modifications on datastore (AUTO RELOAD)
[2022-06-30 13:56:18,765] [17772] [MainThread] [INFO] (main:112) - +++ Adding Inferer:: segmentation_ventricles => <lib.infers.segmentation_ventricles.SegmentationVentricles object at 0x000001716794C550>
[2022-06-30 13:56:18,766] [17772] [MainThread] [INFO] (main:161) - +++ Adding Trainer:: segmentation_ventricles => <lib.trainers.segmentation_ventricles.SegmentationVentricles object at 0x0000017167AA9910>
[2022-06-30 13:56:18,766] [17772] [MainThread] [INFO] (monailabel.utils.sessions:51) - Session Path: [snip]\.cache\monailabel\sessions
[2022-06-30 13:56:18,766] [17772] [MainThread] [INFO] (monailabel.utils.sessions:52) - Session Expiry (max): 3600
[2022-06-30 13:56:18,767] [17772] [MainThread] [INFO] (monailabel.interfaces.app:429) - App Init - completed
[2022-06-30 13:56:18,767] [timeloop] [INFO] Starting Timeloop..
[2022-06-30 13:56:18,767] [17772] [MainThread] [INFO] (timeloop:60) - Starting Timeloop..
[2022-06-30 13:56:18,768] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x0000017167AB21F0>
[2022-06-30 13:56:18,768] [17772] [MainThread] [INFO] (timeloop:42) - Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x0000017167AB21F0>
[2022-06-30 13:56:18,769] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
[2022-06-30 13:56:18,769] [17772] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set
[2022-06-30 13:56:18,769] [17772] [MainThread] [INFO] (uvicorn.error:59) - Application startup complete.
[2022-06-30 13:56:18,770] [17772] [MainThread] [INFO] (uvicorn.error:206) - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
[2022-06-30 13:56:25,761] [17772] [MainThread] [INFO] (monailabel.endpoints.activelearning:42) - Active Learning Request: {'strategy': 'random', 'client_id': 'Mathijs de Boer'}
[2022-06-30 13:56:25,762] [17772] [MainThread] [INFO] (monailabel.tasks.activelearning.random:44) - Random: Images: ['Patient']; Weight: [1656590185]
[2022-06-30 13:56:25,763] [17772] [MainThread] [INFO] (monailabel.tasks.activelearning.random:45) - Random: Selected Image: Patient
[2022-06-30 13:56:25,766] [17772] [MainThread] [INFO] (monailabel.endpoints.activelearning:58) - Next sample: {'id': 'Patient', 'ts': 1656590178, 'name': 'Patient.nii.gz', 'path': 'D:\\HANARTH\\test\\Patient.nii.gz'}
[2022-06-30 13:56:50,710] [17772] [MainThread] [INFO] (monailabel.endpoints.activelearning:42) - Active Learning Request: {'strategy': 'random', 'client_id': 'Mathijs de Boer'}
[2022-06-30 13:56:50,711] [17772] [MainThread] [INFO] (monailabel.tasks.activelearning.random:44) - Random: Images: ['Patient']; Weight: [25]
[2022-06-30 13:56:50,712] [17772] [MainThread] [INFO] (monailabel.tasks.activelearning.random:45) - Random: Selected Image: Patient
[2022-06-30 13:56:50,715] [17772] [MainThread] [INFO] (monailabel.endpoints.activelearning:58) - Next sample: {'id': 'Patient', 'ts': 1656590178, 'name': 'Patient.nii.gz', 'strategy': {'random': {'ts': 1656590210, 'client_id': 'Math
ijs de Boer'}}, 'path': 'D:\\HANARTH\\test\\Patient.nii.gz'}
diazandr3s commented 2 years ago

Do you still need me to run a server with a single patient without any spaces in the name?

Edit: Went and did it anyway:

(nnunetdocker-uHdzYLSm-py3.9) PS D:\HANARTH\nnUNetDocker> monailabel start_server --ap .\App\radiology\ --studies D:\HANARTH\test\ --conf models segmentation_ventricles
Using PYTHONPATH=[snip]\AppData\Local\pypoetry\Cache\virtualenvs;
[2022-06-30 13:56:17,717] [17772] [MainThread] [INFO] (__main__:269) - USING:: app = D:\HANARTH\nnUNetDocker\App\radiology
[2022-06-30 13:56:17,717] [17772] [MainThread] [INFO] (__main__:269) - USING:: studies = D:\HANARTH\test
[2022-06-30 13:56:17,717] [17772] [MainThread] [INFO] (__main__:269) - USING:: verbose = INFO
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: conf = [['models', 'segmentation_ventricles']]
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: host = 0.0.0.0
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: port = 8000
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: uvicorn_app = monailabel.app:app
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: ssl_keyfile = None
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: ssl_certfile = None
[2022-06-30 13:56:17,718] [17772] [MainThread] [INFO] (__main__:269) - USING:: ssl_keyfile_password = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: ssl_ca_certs = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: workers = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: limit_concurrency = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: access_log = False
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: log_config = None
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: dryrun = False
[2022-06-30 13:56:17,719] [17772] [MainThread] [INFO] (__main__:269) - USING:: action = start_server
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_API_STR =
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_APP_DIR =
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_STUDIES =
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_APP_CONF = '{}'
[2022-06-30 13:56:17,720] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME =
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD =
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH =
[2022-06-30 13:56:17,721] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX =
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX =
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX =
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = '["*.nii.gz", "*.nii", "*.nrrd", "*.jpg", "*.png", "*.tif", "*.svs", "*.xml"]'
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000
[2022-06-30 13:56:17,722] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = '[]'
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH =
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:273) - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True
[2022-06-30 13:56:17,723] [17772] [MainThread] [INFO] (__main__:274) -
[2022-06-30 13:56:18,473] [17772] [MainThread] [INFO] (uvicorn.error:75) - Started server process [17772]
[2022-06-30 13:56:18,473] [17772] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup.
[2022-06-30 13:56:18,474] [17772] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: D:\HANARTH\nnUNetDocker\App\radiology; studies: D:\HANARTH\test; conf: {'models': 'segmentation_ventricles'}        
[2022-06-30 13:56:18,529] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for MONAILabelApp Found: <class 'main.MyApp'>
[2022-06-30 13:56:18,635] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepedit.DeepEdit'>
[2022-06-30 13:56:18,636] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_2d.Deepgrow2D'>
[2022-06-30 13:56:18,637] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_3d.Deepgrow3D'>
[2022-06-30 13:56:18,638] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation.Segmentation'>
[2022-06-30 13:56:18,639] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_brain.SegmentationBrain'>
[2022-06-30 13:56:18,640] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_skin.SegmentationSkin'>
[2022-06-30 13:56:18,641] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_skull.SegmentationSkull'>
[2022-06-30 13:56:18,642] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_spleen.SegmentationSpleen'>
[2022-06-30 13:56:18,643] [17772] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_ventricles.SegmentationVentricles'>
[2022-06-30 13:56:18,644] [17772] [MainThread] [INFO] (main:83) - +++ Adding Model: segmentation_ventricles => lib.configs.segmentation_ventricles.SegmentationVentricles
[2022-06-30 13:56:18,751] [17772] [MainThread] [INFO] (lib.configs.segmentation_ventricles:71) - EPISTEMIC Enabled: 0; Samples: 5
[2022-06-30 13:56:18,751] [17772] [MainThread] [INFO] (lib.configs.segmentation_ventricles:75) - TTA Enabled: 0; Samples: 5
[2022-06-30 13:56:18,752] [17772] [MainThread] [INFO] (main:87) - +++ Using Models: ['segmentation_ventricles']
[2022-06-30 13:56:18,752] [17772] [MainThread] [INFO] (monailabel.interfaces.app:126) - Init Datastore for: D:\HANARTH\test
[2022-06-30 13:56:18,753] [17772] [MainThread] [INFO] (monailabel.datastore.local:125) - Auto Reload: True; Extensions: ['*.nii.gz', '*.nii', '*.nrrd', '*.jpg', '*.png', '*.tif', '*.svs', '*.xml']
[2022-06-30 13:56:18,758] [17772] [MainThread] [INFO] (monailabel.datastore.local:557) - Adding New Image: Patient => Patient.nii.gz
[2022-06-30 13:56:18,761] [17772] [MainThread] [INFO] (monailabel.datastore.local:540) - Invalidate count: 1
[2022-06-30 13:56:18,763] [17772] [MainThread] [INFO] (monailabel.datastore.local:145) - Start observing external modifications on datastore (AUTO RELOAD)
[2022-06-30 13:56:18,765] [17772] [MainThread] [INFO] (main:112) - +++ Adding Inferer:: segmentation_ventricles => <lib.infers.segmentation_ventricles.SegmentationVentricles object at 0x000001716794C550>
[2022-06-30 13:56:18,766] [17772] [MainThread] [INFO] (main:161) - +++ Adding Trainer:: segmentation_ventricles => <lib.trainers.segmentation_ventricles.SegmentationVentricles object at 0x0000017167AA9910>
[2022-06-30 13:56:18,766] [17772] [MainThread] [INFO] (monailabel.utils.sessions:51) - Session Path: [snip]\.cache\monailabel\sessions
[2022-06-30 13:56:18,766] [17772] [MainThread] [INFO] (monailabel.utils.sessions:52) - Session Expiry (max): 3600
[2022-06-30 13:56:18,767] [17772] [MainThread] [INFO] (monailabel.interfaces.app:429) - App Init - completed
[2022-06-30 13:56:18,767] [timeloop] [INFO] Starting Timeloop..
[2022-06-30 13:56:18,767] [17772] [MainThread] [INFO] (timeloop:60) - Starting Timeloop..
[2022-06-30 13:56:18,768] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x0000017167AB21F0>
[2022-06-30 13:56:18,768] [17772] [MainThread] [INFO] (timeloop:42) - Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x0000017167AB21F0>
[2022-06-30 13:56:18,769] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
[2022-06-30 13:56:18,769] [17772] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set
[2022-06-30 13:56:18,769] [17772] [MainThread] [INFO] (uvicorn.error:59) - Application startup complete.
[2022-06-30 13:56:18,770] [17772] [MainThread] [INFO] (uvicorn.error:206) - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
[2022-06-30 13:56:25,761] [17772] [MainThread] [INFO] (monailabel.endpoints.activelearning:42) - Active Learning Request: {'strategy': 'random', 'client_id': 'Mathijs de Boer'}
[2022-06-30 13:56:25,762] [17772] [MainThread] [INFO] (monailabel.tasks.activelearning.random:44) - Random: Images: ['Patient']; Weight: [1656590185]
[2022-06-30 13:56:25,763] [17772] [MainThread] [INFO] (monailabel.tasks.activelearning.random:45) - Random: Selected Image: Patient
[2022-06-30 13:56:25,766] [17772] [MainThread] [INFO] (monailabel.endpoints.activelearning:58) - Next sample: {'id': 'Patient', 'ts': 1656590178, 'name': 'Patient.nii.gz', 'path': 'D:\\HANARTH\\test\\Patient.nii.gz'}
[2022-06-30 13:56:50,710] [17772] [MainThread] [INFO] (monailabel.endpoints.activelearning:42) - Active Learning Request: {'strategy': 'random', 'client_id': 'Mathijs de Boer'}
[2022-06-30 13:56:50,711] [17772] [MainThread] [INFO] (monailabel.tasks.activelearning.random:44) - Random: Images: ['Patient']; Weight: [25]
[2022-06-30 13:56:50,712] [17772] [MainThread] [INFO] (monailabel.tasks.activelearning.random:45) - Random: Selected Image: Patient
[2022-06-30 13:56:50,715] [17772] [MainThread] [INFO] (monailabel.endpoints.activelearning:58) - Next sample: {'id': 'Patient', 'ts': 1656590178, 'name': 'Patient.nii.gz', 'strategy': {'random': {'ts': 1656590210, 'client_id': 'Math
ijs de Boer'}}, 'path': 'D:\\HANARTH\\test\\Patient.nii.gz'}

facing the same error in Slicer? If yes, please try one of these versions according to your OS:

Backup 3D Slicer:

For Linux: https://emckclac-my.sharepoint.com/:u:/g/personal/k2039747_kcl_ac_uk/EdyJYG4a8AhAhGaycnsqQwQBBKK1uaRDgsbX9vwc0E0ruw?e=sU0g56

For Windows: https://emckclac-my.sharepoint.com/:u:/g/personal/k2039747_kcl_ac_uk/EeKDsfduvcZOk6FEyVCZJ4IBfrIZDeuaFBo87kAecxeXmg?e=rRMxPb

For MACOS: https://emckclac-my.sharepoint.com/:u:/g/personal/k2039747_kcl_ac_uk/EV6rTi4ad7lDi0gQ-GgPKL4BF3eEGEsE1ZYzEcL-UfKt-Q?e=jA8ghk

MathijsdeBoer commented 2 years ago

I mean, I can fall back to the 4.13 install I still have on my system, that one seems to work. I was just wondering if you needed more information to get your plugin to work on the 5.x versions.

lassoan commented 2 years ago

Slice 5.0.x should work, latest Slicer 5.1.x will work from tomorrow.

che85 commented 2 years ago

We have been having these issues on Windows with MONAILabel, where our model does not show up in the Auto Segmentation dropdown. In the Active Learning dropdown, the model shows up.

@Amins3 Could you please confirm the 3D Slicer versions this is happening?

SachidanandAlle commented 2 years ago

http://127.0.0.1:8000/info

Can you post the result for this..? Have you loaded any image/volume into slicer? (it could be from Next Sample or Slicer File/Open)

Amins3 commented 2 years ago

@sulentica @hannahdewey and I tried on the following versions of Slicer and ran into that issue:

  1. Slicer Stable Release 5.0.2 on Windows and Mac
  2. Slicer Stable Release 5.0.3 on Windows
  3. Slicer Preview Release 5.1.0.2022-7-22 on Windows

It works on my Mac 3D Slicer 5.0.3.

che85 commented 2 years ago
{
   "name":"MONAILabel - Radiology",
   "description":"DeepLearning models for radiology",
   "version":"2.0",
   "labels":[
      "model"
   ],
   "models":{
      "segmentation_organ":{
         "type":"segmentation",
         "labels":[
            "organ"
         ],
         "dimension":3,
         "description":"A pre-trained model for volumetric (3D) segmentation of the organ from CT image",
         "config":{

         }
      }
   },
   "trainers":{
      "segmentation_organ":{
         "description":"Train organ Segmentation Model",
         "config":{
            "name":"train_01",
            "pretrained":true,
            "device":"cuda",
            "max_epochs":200,
            "early_stop_patience":40,
            "val_split":0.2,
            "train_batch_size":8,
            "val_batch_size":1,
            "multi_gpu":true,
            "gpus":"all",
            "dataset":[
               "CacheDataset",
               "PersistentDataset",
               "SmartCacheDataset",
               "Dataset"
            ],
            "dataloader":[
               "ThreadDataLoader",
               "DataLoader"
            ]
         }
      }
   },
   "strategies":{
      "random":{
         "description":"Random Strategy"
      },
      "first":{
         "description":"Get First Sample"
      }
   },
   "scoring":{

   },
   "train_stats":{
      "segmentation_organ":{
         "total_epochs":200,
         "total_iterations":2,
         "epoch":200,
         "start_ts":1653541331,
         "total_time":"0:49:32",
         "best_metric":0.8887168765068054,
         "train":{
            "metrics":{
               "train_dice":0.9372642040252686
            },
            "key_metric_name":"train_dice",
            "best_metric":0.9393721222877502,
            "best_metric_epoch":178
         },
         "eval":{
            "metrics":{
               "val_mean_dice":0.8785920143127441
            },
            "key_metric_name":"val_mean_dice",
            "best_metric":0.8887168765068054,
            "best_metric_epoch":169
         }
      }
   },
   "datastore":{
      "total":36,
      "completed":29,
      "label_tags":{
         "final":29
      }
   }
}

Loading a volume doesn't change anything.

rbumm commented 2 years ago

After having the same problem on my laptop (Auto segmentation -> model dropdown menu empty and "run" greyed out) I was able to solve the issue by:

image

image

che85 commented 2 years ago

It would still be interesting to know what the reason for this issue is. Is there anything cashed by MONIA Label, that we could delete instead of reinstalling everything?

rbumm commented 2 years ago

Agree, but it is difficult to find out. By installing 5.0.3 we have an empty extension "directory" and need to collect MonaiLabel (and other extensions) again from the extension manager. In that step, we probably get the latest MonaiLabel extension sources. It looks as if in the previous version (with the error that you and I saw) the list of available ML models was not correctly displayed by the extension, thus, the MonaiLabel auto segmentation drop-down field remained empty. I did not observe a crash of any kind. Probably there was just a necessary update in 3D Slicer, otherwise, it would not have been necessary to publish a new stable.  

Did you see a crash and - is your problem solved now?

che85 commented 2 years ago

It seems that I found the reason for this happening in our case:

We implemented https://github.com/JolleyLab/DeepHeart which is a SegmentEditorEffect using UI components of MONAILabel (same names) in a new .ui file.

TLDR;

Loading a UI that has other user interfaces embedded which have same UI component names can cause issues when using slicer.util.childWidgetVariables. For example:

Our Case

If DeepHeart is not added to Slicer, there are no issues with MONAILabel UI.

The following lines are causing the problem.

https://github.com/Project-MONAI/MONAILabel/blob/2029f05620dcc472b052adf483299165be9665df/plugins/slicer/MONAILabel/MONAILabel.py#L258-L260

MONAILabel embeds the SegmentEditor, which in return also includes the SegmentEditorEffect DeepHeart (if loaded) with the same named user interface components. A list of new variables of self.ui is given below.

Now, when loading the MONAILabel user interface and adding child widget variables, it's overwriting the ones of its own user interface with the ones of the DeepHeart user interface.

@lassoan I will change the namings, but I think it's important to take note of that within Slicer. Having a check if the variable was already set and at least providing a warning that a UI component has the same name. This is critical when having modules embedding other user interfaces.

``` {'': TranslationWatcher (QFormInternal::TranslationWatcher at: 0x600000049a20), 'ActionDeleteAll': QAction(0x600000993e10 text="Delete all control points" toolTip="Delete all control points in the list" menuRole=TextHeuristicRole visible=true) , 'ActionFixedNumberOfControlPoints': QAction(0x600000993ea0 text="Control point number locked" toolTip="Toggle control point number lock. If locked then it is not possible to add or delete control points. Instead of deleting, position control points can be unset." menuRole=TextHeuristicRole visible=true) , 'ActionLocked': QAction(0x600000993e80 text="Locked" toolTip="Toggle control point positions lock" menuRole=TextHeuristicRole visible=true) , 'ActionPlacePersistentPoint': QAction(0x600000993e00 text="Place multiple control points" toolTip="Place multiple control points" checked=false menuRole=TextHeuristicRole visible=true) , 'ActionUnsetAll': QAction(0x600000993e40 text="Clear all control point positions" toolTip="Clear the position of all control points in the list (the control points will not be deleted)." menuRole=TextHeuristicRole visible=false) , 'ActionUnsetLast': QAction(0x600000993e20 text="Clear last control point position" toolTip="Clear the position of the last control point placed (the control point will not be deleted)." menuRole=TextHeuristicRole visible=false) , 'ActionVisibility': QAction(0x600000993e60 text="Visibility" toolTip="Toggle markup visibility" menuRole=TextHeuristicRole visible=true) , 'AddSegmentButton': QPushButton(0x600001a5a9a0, name="AddSegmentButton") , 'ColorButton': ctkColorPickerButton(0x60000159f700, name="ColorButton") , 'DeepHeart': QToolButton(0x600001ba7f90, name="DeepHeart") , 'DeleteButton': QToolButton(0x600001ba0480, name="DeleteButton") , 'DeleteMenu': QMenu(0x600001ba0120, name="DeleteMenu") , 'Draw': QToolButton(0x600001a4f600, name="Draw") , 'EffectHelpBrowser': ctkFittedTextBrowser(0x6000015b90c0, name="EffectHelpBrowser") , 'EffectsGroupBox': QFrame(0x600001a5b330, name="EffectsGroupBox") , 'EffectsOptionsFrame': QFrame(0x600001a45770, name="EffectsOptionsFrame") , 'Erase': QToolButton(0x600001a4d920, name="Erase") , 'Fill between slices': QToolButton(0x600001a4f780, name="Fill between slices") , 'FilterBar': QWidget(0x600001a441e0, name="FilterBar") , 'FilterLineEdit': ctkSearchBox(0x6000015b81c0, name="FilterLineEdit") , 'Form': ctkExpandableWidget(0x6000015bfe00, name="Form") , 'GridLayout': QGridLayout (QGridLayout at: 0x60000019dee0), 'Grow from seeds': QToolButton(0x600001a48540, name="Grow from seeds") , 'Hollow': QToolButton(0x600001a49a70, name="Hollow") , 'Islands': QToolButton(0x600001a4a6d0, name="Islands") , 'Level tracing': QToolButton(0x600001a4afd0, name="Level tracing") , 'Logical operators': QToolButton(0x600001a4b360, name="Logical operators") , 'MONAILabel': qMRMLWidget(0x6000015bd740, name="MONAILabel") , 'Margin': QToolButton(0x600001bb5650, name="Margin") , 'Mask volume': QToolButton(0x600001bb6250, name="Mask volume") , 'MaskModeComboBox': QComboBox(0x600001a45920, name="MaskModeComboBox") , 'MaskModeLabel': QLabel(0x600001a458c0, name="MaskModeLabel") , 'MaskingGroupBox': ctkCollapsibleGroupBox(0x6000015b86c0, name="MaskingGroupBox") , 'MasterVolumeIntensityMaskCheckBox': ctkCheckBox(0x6000015b9340, name="MasterVolumeIntensityMaskCheckBox") , 'MasterVolumeIntensityMaskRangeLabel': QLabel(0x600001a45d40, name="MasterVolumeIntensityMaskRangeLabel") , 'MasterVolumeIntensityMaskRangeWidget': ctkRangeWidget(0x6000015b93c0, name="MasterVolumeIntensityMaskRangeWidget") , 'MasterVolumeNodeComboBox': qMRMLNodeComboBox(0x6000015bea40, name="MasterVolumeNodeComboBox") , 'MasterVolumeNodeLabel': QLabel(0x600001a59350, name="MasterVolumeNodeLabel") , 'MaximumSpinBox': ctkDoubleSpinBox(0x60000159c100, name="MaximumSpinBox") , 'MinimumSpinBox': ctkDoubleSpinBox(0x600001593ec0, name="MinimumSpinBox") , 'MoreButton': QToolButton(0x600001ba1380, name="MoreButton") , 'NULL': QToolButton(0x600001a47210, name="NULL") , 'NodeSelectorLayout': QGridLayout (QGridLayout at: 0x600000058600), 'OptionsGroupBox': QGroupBox(0x600001a44f60, name="OptionsGroupBox") , 'OverwriteModeComboBox': QComboBox(0x600001a46550, name="OverwriteModeComboBox") , 'OverwriteModeLabel': QLabel(0x600001a464f0, name="OverwriteModeLabel") , 'Paint': QToolButton(0x600001a4cab0, name="Paint") , 'PlaceButton': QToolButton(0x600001ba07b0, name="PlaceButton") , 'PlaceMenu': QMenu(0x600001ba0b10, name="PlaceMenu") , 'RedoButton': QToolButton(0x600001a5b4e0, name="RedoButton") , 'RemoveSegmentButton': QPushButton(0x600001a5ab80, name="RemoveSegmentButton") , 'Scissors': QToolButton(0x600001a4e790, name="Scissors") , 'SegmentActionsLayout': QHBoxLayout (QHBoxLayout at: 0x600000066420), 'SegmentEditorDeepHeart': QWidget(0x600001ba1dd0, name="SegmentEditorDeepHeart") , 'SegmentEditorFillBetweenSlicesEffectApply': QPushButton(0x6000015ad4c0, name="SegmentEditorFillBetweenSlicesEffectApply") , 'SegmentEditorFillBetweenSlicesEffectCancel': QPushButton(0x6000015ad480, name="SegmentEditorFillBetweenSlicesEffectCancel") , 'SegmentEditorFillBetweenSlicesEffectPreview': QPushButton(0x6000015ace00, name="SegmentEditorFillBetweenSlicesEffectPreview") , 'SegmentEditorGrowFromSeedsEffectApply': QPushButton(0x6000015adcc0, name="SegmentEditorGrowFromSeedsEffectApply") , 'SegmentEditorGrowFromSeedsEffectCancel': QPushButton(0x6000015adc80, name="SegmentEditorGrowFromSeedsEffectCancel") , 'SegmentEditorGrowFromSeedsEffectPreview': QPushButton(0x6000015ad600, name="SegmentEditorGrowFromSeedsEffectPreview") , 'SegmentEditorHollowEffectApply': QPushButton(0x6000015aea00, name="SegmentEditorHollowEffectApply") , 'SegmentEditorHollowEffectApplyToAllVisibleSegments': QCheckBox(0x6000015ae980, name="SegmentEditorHollowEffectApplyToAllVisibleSegments") , 'SegmentEditorIslandsEffectApply': QPushButton(0x6000015af180, name="SegmentEditorIslandsEffectApply") , 'SegmentEditorLogicalEffectApply': QPushButton(0x6000015af680, name="SegmentEditorLogicalEffectApply") , 'SegmentEditorLogicalEffectBypassMasking': QCheckBox(0x6000015af640, name="SegmentEditorLogicalEffectBypassMasking") , 'SegmentEditorMarginEffectApply': QPushButton(0x6000015a9400, name="SegmentEditorMarginEffectApply") , 'SegmentEditorMarginEffectApplyToAllVisibleSegments': QCheckBox(0x6000015a9380, name="SegmentEditorMarginEffectApplyToAllVisibleSegments") , 'SegmentEditorMaskVolumeEffectApply': QPushButton(0x6000015922c0, name="SegmentEditorMaskVolumeEffectApply") , 'SegmentEditorSmoothingEffectApply': QPushButton(0x600001593a40, name="SegmentEditorSmoothingEffectApply") , 'SegmentEditorSmoothingEffectApplyToAllVisibleSegments': QCheckBox(0x600001593980, name="SegmentEditorSmoothingEffectApplyToAllVisibleSegments") , 'SegmentEditorThresholdEffectApply': QPushButton(0x60000159e280, name="SegmentEditorThresholdEffectApply") , 'SegmentationNodeComboBox': qMRMLNodeComboBox(0x6000015bf080, name="SegmentationNodeComboBox") , 'SegmentationNodeLabel': QLabel(0x600001a59d40, name="SegmentationNodeLabel") , 'SegmentationNodeSelectorLayout': QHBoxLayout (QHBoxLayout at: 0x60000006b6c0), 'SegmentsTable': QTableView(0x600001a5b870, name="SegmentsTable") , 'SegmentsTableMessageLabel': QLabel(0x600001a5b840, name="SegmentsTableMessageLabel") , 'SegmentsTableView': qMRMLSegmentsTableView(0x60000ae8f7e0, name="SegmentsTableView") , 'Show3DButton': qMRMLSegmentationShow3DButton(0x60000ae8a2e0, name="Show3DButton") , 'ShowCompletedButton': QPushButton(0x600001a44b70, name="ShowCompletedButton") , 'ShowFlaggedButton': QPushButton(0x600001a44630, name="ShowFlaggedButton") , 'ShowInProgressButton': QPushButton(0x600001a44d80, name="ShowInProgressButton") , 'ShowNotStartedButton': QPushButton(0x600001a446f0, name="ShowNotStartedButton") , 'SliceRotateWarningButton': QToolButton(0x600001a5a8b0, name="SliceRotateWarningButton") , 'Slider': ctkDoubleSlider(0x6000015bf7c0, name="Slider") , 'Smoothing': QToolButton(0x600001bbab80, name="Smoothing") , 'SpecifyGeometryButton': QToolButton(0x600001a59dd0, name="SpecifyGeometryButton") , 'SpinBox': ctkDoubleSpinBox(0x6000015bf800, name="SpinBox") , 'SwitchToSegmentationsButton': QToolButton(0x600001a5b240, name="SwitchToSegmentationsButton") , 'Threshold': QToolButton(0x600001ba4ed0, name="Threshold") , 'UndoButton': QToolButton(0x600001a5b420, name="UndoButton") , 'UndoRedoGroupBox': QFrame(0x600001a5b390, name="UndoRedoGroupBox") , 'UndoRedoLayout': QGridLayout (QGridLayout at: 0x600000078660), 'accuracyProgressBar': QProgressBar(0x600001a584e0, name="accuracyProgressBar") , 'aclCollapsibleButton': ctkCollapsibleButton(0x6000015bdf40, name="aclCollapsibleButton") , 'activeLearningProgressBar': QProgressBar(0x600001a58270, name="activeLearningProgressBar") , 'appComboBox': QComboBox(0x600001a69200, name="appComboBox") , 'applyToAllVisibleSegmentsCheckBox': QCheckBox(0x600001a4f450, name="applyToAllVisibleSegmentsCheckBox") , 'brush3dCheckbox': QCheckBox(0x600001bace40, name="brush3dCheckbox") , 'brushSizeSlider': ctkSliderWidget(0x600001598540, name="brushSizeSlider") , 'configTable': QTableWidget(0x600001a6bc00, name="configTable") , 'ctkRangeWidget': ctkRangeWidget(0x600001593dc0, name="ctkRangeWidget") , 'ctkSliderWidget': ctkSliderWidget(0x6000015bf780, name="ctkSliderWidget") , 'deepgrowCollapsibleButton': ctkCollapsibleButton(0x60000159eac0, name="deepgrowCollapsibleButton") , 'deepgrowModelSelector': QComboBox(0x600001ba0ed0, name="deepgrowModelSelector") , 'dgLabelBackground': QLabel(0x600001ba23d0, name="dgLabelBackground") , 'dgLabelForeground': QLabel(0x600001ba0cc0, name="dgLabelForeground") , 'dgNegativeControlPointPlacementWidget': qSlicerMarkupsPlaceWidget(0x600002317640, name="dgNegativeControlPointPlacementWidget") , 'dgPositiveControlPointPlacementWidget': qSlicerMarkupsPlaceWidget(0x600002317870, name="dgPositiveControlPointPlacementWidget") , 'dgUpdateButton': QPushButton(0x600001ba0f30, name="dgUpdateButton") , 'dgUpdateCheckBox': QCheckBox(0x600001bac570, name="dgUpdateCheckBox") , 'embeddedSegmentEditorWidget': qMRMLSegmentEditorWidget(0x60000ae8c720, name="embeddedSegmentEditorWidget") , 'eraseScribblesButton': QPushButton(0x600001bac810, name="eraseScribblesButton") , 'fetchServerInfoButton': QPushButton(0x600001a69230, name="fetchServerInfoButton") , 'formLayout': QFormLayout (QFormLayout at: 0x6000001b52c0), 'freezeUpdateCheckBox': QCheckBox(0x600001ba0300, name="freezeUpdateCheckBox") , 'gridLayout': QGridLayout (QGridLayout at: 0x60000006f6a0), 'gridLayout_2': QGridLayout (QGridLayout at: 0x6000000586e0), 'gridLayout_3': QGridLayout (QGridLayout at: 0x60000004a840), 'gridLayout_4': QGridLayout (QGridLayout at: 0x6000001812e0), 'gridLayout_5': QGridLayout (QGridLayout at: 0x60000004b8e0), 'gridLayout_7': QGridLayout (QGridLayout at: 0x6000001813e0), 'gridLayout_8': QGridLayout (QGridLayout at: 0x600000181480), 'hboxLayout': QHBoxLayout (QHBoxLayout at: 0x60000007fc60), 'horizontalLayout': QHBoxLayout (QHBoxLayout at: 0x600000078d60), 'horizontalLayout_2': QHBoxLayout (QHBoxLayout at: 0x6000001878c0), 'horizontalLayout_3': QHBoxLayout (QHBoxLayout at: 0x600000187520), 'horizontalLayout_4': QHBoxLayout (QHBoxLayout at: 0x600000182740), 'horizontalLayout_5': QHBoxLayout (QHBoxLayout at: 0x60000004bdc0), 'importLabelButton': QPushButton(0x600001bae670, name="importLabelButton") , 'inputSelector': ctkComboBox(0x6000015bdb80, name="inputSelector") , 'label': QLabel(0x600001a6b8d0, name="label") , 'labelComboBox': QComboBox(0x600001ba0db0, name="labelComboBox") , 'labelPathLineEdit': ctkPathLineEdit(0x6000015992c0, name="labelPathLineEdit") , 'label_10': QLabel(0x600001a585d0, name="label_10") , 'label_11': QLabel(0x600001a584b0, name="label_11") , 'label_12': QLabel(0x600001ba27c0, name="label_12") , 'label_13': QLabel(0x600001bacf90, name="label_13") , 'label_2': QLabel(0x600001baced0, name="label_2") , 'label_3': QLabel(0x600001a691a0, name="label_3") , 'label_4': QLabel(0x600001a6b720, name="label_4") , 'label_5': QLabel(0x600001ba1140, name="label_5") , 'label_6': QLabel(0x600001ba1680, name="label_6") , 'label_7': QLabel(0x600001a58990, name="label_7") , 'label_8': QLabel(0x600001ba0f90, name="label_8") , 'label_9': QLabel(0x600001a58390, name="label_9") , 'moreMenu': QMenu(0x600001ba2430, name="moreMenu") , 'nextSampleButton': QPushButton(0x600001a58960, name="nextSampleButton") , 'optionsCollapsibleButton': ctkCollapsibleButton(0x6000015bd700, name="optionsCollapsibleButton") , 'paintScribblesButton': QPushButton(0x600001bac750, name="paintScribblesButton") , 'progressBar': QProgressBar(0x600001ba2fa0, name="progressBar") , 'qMRMLSegmentsTableView': qMRMLSegmentsTableView(0x60000aed4540, name="qMRMLSegmentsTableView") , 'qt_scrollarea_hcontainer': QWidget(0x600002b067b0, name="qt_scrollarea_hcontainer") , 'qt_scrollarea_vcontainer': QWidget(0x600002b06850, name="qt_scrollarea_vcontainer") , 'qt_scrollarea_viewport': QWidget(0x600001a6b510, name="qt_scrollarea_viewport") , 'qt_spinbox_lineedit': QLineEdit(0x600001a5aac0, name="qt_spinbox_lineedit") , 'qt_spinboxvalidator': QValidator (QValidator at: 0x60000007dce0), 'saveLabelButton': QPushButton(0x600001a588a0, name="saveLabelButton") , 'scribLabelComboBox': QComboBox(0x600001bad2c0, name="scribLabelComboBox") , 'scribblesCollapsibleButton': ctkCollapsibleButton(0x600001598180, name="scribblesCollapsibleButton") , 'scribblesMethodLabel': QLabel(0x600001bad140, name="scribblesMethodLabel") , 'scribblesMethodSelector': QComboBox(0x600001bacf00, name="scribblesMethodSelector") , 'scribblesPlaceWidget': qSlicerMarkupsPlaceWidget(0x600002316ed0, name="scribblesPlaceWidget") , 'scribblesROILabel': QLabel(0x600001bad410, name="scribblesROILabel") , 'scribblesSelector': QComboBox(0x600001bad110, name="scribblesSelector") , 'seCollapsibleButton': ctkCollapsibleButton(0x6000015be3c0, name="seCollapsibleButton") , 'segmentationButton': QPushButton(0x600001ba26d0, name="segmentationButton") , 'segmentationCollapsibleButton': ctkCollapsibleButton(0x60000159edc0, name="segmentationCollapsibleButton") , 'segmentationModelSelector': QComboBox(0x600001ba2dc0, name="segmentationModelSelector") , 'serverComboBox': QComboBox(0x600001a69080, name="serverComboBox") , 'serverSettings': QGridLayout (QGridLayout at: 0x600000049aa0), 'slicerSpacingManualMode': QMenu(0x600001a5afd0, name="slicerSpacingManualMode") , 'statusLabel': QPlainTextEdit(0x600001ba3150, name="statusLabel") , 'stopTrainingButton': QPushButton(0x600001a58780, name="stopTrainingButton") , 'strategyBox': QComboBox(0x600001a58ae0, name="strategyBox") , 'toolsCollapsibleButton': ctkCollapsibleButton(0x600001599180, name="toolsCollapsibleButton") , 'trainWidget': QWidget(0x600001a58300, name="trainWidget") , 'trainerBox': QComboBox(0x600001a58630, name="trainerBox") , 'trainingButton': QPushButton(0x600001a58720, name="trainingButton") , 'trainingProgressBar': QProgressBar(0x600001a583c0, name="trainingProgressBar") , 'updateScribblesButton': QPushButton(0x600001bac6f0, name="updateScribblesButton") , 'uploadImageButton': QPushButton(0x600001a6ba50, name="uploadImageButton") , 'valveSelectionFrame': QFrame(0x600001ba35d0, name="valveSelectionFrame") , 'verticalLayout': QVBoxLayout (QVBoxLayout at: 0x600000049a60), 'verticalLayout_2': QVBoxLayout (QVBoxLayout at: 0x6000000589c0), 'verticalLayout_3': QVBoxLayout (QVBoxLayout at: 0x6000000783e0), 'verticalLayout_4': QVBoxLayout (QVBoxLayout at: 0x6000001b4ce0)} ```
lassoan commented 2 years ago

Having a check if the variable was already set and at least providing a warning that a UI component has the same name

I agree. Would you mind submitting a pull request with a proposed change (somewhere around here). You could test it right away if it can detect the name clash in your use case.

SachidanandAlle commented 1 year ago

I guess we can close this issue.. If still have problem, feel free to reopen the same