Commit 015490f3 authored by Neal Wu's avatar Neal Wu Committed by GitHub
Browse files

Merge pull request #656 from xionghcx/xionghcx-patch-1

Fix ValueError when processing bbox in XML annotation file
parents 69680898 c924285b
...@@ -102,7 +102,9 @@ def GetItem(name, root, index=0): ...@@ -102,7 +102,9 @@ def GetItem(name, root, index=0):
def GetInt(name, root, index=0): def GetInt(name, root, index=0):
return int(GetItem(name, root, index)) # In some XML annotation files, the point value are not int, but float.
# So adding a float function to avoid ValueError.
return int(float(GetItem(name, root, index)))
def FindNumberBoundingBoxes(root): def FindNumberBoundingBoxes(root):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment