Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pascal VOC - 3 little issues with fix #78

Open
Natriumpikant opened this issue Oct 26, 2022 · 0 comments
Open

Pascal VOC - 3 little issues with fix #78

Natriumpikant opened this issue Oct 26, 2022 · 0 comments

Comments

@Natriumpikant
Copy link

Natriumpikant commented Oct 26, 2022

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

  1. Same like this one https://github.com/joheras/CLoDSA/issues/74
    The algorithm has a problem with values as float so i changed it to the following:

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

  1. 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"

  1. 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.

Thanks so far :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant