SaveImaged not working after upgrading MONAI from 0.8.1 to 1.0.1 #5806
-
Describe the bug _target_: SaveImaged, keys: model_output_key, meta_keys: [ 'labels_meta_dict' ], data_root_dir: label_root_dir, output_dir: pred_output_dir, output_postfix: 'pred', separate_folder: False Any help would be greatly appreciated! Expected behavior Screenshots Environment Ensuring you use the relevant python executable, please paste the output of:
================================
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
perhaps remove any see also Project-MONAI/tutorials#881 and #4764 |
Beta Was this translation helpful? Give feedback.
Thank you for your reply. I tried to remove
ToTensor
transform in the preprocessing while it produced the same error.My call has meta_keys: [ 'labels_meta_dict' ] as input.
So I changed this line
MONAI/monai/transforms/io/array.py
Line 422 in 8271a19
meta_data = meta_data if meta_data else img.meta if isinstance(img, MetaTensor) else None
.Then it works for my situation. Not sure my change works for all situations.