Project-MONAI/MONAILabel

OHIF V3 Failed to Run Auto-Segmentation

Closed this issue · 8 comments

Describe the bug

I following the official site instruction steps at the windows system. the server is sucessful start But the run button was invalid when I click the Run button.

Server logs
[MainThread] [INFO] (monailabel.endpoints.infer:171) - Infer Request: {'model': 'deepedit_seg', 'image': 'undefined', 'device': ['cpu'], 'result_extension': '.nrrd', 'result_dtype': 'uint16', 'result_compress': False, 'restore_label_idx': False}
[MainThread] [INFO] (monailabel.datastore.dicom:78) - Image ID: undefined
[MainThread] [INFO] (monailabel.datastore.dicom:80) - Image Dir (cache): .cache\monailabel\dicom\e6414d4049f71ab2e6f9528a15f29e\undefined
[MainThread] [INFO] (dicomweb_client.web:2128) - search for series
[MainThread] [ERROR] (uvicorn.error:434) - Exception in ASGI application
Traceback (most recent call last):
File "..\monailabel\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 429, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "..\monailabel\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
.......
.......
.......
File "..\monailabel\lib\site-packages\fastapi\routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "..\monailabel\lib\site-packages\fastapi\routing.py", line 163, in run_endpoint_function
return await dependant.call(**values)
File "..\monailabel\lib\site-packages\monailabel\endpoints\infer.py", line 206, in api_run_inference
return run_inference(background_tasks, model, image, session_id, params, file, label, output)
File "..\monailabel\lib\site-packages\monailabel\endpoints\infer.py", line 172, in run_inference
result = instance.infer(request)
File "..\monailabel\lib\site-packages\monailabel\interfaces\app.py", line 289, in infer
request["image"] = datastore.get_image_uri(request["image"])
File "..\monailabel\lib\site-packages\monailabel\datastore\dicom.py", line 83, in get_image_uri
dicom_web_download_series(None, image_id, image_dir, self._client, self._fetch_by_frame)
File "..\monailabel\lib\site-packages\monailabel\datastore\utils\dicom.py", line 70, in dicom_web_download_series
if not study_id:
IndexError: list index out of range

To Reproduce
Steps to reproduce the behavior:
Run commands

'monailabel start_server --app apps/radiology --studies http://127.0.0.1:8042/dicom-web --conf models deepedit'

Expected behavior

reproduce ohifv3 plugins.

Screenshots
1

Other context
Orthanc Server terminal logging this :

Unsupported return MIME type: application/dicom+json, application/json, will return DICOM+JSON

I'm having the same problem

Hi,

Thanks for reporting this. Which images are you using for this?
In any case, can you please delete the cache folder (.cache\monailabel\dicom) and try again?

[MainThread] [INFO] (monailabel.datastore.dicom:80) - Image Dir (cache): .cache\monailabel\dicom

Let us know,

Hi,I tried to clear the cache but it didn't work,but I found that when I clicked run the image inside the request parameter is undefined
image

Thanks for reporting this. Which images are you using for this? In any case, can you please delete the cache folder (.cache\monailabel\dicom) and try again?
[MainThread] [INFO] (monailabel.datastore.dicom:80) - Image Dir (cache): .cache\monailabel\dicom
Let us know,

You're welcome!I note this time start server auto create a new dicom folder,and the dicom images loading time faster than before. But still get same error like last time.and I check the information of Browser's console, The result was same like The previous person replied.

IndexError: list index out of range

below was the folder tree in cache
├.monailabel
├ └──dicom
│ ├── 488fca1f7f3f98331f6f7756beca0d35
│ └── labels
│ └── original
│ └── final
there is nothing in there.

The images which I useing was from Local. I upload them through the Orthanc browser located at http://127.0.0.1:8042/app/explorer.html#upload to upload files.
Hope these info were useful.

Hi,

Thanks for reporting this. Which images are you using for this? In any case, can you please delete the cache folder (.cache\monailabel\dicom) and try again?

[MainThread] [INFO] (monailabel.datastore.dicom:80) - Image Dir (cache): .cache\monailabel\dicom

Let us know,

oh,It might is correct,

But have some different that was I upload the files after the monailabel running.

then It work!and The same Error occurence again if I exit and click auto-segment again.
Anyway,Thanks!

The most probably reason was we first time click the run button,It already work.But the error out of memory happening in the process,It didn't work sucessful as our imagine work.But files already was there.So we click again.....

Hi,I tried to clear the cache but it didn't work,but I found that when I clicked run the image inside the request parameter is undefined image

Hello,

I have been working with OHIF, and when trying to automate the connection of OHIF with the MONAI Label Server and perform inference with some model, I get this same error. Do you know now what the cause is or the solution?

Thanks!!

Hello,
I have been working with OHIF, and when trying to automate the connection of OHIF with the MONAI Label Server and perform inference with some model, I get this same error. Do you know now what the cause is or the solution?

Thanks!!

you can find this message which is your system path in your monailabel log and then delete whole dicom folder.like this

[MainThread] [INFO] (monailabel.datastore.dicom:80) - Image Dir (cache):.cache\monailabel\dicom\e6414d4049f71ab2e6f9528a15f29e\undefined
To this
cache\monailabel

or you can upload other new dicom series which slice count don't too much,and click the run button to auto segment in new dicom series.

the cause I think in my situation was here.

The most probably reason was we first time click the run button,It already work.But the error out of memory happening in the process,It didn't work sucessful as our imagine work.But files already was there.So we click again.....