Using QuPath with MonaiLabel Pathology sample app yields 500 error
See original GitHub issueFollowing the tutorial, on the sample app pathology github README file does not work properly. deepedit_nuclei does not work when the option from the plugin menu is selected. (MonaiLabel > Annotations).
The console output on the MonaiLabel server is:
[2022-11-10 09:53:21,202] [431] [MainThread] [INFO] (monailabel.interfaces.utils.transform:27) - Data key: description = A pre-trained interaction/deepedit model for Pathology [2022-11-10 09:53:21,202] [431] [MainThread] [INFO] (monailabel.interfaces.utils.transform:27) - Data key: save_label = False [2022-11-10 09:53:21,202] [431] [MainThread] [INFO] (monailabel.interfaces.utils.transform:38) - ****************************************************************************** [2022-11-10 09:53:21,203] [431] [MainThread] [INFO] (monailabel.interfaces.utils.transform:63) - PRE - Run Transform(s) [2022-11-10 09:53:21,203] [431] [MainThread] [INFO] (monailabel.interfaces.utils.transform:64) - PRE - Input Keys: ['label_colors', 'max_workers', 'device', 'model', 'image', 'output', 'level', 'location', 'size', 'tile_size', 'min_poly_area', 'foreground', 'background', 'description', 'save_label'] [2022-11-10 09:53:21,204] [431] [MainThread] [INFO] (monailabel.interfaces.utils.transform:109) - PRE - Transform (LoadImagePatchd): Time: 0.0; [2022-11-10 09:53:21,204] [431] [MainThread] [INFO] (monailabel.interfaces.utils.transform:109) - PRE - Transform (EnsureTyped): Time: 0.0004; [2022-11-10 09:53:21,205] [431] [MainThread] [ERROR] (uvicorn.error:369) - Exception in ASGI application Traceback (most recent call last): File "/opt/conda/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi result = await app(self.scope, self.receive, self.send) File "/opt/conda/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/opt/conda/lib/python3.8/site-packages/fastapi/applications.py", line 269, in __call__ await super().__call__(scope, receive, send) File "/opt/conda/lib/python3.8/site-packages/starlette/applications.py", line 124, in __call__ await self.middleware_stack(scope, receive, send) File "/opt/conda/lib/python3.8/site-packages/starlette/middleware/errors.py", line 184, in __call__ raise exc File "/opt/conda/lib/python3.8/site-packages/starlette/middleware/errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "/opt/conda/lib/python3.8/site-packages/starlette/middleware/cors.py", line 84, in __call__ await self.app(scope, receive, send) File "/opt/conda/lib/python3.8/site-packages/starlette/exceptions.py", line 93, in __call__ raise exc File "/opt/conda/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__ await self.app(scope, receive, sender) File "/opt/conda/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__ raise e File "/opt/conda/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "/opt/conda/lib/python3.8/site-packages/starlette/routing.py", line 670, in __call__ await route.handle(scope, receive, send) File "/opt/conda/lib/python3.8/site-packages/starlette/routing.py", line 266, in handle await self.app(scope, receive, send) File "/opt/conda/lib/python3.8/site-packages/starlette/routing.py", line 65, in app response = await func(request) File "/opt/conda/lib/python3.8/site-packages/fastapi/routing.py", line 227, in app raw_response = await run_endpoint_function( File "/opt/conda/lib/python3.8/site-packages/fastapi/routing.py", line 160, in run_endpoint_function return await dependant.call(**values) File "/opt/conda/lib/python3.8/site-packages/monailabel/endpoints/wsi_infer.py", line 126, in api_run_wsi_inference return run_wsi_inference(background_tasks, model, image, session_id, None, wsi, output) File "/opt/conda/lib/python3.8/site-packages/monailabel/endpoints/wsi_infer.py", line 110, in run_wsi_inference result = instance.infer_wsi(request) File "/opt/conda/lib/python3.8/site-packages/monailabel/interfaces/app.py", line 643, in infer_wsi res = self.infer(request, datastore) File "/opt/conda/lib/python3.8/site-packages/monailabel/interfaces/app.py", line 300, in infer result_file_name, result_json = task(request) File "/opt/conda/lib/python3.8/site-packages/monailabel/tasks/infer/basic_infer.py", line 293, in __call__ data = self.run_pre_transforms(data, pre_transforms) File "/opt/conda/lib/python3.8/site-packages/monailabel/tasks/infer/basic_infer.py", line 379, in run_pre_transforms return run_transforms(data, transforms, log_prefix="PRE", use_compose=False) File "/opt/conda/lib/python3.8/site-packages/monailabel/interfaces/utils/transform.py", line 93, in run_transforms data = t(data) File "/opt/monai/monai/transforms/utility/dictionary.py", line 235, in __call__ d[key] = self.converter(d[key]) File "/opt/monai/monai/transforms/utility/array.py", line 142, in __call__ out: NdarrayOrTensor = convert_to_tensor(moveaxis(img, self.channel_dim, 0), track_meta=get_track_meta()) File "/opt/monai/monai/transforms/utils_pytorch_numpy_unification.py", line 65, in moveaxis return np.moveaxis(x, src, dst) File "<__array_function__ internals>", line 180, in moveaxis File "/opt/conda/lib/python3.8/site-packages/numpy/core/numeric.py", line 1460, in moveaxis source = normalize_axis_tuple(source, a.ndim, 'source') File "/opt/conda/lib/python3.8/site-packages/numpy/core/numeric.py", line 1391, in normalize_axis_tuple axis = tuple([normalize_axis_index(ax, ndim, argname) for ax in axis]) File "/opt/conda/lib/python3.8/site-packages/numpy/core/numeric.py", line 1391, in <listcomp> axis = tuple([normalize_axis_index(ax, ndim, argname) for ax in axis]) numpy.AxisError: source: axis -1 is out of bounds for array of dimension 0
Issue Analytics
- State:
- Created 10 months ago
- Comments:7
Top GitHub Comments
Try using latest version of plugin… there are lots of improvements added… u don’t have to share the image… u can load your own in qupath etc…
https://github.com/Project-MONAI/MONAILabel/releases/download/data/qupath-extension-monailabel-0.3.1.jar (use the main branch to get the nuclick/classification model experience)
For DSA plugin you need to install DSA first… More details here: https://github.com/Project-MONAI/MONAILabel/tree/main/plugins/dsa
(NOTE: In the latest main branch, we have added lots of improvements on QuPath)