提交 fdc6008d 编写于 作者: W wuzewu

base_cv_dataset add path processing

上级 b06e9e17
......@@ -52,7 +52,13 @@ class ImageClassificationDataset(object):
break
line = line.strip()
items = line.split(" ")
image_path = os.path.join(self.base_path, items[0])
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]))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册