base_cv_dataset add path processing
@@ -52,6 +52,12 @@ class ImageClassificationDataset(object):
break
line = line.strip()
items = line.split(" ")
+ if os.path.isabs(items[0]):
+ image_path = items[0]
+ else:
+ if self.base_path is None:
+ image_path = items[0]
+ else:
image_path = os.path.join(self.base_path, items[0])
label = items[1]
data.append((image_path, items[1]))
