Merge pull request #187 from laclouis5/development

Fixed glob in dataset

Former-commit-id: 15df8266027d48ec1e78610338283c2a5dca7f7b
This commit is contained in:
milesial 2020-06-03 14:24:32 -07:00 committed by GitHub
commit aa9defe6a5

View file

@ -43,8 +43,8 @@ class BasicDataset(Dataset):
def __getitem__(self, i): def __getitem__(self, i):
idx = self.ids[i] idx = self.ids[i]
mask_file = glob(self.masks_dir + idx + '*') mask_file = glob(self.masks_dir + idx + '.*')
img_file = glob(self.imgs_dir + idx + '*') img_file = glob(self.imgs_dir + idx + '.*')
assert len(mask_file) == 1, \ assert len(mask_file) == 1, \
f'Either no mask or multiple masks found for the ID {idx}: {mask_file}' f'Either no mask or multiple masks found for the ID {idx}: {mask_file}'