About Test
When I run test.py, an error is reported in the console. The traceback is as follows:
Traceback (most recent call last):
File "test.py", line 121, in
文件“test.py”,第 121 行,在 main() 文件“test.py”,第 94 行,在主 original_affine = batch[“label_meta_dict”][“affine”][0].numpy()
KeyError:“label_meta_dict”
I have also encountered this problem. How can I solve “label_meta_dict” and “affine”
The issue with the key error may be related to changes to LoadImaged such that it doesn't produce the metadata dictionary any more. Wherever LoadImaged occurs add the argument image_only=False to produce the dictionary. For the metric, there would have to be quite significant changes to how the dice is calculated here, the MONAI DiceMetric class would allow per-class values to be calculated. @ahatamiz or @upupming I think you worked on this as well? Thanks
The issue with the key error may be related to changes to
LoadImagedsuch that it doesn't produce the metadata dictionary any more. WhereverLoadImagedoccurs add the argumentimage_only=Falseto produce the dictionary. For the metric, there would have to be quite significant changes to how the dice is calculated here, the MONAI DiceMetric class would allow per-class values to be calculated. @ahatamiz or @upupming I think you worked on this as well? Thanks
Hello, may I ask which version of MONAI corresponds to the current swinUNETR? I'm unable to install it from the requirements.txt. Thank you!
The issue with the key error may be related to changes to
LoadImagedsuch that it doesn't produce the metadata dictionary any more. WhereverLoadImagedoccurs add the argumentimage_only=Falseto produce the dictionary. For the metric, there would have to be quite significant changes to how the dice is calculated here, the MONAI DiceMetric class would allow per-class values to be calculated. @ahatamiz or @upupming I think you worked on this as well? ThanksHello, may I ask which version of MONAI corresponds to the current swinUNETR? I'm unable to install it from the requirements.txt. Thank you! You can install monai version 1.1.0 with 'pip install 'monai[all]==1.1.0'', which works for swinunetr