uni-medical / SAM-Med3D

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

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

Open pdyhaha opened 3 months ago

pdyhaha commented 3 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 2 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"]