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