Skip to content
Snippets Groups Projects
Unverified Commit f2aa584b authored by Ye Liu's avatar Ye Liu Committed by GitHub
Browse files

Fix parse error in XMLDataset (#4729)

parent f3bc86bd
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,8 @@ class XMLDataset(CustomDataset):
if name not in self.CLASSES:
continue
label = self.cat2label[name]
difficult = int(obj.find('difficult').text)
difficult = obj.find('difficult')
difficult = 0 if difficult is None else int(difficult.text)
bnd_box = obj.find('bndbox')
# TODO: check whether it is necessary to use int
# Coordinates may be float type
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment