uni-medical / SAM-Med3D

SAM-Med3D: An Efficient General-purpose Promptable Segmentation Model for 3D Volumetric Medical Image
Apache License 2.0
528 stars 70 forks source link

数据准备有问题,作者可以帮忙看看吗 #49

Closed pdyhaha closed 3 months ago

pdyhaha commented 8 months ago

Traceback (most recent call last): File "C:\Users\pl\Desktop\FILE\SAM-Med3D-main\utils\prepare_data_from_nnUNet.py", line 70, in for idx, cls_name in meta_info[""].items(): KeyError: '' HepaticVessel {'0': 'CT'} num_classes: 2 {'0': 'background', '1': 'Vessel', '2': 'Tumour'} 我试了好几个数据集都不行,dataset.json里也没有空字符啊,很奇怪

reckdk commented 7 months ago

It seems that "labels" is missing in the code:

https://github.com/uni-medical/SAM-Med3D/blob/360da835e2a25a10c2b9befde35e5ab19afdfaba/utils/prepare_data_from_nnUNet.py#L69-L71

meta_info[""].items() --> meta_info["labels"]

blueyo0 commented 3 months ago

Thanks for @reckdk 's comments 👍 @pdyhaha Close this issue, since it is solved. You can comments if you still have some questions.