Fixed glob in dataset

Former-commit-id: 88a44f9fdd08df1e0d87efb706506dbd0898f6fd
This commit is contained in:
Louis Lac 2020-06-03 15:47:19 +02:00
parent 9fb406b393
commit 4db3cb4620

View file

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