Response form AIAA server assert in 3D Slicer when attempting DeepGrow

BACKGROUND:

I am trying to figure out how to segment “Upper GI”, I do not see a pretrained model in ngc so I am thinking Deep Grow feature of the AIAA server may be a good way to go about it. Is this a good assumption?

I setup the Clara Train and AIAA server on aws and am connecting to it using 3D slicer.

referring to DeepGrow example on the AIAA server I did this:

ngc registry model download-version nvidia/med/clara_train_deepgrow_aiaa_inference_only:1

curl -X PUT “http://127.0.0.1/admin/model/clara_deepgrow
-F “config=@clara_train_deepgrow_aiaa_inference_only_v1/config/config_aiaa.json;type=application/json”
-F “data=@clara_train_deepgrow_aiaa_inference_only_v1/models/network.pt”

Than in 3D slicer (version 4.11.0-2020-04-21 r29000 / dfef957)
I load up CT scan
Select: Segment Editor
Press + to add a new segment calling it Segment_Stomach
Press the Nvidia AIAA logo:
Point to my AIAA server on amazon as such:
Nvidia AIAA server: I put in: http://iputinmypublicipaddressfortheaiaaserver/v1/models

Select DeepGrow
Model Dropdown: clara_deepgrow

I click on the “Forground (+ve) Points” button
than click the mouse pointer on a part of the stomach.

PROBLEM:
The spinner shows up for a little while (about a minute) than I get this error:

Run Deepgrow for segment: Segment_Stomach; model: clara_deepgrow - Status: 500; Response: b’{“error”:{“message”:,“type”:“AssertionError”},“success”:false}\n’

Details:
Traceback (most recent call last):
File “C:/Users/Peter/AppData/Roaming/NA-MIC/Extensions-29000/NvidiaAIAssistedAnnotation/lib/Slicer-4.11/qt-scripted-modules/SegmentEditorNvidiaAIAALib/SegmentEditorEffect.py”, line 533, in onClickDeepgrow
result_file = self.logic.deepgrow(in_file, session_id, model, foreground, background)
File “C:/Users/Peter/AppData/Roaming/NA-MIC/Extensions-29000/NvidiaAIAssistedAnnotation/lib/Slicer-4.11/qt-scripted-modules/SegmentEditorNvidiaAIAALib/SegmentEditorEffect.py”, line 1056, in deepgrow
session_id=session_id)
File “C:\Users\Peter\AppData\Roaming\NA-MIC\Extensions-29000\NvidiaAIAssistedAnnotation\lib\Slicer-4.11\qt-scripted-modules\NvidiaAIAAClientAPI\client_api.py”, line 337, in deepgrow
raise AIAAException(AIAAError.SERVER_ERROR, ‘Status: {}; Response: {}’.format(status, form))
NvidiaAIAAClientAPI.client_api.AIAAException: (3, ‘Status: 500; Response: b’{“error”:{“message”:,“type”:“AssertionError”},“success”:false}\n’’)

Hi There,
Thanks for the question.
This is very detailed message provided on the client side.

Can you start your AIAA server with flag --debug 1, and observe/paste/attach the logs here?
it should be in http://yourserveripaddress/logs/?lines=1000

Thank you

Hi Yountingh,

Please find attached the logs after running AIAA server with --debug 1 flag you asked for.

Thank you for looking into this.

Peteraiaaserverwithdebuglogs.txt (110.1 KB)

Hi Peter,

Thanks for the logs!
I think the problem is that this model only supports channel dimension with 1.
How many dimensions do your data have?
The data I am testing has only 3D (DHW).

Your data seems to have more than 3, and the last one is treated as channel dimension.
If it is 1 can you add a custom pre-transform to get rid of it?
Like np.squeeze(dim=the channel dim)
If it is more than 1, can you decide which channel you want to use or how to combine them (into 1)?

We can see in the logs, there is this information “original shape format: DHWC”

Hi Yuantingh,

I have similar problem.
The data I tested is 3D slicer builtin sample data MRBrainTumor2.
What’s the meaning of shape format HW and DHW?

Thank you for looking into this.
Attached file is the logs of AIAA server
logs.txt (18.6 KB)

Hi

To try the deepgrow model,
Can you download data from Medical Decathlon in here: https://drive.google.com/drive/folders/1HqEgzS8BV2c7xYNrZdEAnrHk7osJJ--2

Shape format HW means height and width, this is for 2D
DHW means depth, height and width, this is for 3D