Encounter Error when inference by segmentation_mri_prostate_cg_and_pz model


To segment the prostate, I start the Annotation server and upload the segmentation_mri_prostate_cg_and_pz.zip model(Download from ngc).
But when I run Segmentation in 3D Slicer Segmentation Editor, it’s nothing happen. When I check the Flask log, it show the error:

ValueError: Cannot feed value of shape (1, 1, 96, 96, 32) for Tensor ‘NV_MODEL_INPUT:0’, which has shape ‘(?, 2, ?, ?, ?)’

It seems that the input dimension is incorrect.What should I do?
Modify some value in config_aiaa.json? I don’t know what the second dimension means.

Could you please give me some advises? Thanking you in advance!

Hi there,

I think that might because the data format/shape issue.

Could you try to run “segmentation_ct_spleen” to see if it works first?


Thank you for response.

There’s no problem to run “segmentation_ct_spleen”.

I also think it’s a data format/shape issue. It seems model required image with 2 channels ,but 3D Slicer is send image with 1 channel. What should I to modify? I don’t have the clue how to solve this problem.

Hi Ray,

Those two models like prostate and brain_full are trained with 4D samples and the expect the input accordingly.
However slicer and mitk can view but plugins won’t work for 4D samples.
So if you want to get the results of these models, you can directly use API in browser or curl way to get the results from AIAA server
or u can use AIAA Client binaries… which are shared in https://github.com/NVIDIA/ai-assisted-annotation-client/releases (or AIAA py-client apis)

(ps AIAA server (curl/browser) mode is easier)

Thank you for your reply.

Will 4d samples be supported back on the slicer/MITK in the future?

Hi Ray,

We will discuss with Slicer/MITK community to see if it is possible.
But 3Dslicer is called 3Dslicer, I am not sure they will support this.

Currently, it is not in our plan in the near future.
We are trying to make things faster that’s our primary goal now.

You could try the NvidiaAIAAclient I mention up there,
I could help you if you encounter any problem.