Skip to content

Commit

Permalink
fix bug from str of float to int
Browse files Browse the repository at this point in the history
  • Loading branch information
Maswor committed May 31, 2018
1 parent 078e22a commit 11e1424
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions anno_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ def _create_proto_anno(
quoting=csv.QUOTE_MINIMAL)
for anno_line in anno_reader:
img_path = anno_line[0]
box = (int(anno_line[1]), int(anno_line[2]), int(anno_line[3]),
int(anno_line[4]), anno_line[5])
box = (int(float(anno_line[1])), int(float(anno_line[2])),
int(float(anno_line[3])), int(float(anno_line[4])),
anno_line[5])
if img_path not in proto_data:
proto_data[img_path] = []
proto_data[img_path].append(box)
Expand Down

0 comments on commit 11e1424

Please sign in to comment.