Skip to content

Commit

Permalink
Update convert_gt_xml.py
Browse files Browse the repository at this point in the history
Fix the inconsistent type when writing the txt file.
  • Loading branch information
leyuan authored Dec 10, 2018
1 parent 6cc71b7 commit 9899a70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extra/convert_gt_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
top = bndbox.find('ymin').text
right = bndbox.find('xmax').text
bottom = bndbox.find('ymax').text
new_f.write(obj_name + " %d %d %d %d\n" % (left, top, right, bottom))
new_f.write(obj_name + " %s %s %s %s\n" % (left, top, right, bottom))
# 2. move old file (xml format) to backup
os.rename(tmp_file, "backup/" + tmp_file)
print("Conversion completed!")

0 comments on commit 9899a70

Please sign in to comment.