[深度学习][原创]pytorch-unet训练报错Either no mask 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

其实这是个很简单解决了,

dir_img = 'data/mydata/train/pic/'
dir_mask = 'data/mydata/train/cv2_mask/'

自己的路径,最后一定要加反斜杠,不然获取图片就报上述错误。

猜你喜欢

转载自blog.csdn.net/FL1623863129/article/details/112376155