项目地址: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=''

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-08-12
  • 2021-10-11
  • 2021-11-23
相关资源
相似解决方案