提交 257ea6b0 编写于 作者: Y Your Name

fix create_dataset_list.py for win10 environment

上级 c4641a8b
......@@ -130,12 +130,12 @@ def generate_list(args):
for item in range(num_images):
left = image_files[item].replace(dataset_root, '')
if left[0] == os.path.sep:
left = left.lstrip(os.path.sep)
left = left.lstrip(os.path.sep).replace('\\', '/')
try:
right = label_files[item].replace(dataset_root, '')
if right[0] == os.path.sep:
right = right.lstrip(os.path.sep)
right = right.lstrip(os.path.sep).replace('\\', '/')
line = left + separator + right + '\n'
except:
line = left + '\n'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册