-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QuPath Unsupported File Type #1799
Comments
you can. tiff support is there. possibly u need to install and configure openslide by yourself. the library files might be missing in your setup. |
Thanks, @SachidanandAlle. I do have openslide installed in my environment (screenshot attached). I am using a Mac M1. Therefore, I think I am a bit confused as to why I am getting the error since I believe all has been downloaded correctly? |
Interestingly, I tried with the whole slide scan image which is an .svs file and I get a different error: The version_base parameter is not specified. |
I didn't try with openslide-bin. it was not released at that time. that will help to know if it's env issue or something to do with monailabel.
|
@SachidanandAlle I got the following error: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): Then I installed openslide-bin as requested and got the following error: Traceback (most recent call last): Interestingly, I tried using monai-label with the whole slide scan image which is an .svs file and I get a different error: The version_base parameter is not specified. So it seems two separate problems are going on? |
OSError: dlopen(libopenslide.1.dylib, 0x0006): tried: 'libopenslide.1.dylib' (no such file), For this, try to set your DYLD_LIBRARY_PATH etc.. and see if you can fix this issue without monailabel. Interestingly, I tried using monai-label with the whole slide scan image which is an .svs file and I get a different error: it might be because of not able to create infer (sub) requests for wsi. And it apparently zero sub infer tasks. |
Thanks, @SachidanandAlle! I'm quite new to coding so would you be able to provide a little more guidance on setting the DYLD_LIBRARY_PATH? What steps would I need to take to do this correctly? |
@SachidanandAlle I have now gotten the .tif file to work but the .svs file still throws the ValueError: empty range for randrange() (0, 0, 0). |
I did some more testing: To get around needing to use the .svs image, is there a way to run the segmentation model on the .tif image without having to draw and annotation that encompasses the whole image? As a reminder, my .tif images are just annotations exported from the .svs image. |
I have successfully downloaded Monai Label and QuPath. I had large .svs files and extracted regions of interest as .tif files. When trying out nuclei segmentation on those images, I got the following error:
The version_base parameter is not specified.
Please specify a compatability version level, or None.
Will assume defaults for version 1.1
[2024-12-16 12:58:42,829] [74427] [MainThread] [INFO] (main:175) - +++ Adding Trainer:: segmentation_nuclei => <lib.trainers.segmentation_nuclei.SegmentationNuclei object at 0x177fc7110>
[2024-12-16 12:58:42,830] [74427] [MainThread] [INFO] (main:196) - Active Learning Strategies:: ['wsi_random']
[2024-12-16 12:58:42,830] [74427] [MainThread] [INFO] (monailabel.utils.sessions:51) - Session Path: /Users/waldmanad/.cache/monailabel/sessions
[2024-12-16 12:58:42,830] [74427] [MainThread] [INFO] (monailabel.utils.sessions:52) - Session Expiry (max): 3600
[2024-12-16 12:58:42,830] [74427] [MainThread] [INFO] (monailabel.interfaces.app:469) - App Init - completed
[2024-12-16 12:58:42,830] [timeloop] [INFO] Starting Timeloop..
[2024-12-16 12:58:42,830] [timeloop] [INFO] Starting Timeloop..
[2024-12-16 12:58:42,830] [74427] [MainThread] [INFO] (timeloop:60) - Starting Timeloop..
[2024-12-16 12:58:42,830] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete..run_scheduler at 0x177e68c20>
[2024-12-16 12:58:42,830] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete..run_scheduler at 0x177e68c20>
[2024-12-16 12:58:42,830] [74427] [MainThread] [INFO] (timeloop:42) - Registered job <function MONAILabelApp.on_init_complete..run_scheduler at 0x177e68c20>
[2024-12-16 12:58:42,830] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
[2024-12-16 12:58:42,830] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
[2024-12-16 12:58:42,830] [74427] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set
[2024-12-16 12:58:42,830] [74427] [MainThread] [INFO] (uvicorn.error:62) - Application startup complete.
[2024-12-16 12:58:42,831] [74427] [MainThread] [INFO] (uvicorn.error:215) - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
[2024-12-16 12:58:51,896] [74427] [MainThread] [INFO] (monailabel.endpoints.activelearning:44) - Active Learning Request: {'strategy': 'wsi_random', 'image': '', 'patch_size': [1024, 1024], 'image_size': [0, 0]}
[2024-12-16 12:58:51,897] [74427] [MainThread] [INFO] (monailabel.tasks.activelearning.random:47) - Random: Selected Image: MS073_SC_C_ACST_L_2; Weight: 1734371931
[2024-12-16 12:58:51,900] [74427] [MainThread] [INFO] (monailabel.endpoints.activelearning:60) - Next sample: {'id': 'MS073_SC_C_ACST_L_2', 'weight': 1734371931, 'path': '/Users/waldmanad/datasets/MS073_SC_C_ACST_L_2.tif', 'ts': 1734371662, 'name': 'MS073_SC_C_ACST_L_2.tif'}
[2024-12-16 12:59:11,000] [74427] [MainThread] [INFO] (monailabel.endpoints.wsi_infer:109) - WSI Infer Request: {'model': 'segmentation_nuclei', 'image': 'MS073_SC_C_ACST_L_2', 'output': 'asap', 'level': 0, 'location': [0, 0], 'size': [1433, 1072], 'tile_size': [1024, 1024], 'min_poly_area': 30, 'foreground': [], 'background': [], 'max_workers': 1}
[2024-12-16 12:59:11,005] [74427] [MainThread] [ERROR] (uvicorn.error:408) - Exception in ASGI application
Traceback (most recent call last):
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
raise exc
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
await self.app(scope, receive, _send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in call
await self.app(scope, receive, send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
await self.middleware_stack(scope, receive, send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/monailabel/endpoints/wsi_infer.py", line 132, in api_run_wsi_inference
return run_wsi_inference(background_tasks, model, image, session_id, None, wsi, output)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/monailabel/endpoints/wsi_infer.py", line 111, in run_wsi_inference
result = instance.infer_wsi(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/monailabel/interfaces/app.py", line 643, in infer_wsi
infer_tasks = create_infer_wsi_tasks(request, image)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/monailabel/interfaces/utils/wsi.py", line 44, in create_infer_wsi_tasks
with openslide.OpenSlide(image) as slide:
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/openslide/init.py", line 207, in init
self._osr = lowlevel.open(filename)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/monai/lib/python3.11/site-packages/openslide/lowlevel.py", line 258, in _check_open
raise OpenSlideUnsupportedFormatError("Unsupported or missing image file")
openslide.lowlevel.OpenSlideUnsupportedFormatError: Unsupported or missing image file
Can I not perform the segmentation on my .tif images?
The text was updated successfully, but these errors were encountered: