Skip to content

Segmentation mask not showing after inference when using monai label in OHIF #1552

Closed Answered by JackTheSturgeon
JackTheSturgeon asked this question in Q&A
Discussion options

You must be logged in to vote

I resolved the problem. It was about the shape and values of my inference output tensor.

The output of the inference from the model has to be of shape:

  • [1, 2, x, y, z] with x, y, z being the dimensions of the input images.
    • 2 for two channels with one of them being the negative of the other (the negative is the 1st channel)
    • the first dimension is added because for some reason the data acquired in the post transform function is squeezed. So I had to add this additionnal dimension.
  • Non thresholded Tensor
    • a softmax or sigmoid is already used in the post transform to obtain the mask

My precise thought process to get to the solution:

When i did inference with the custom model on OHIF, t…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@JackTheSturgeon
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by JackTheSturgeon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants