Replies: 2 comments
-
Hi @hyeonLIB, I don't think the pred in your "pred_dict" has been done any transforms.
Or you can specify the meta information and |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your suggestion. I solved the issue with the codes down below.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm encountering an issue where i cannot correctly invert a prediction mask back to the original image shape after applying a series of transformations including 'CropForegoundd', 'Orientationd' and 'Spacingd'. Despite attempting to use 'Invertd' transform on the prediction mask, the output does not match the original image dimensions. Below is the relevant portion of my code:
I have confirmed the dimensions of the original image, the transformed image and the prediction mask. However after applying 'Invertd', the dimensions of the inverted prediction mask do not revert to the original image's dimensions.
Original image shape: (512,512,193)
Transformed image shape: torch.Size([1,1,267,201,289)]
Predicted mask shape before inversion: torch.Size([1,1,267,201,289)]
Inverted mask shape (expected original shape): torch.Size([1,1,267,201,289)] - which is incorrect.
Could you please advice on what might be going wrong here, or if there are additional steps or considerations needed to ensure the Invertd transform accurately reverts the prediction mask to the original image dimensions?
The purpose of the process, measuring each volume accurately and visualizing the mask on the 3D slicer. I would like to convert the prediction mask to the label map which can display the segmentation result on 3D slicer.
Thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions