How to save the results of multi-class segmentation? #4280
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi @Alex8211101 , Thanks for your interest here. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Looks like your image will contain 4 channels, and these will be one-hotted. This means that you should likely be using the Edit: sorry, I didn't check your code properly before replying -- you already have the |
Beta Was this translation helpful? Give feedback.
Looks like your image will contain 4 channels, and these will be one-hotted. This means that you should likely be using the
Softmax
activation, notSigmoid
. From here, you can then doargmax
to convert from a one-hotted image into an image with a single channel filled with integers, each integer corresponding to a different label. I suspect that once you save this, it will look as you expect.Edit: sorry, I didn't check your code properly before replying -- you already have the
argmax
. Have you checked that your network is doing what you expect? You could do this with amatplotlib.imshow
. If it looks normal inimshow
, then maybe the problem is just the Slicer viewer settings. For debuggin…