forked from datitran/raccoon_dataset
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Thanks for the code, it is very handy and useful!
One small suggestion is to change the reading from the xml annotations to a tag based approach instead of the current half tag-based, half index-based! I have been working with some data where the script does not work otherwise.
The update is to rewrite the relevant lines in function xml_to_csv
detection_util_scripts/generate_csv.py
Lines 23 to 30 in 50e862b
| value = (root.find('filename').text, | |
| int(root.find('size')[0].text), | |
| int(root.find('size')[1].text), | |
| member[0].text, | |
| int(member[4][0].text), | |
| int(member[4][1].text), | |
| int(member[4][2].text), | |
| int(member[4][3].text)) |
value = (root.find('filename').text,
int(root.find('size').find('width').text),
int(root.find('size').find('height').text),
member.find('name').text,
int(member.find('bndbox').find('xmin').text),
int(member.find('bndbox').find('ymin').text),
int(member.find('bndbox').find('xmax').text),
int(member.find('bndbox').find('ymax').text))```Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels