Invertd not working as in spleen tutorial #6589
Answered
by
KumoLiu
hreso110100
asked this question in
Q&A
-
I was following this tutorial https://github.com/Project-MONAI/tutorials/blob/main/3d_segmentation/spleen_segmentation_3d.ipynb, concretely Inference on Test Set part: This is my postTransform Compose for prediction of model
This is my preTransform Compose:
This is my prediction loop
but I ve got this error :
|
Beta Was this translation helpful? Give feedback.
Answered by
KumoLiu
Jun 8, 2023
Replies: 1 comment 4 replies
-
Hi @hreso110100, could you please check your data type, from the error message seems your data is <class 'numpy.ndarray'>?
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @hreso110100, I can reproduce the error, it's due to
ToTensord
.ToTensord
it will inverse the data to numpy, so you can just comment this transforms.MONAI/monai/transforms/utility/dictionary.py
Line 558 in 98b6a15
Hope it can help you, thanks!