提交 c12c8276 编写于 作者: L liuhui29

fix bug

上级 ce2f79f7
...@@ -62,9 +62,8 @@ def main(): ...@@ -62,9 +62,8 @@ def main():
categories_list = [cat['name'] for cat in anno['categories']] categories_list = [cat['name'] for cat in anno['categories']]
with open(args.outfile_path, 'w') as f: with open(args.outfile_path, 'w') as f:
for cat in categories_list[0:-1]: for cat in categories_list:
f.write(cat + '\n') f.write(cat + '\n')
f.write(categories_list[-1])
print('lable_list file: {} create done!'.format(args.outfile_path)) print('lable_list file: {} create done!'.format(args.outfile_path))
if args.dataset_type == 'voc' or args.dataset_type == 'VOC': if args.dataset_type == 'voc' or args.dataset_type == 'VOC':
...@@ -88,9 +87,8 @@ def main(): ...@@ -88,9 +87,8 @@ def main():
categories_list = sorted(categories_list) categories_list = sorted(categories_list)
with open(args.outfile_path, 'w') as f: with open(args.outfile_path, 'w') as f:
for cat in categories_list[0:-1]: for cat in categories_list:
f.write(cat + '\n') f.write(cat + '\n')
f.write(categories_list[-1])
print('lable_list file: {} create done!'.format(args.outfile_path)) print('lable_list file: {} create done!'.format(args.outfile_path))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册