项目地址: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/'
自己的路径,最后一定要加反斜杠,不然获取图片就报上述错误。