-
@Nic-Ma @yiheng-wang-nv Hello. I need to do a visualization of all labels on the same picture after evaluation of model on true_mask and pred_mask. I would like to have the same kind of visualization you had after training in cell 11 of this notebook: But in my case I need to do after evaluation of model on original image spacings. I tried to convert the one hot data into the single channel format using argmax function this way plt.imshow(torch.argmax(test_labels[0], dim=1).detach().cpu()[0, :, :, 250]) https://github.com/HripsimeS/Computer-Vision/blob/main/3DUnet_GitHub.ipynb |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @HripsimeS , Thanks for your interest and experiments here. Invertd(
keys="pred",
transform=val_org_transforms,
orig_keys="image",
meta_keys="pred_meta_dict",
orig_meta_keys="image_meta_dict",
meta_key_postfix="meta_dict",
nearest_interp=False,
to_tensor=True,
) Could you please help check whether your logic is correct about inverting? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Hi @HripsimeS ,
Thanks for your interest and experiments here.
The key feature here to convert the
spacing
is the Invertd transform:Could you please help check whether your logic is correct about inverting?
@yiheng-wang-nv May help analyze more details if you still have issues.
Thanks in advance.