Some questions about data format #6142
-
My original data is CT data, image and label are single-channel 3D data, and they are converted into nii format. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @daisysong1, I think you want to one-hot your label from a shape like (1, 96, 96, 96) to (classes, 96, 96, 96). Can't MONAI/monai/transforms/post/array.py Line 131 in a8302ec You could also do it directly in the loss function like:
For more details, you could refer to this tutorial. Hope it can help you, thanks! |
Beta Was this translation helpful? Give feedback.
Hi @daisysong1, I think you want to one-hot your label from a shape like (1, 96, 96, 96) to (classes, 96, 96, 96). Can't
AsDiscrete
do that?MONAI/monai/transforms/post/array.py
Line 131 in a8302ec
You could also do it directly in the loss function like:
For more details, you could refer to this tutorial.
Hope it can help you, thanks!