pytorch-unet训练报错Either nomask or multiple masks found for the ID


项目地址:https://github.com/milesial/Pytorch-UNet

报错内容:

Either no mask or multiple masks found for the ID{idx}:{mask_file}'

AssertionError:Either no mask or multiple masks found for the ID.

 

解决方案:

data_loading中的CarvanaDataset类下的改为mask_suffix='', 附上修改后的代码:

class CarvanaDataset(BasicDataset): def __init__(self, images_dir, masks_dir, scale=1): super().__init__(images_dir, masks_dir, scale, mask_suffix=''
# mask_suffix='_mask'被修改为mask_suffix=''


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM