Closed MathijsdeBoer closed 1 year 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
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.)
Info says the model is available.. have you tried to restart slicer?
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?
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
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?
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
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.
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.
Let us know how that goes
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.
Thanks for the update, @MathijsdeBoer Could you please share the server logs? It's difficult to know what's happening with the Slicer error.
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'}
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.
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.
Thanks for letting us know, @lassoan
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'}
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:
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.
Slice 5.0.x should work, latest Slicer 5.1.x will work from tomorrow.
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?
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)
@sulentica @hannahdewey and I tried on the following versions of Slicer and ran into that issue:
It works on my Mac 3D Slicer 5.0.3.
{
"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.
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:
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?
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?
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.
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:
runButton
in its user interface but also embeds another user interface that has a button named runButton
as well. When using slicer.util.childWidgetVariables
, it creates a runButton
variable for the first found button but when the second runButton is found, that variable will be overridden with the second runButton instance.If DeepHeart
is not added to Slicer, there are no issues with MONAILabel UI.
The following lines are causing the problem.
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.
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.
I guess we can close this issue.. If still have problem, feel free to reopen the same
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:
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
Environment
Ensuring you use the relevant python executable, please paste the output of:
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.