-
Greetings, I am training a dataset of 2 classes (plus background) on a code based on the "Spleen 3D segmentation". It seems like the issue is related to either the "to_onehot=x" from Asdiscreted transform or it might be related to the the "squeeze_end_dims=True" from SaveImaged transform. I have seen some similar issues here on Monai Github: As we can see in ITK-snap, there are 3 "image-components" to choose from on the top-left corner of each projection frame: I am using the latest Docker from monai:latest
I have one .py script for training and one for inference Training:
And the code for inference:
I hope to understand why this is happening, it must be more users with the similar issue? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Hi @carlpe, you don't need to one-hot your output before
Thanks! |
Beta Was this translation helpful? Give feedback.
-
Ok, so I have another question please. I think there might be something wrong with the post_pred or post_label during the validation step of training. Would you please have a look at it? =-] |
Beta Was this translation helpful? Give feedback.
-
I tried to train using array also now.
Using this code:
|
Beta Was this translation helpful? Give feedback.
Hi @carlpe, you don't need to one-hot your output before
SaveImage
, it will turn your segmentation into 3 channels, you can simply do it like this:Thanks!