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

Fix a tiny bug when converting from VOC to coco #8949

Open
wants to merge 1 commit into
base: release/2.7
Choose a base branch
from

Conversation

pminimd
Copy link

@pminimd pminimd commented Apr 26, 2024

When there exists an annotation_id which holds one or more SPACE inside, it will be incorrectly split and the last segment taken out as an unseen annotation_id. Which leads to the following FileNotFoundError

  3%|█████▏                                                                                                                                               | 2/58 [00:00<00:00, 12464.50it/s]
Traceback (most recent call last):
  File "tools/x2coco.py", line 542, in <module>
    main()
  File "tools/x2coco.py", line 431, in main
    voc_xmls_to_cocojson(
  File "tools/x2coco.py", line 262, in voc_xmls_to_cocojson
    ann_tree = ET.parse(a_path)
  File "/home/pminimd/miniconda3/envs/kfxd/lib/python3.8/xml/etree/ElementTree.py", line 1202, in parse
    tree.parse(source, parser)
  File "/home/pminimd/miniconda3/envs/kfxd/lib/python3.8/xml/etree/ElementTree.py", line 584, in parse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/home/pminimd/dataset/Hand_Det/Annotations/hand```

… to coco

When there exists an annotation_id which holds one or more SPACE inside, it will be incorrectly split and the last segment taken out
Copy link

paddle-bot bot commented Apr 26, 2024

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Apr 29, 2024

CLA assistant check
All committers have signed the CLA.

@pminimd
Copy link
Author

pminimd commented Apr 29, 2024

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

CLA assistant check All committers have signed the CLA.

There is no CLA to sign for PaddlePaddle/PaddleDetection

(API rate limit exceeded for user ID 46782768. If you reach out to GitHub Support for help, please include the request ID 0C4C:3793F0:15A0102:15B80E6:662F6140 and timestamp 2024-04-29 08:58:40 UTC.)

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

Successfully merging this pull request may close these issues.

None yet

3 participants