From 4db3cb46208636a3089c109e0891348425c8a5b6 Mon Sep 17 00:00:00 2001 From: Louis Lac Date: Wed, 3 Jun 2020 15:47:19 +0200 Subject: [PATCH] Fixed glob in dataset Former-commit-id: 88a44f9fdd08df1e0d87efb706506dbd0898f6fd --- utils/dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/dataset.py b/utils/dataset.py index 45d31b7..bfba1a6 100644 --- a/utils/dataset.py +++ b/utils/dataset.py @@ -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}'