x = int(float(bndbox.find('xmin').text)) y = int(float(bndbox.find('ymin').text)) h = int(float(bndbox.find('ymax').text))-y w = int(float(bndbox.find('xmax').text)) - x boxes.append((category, (x, y, w, h),confidenc
Filename in the result xml.-file
Filename in the original-xml: "12345.jpg"
Filename in the created-xml: "12345"
So the "jpg" is not there anymore.
Hardcoded it for me as jpg, but think you have to add it depending on the filename:
Some encoding issue
However - i have no solution for this atm.
In the original-xml i have some "ß" inside classnames and it works well in further proceeding.
After augmenting it and using the created-xml i get problems with this "ß" regarding the encoding. Dont know why it is - but if you want you can also have a look.
This is the error i get, if working with "ß" in classnames (only in augmented xml)
Traceback (most recent call last): File "create_csv_clodsa2.py", line 37, in <module> main() File "create_csv_clodsa2.py", line 33, in main xml_df = xml_to_csv(image_path) File "create_csv_clodsa2.py", line 13, in xml_to_csv tree = ET.parse(xml_file) File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1197, in parse tree.parse(source, parser) File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 598, in parse self._root = parser._parse_whole(source) xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 16, column 24
Edit Never mind, i think you can ignore point 3. Changed ß to ss in the whole dataset - will be better for further proceeding also with other libraries/frameworks.
Hello again. Since i work with PascalVOC this week i found some more issues you can fix if you have time for it.
I work with these one: pascalVOCLinearDetectionAugmentor.py
x = int(float(bndbox.find('xmin').text)) y = int(float(bndbox.find('ymin').text)) h = int(float(bndbox.find('ymax').text))-y w = int(float(bndbox.find('xmax').text)) - x boxes.append((category, (x, y, w, h),confidenc
Filename in the result xml.-file Filename in the original-xml: "12345.jpg" Filename in the created-xml: "12345" So the "jpg" is not there anymore.
Hardcoded it for me as jpg, but think you have to add it depending on the filename:
childFilename.text = filename[0:filename.rfind(".")] + ".jpg"
This is the error i get, if working with "ß" in classnames (only in augmented xml)
Traceback (most recent call last): File "create_csv_clodsa2.py", line 37, in <module> main() File "create_csv_clodsa2.py", line 33, in main xml_df = xml_to_csv(image_path) File "create_csv_clodsa2.py", line 13, in xml_to_csv tree = ET.parse(xml_file) File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1197, in parse tree.parse(source, parser) File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 598, in parse self._root = parser._parse_whole(source) xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 16, column 24
Edit Never mind, i think you can ignore point 3. Changed ß to ss in the whole dataset - will be better for further proceeding also with other libraries/frameworks.
Thanks so far :)