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

YoloV5 label file parsing bug #39

Closed
michael-mayo opened this issue Aug 30, 2023 · 2 comments · Fixed by #40
Closed

YoloV5 label file parsing bug #39

michael-mayo opened this issue Aug 30, 2023 · 2 comments · Fixed by #40
Assignees

Comments

@michael-mayo
Copy link

Describe the bug
YoloV5 label txt files do not always use a single space as a delimiter. Some tools generate yolo-compatible labels with tab as a delimiter. However, parsing these labels in globox leads to an error since the default separator must be a single space character. Globox would be more robust if it allowed any whitespace character as delimiters for yolo label files.

To Reproduce
Change any yolo label file so that it has one non-space delimiter such as tab and try to parse in the label files with AnnotationSet.from_yolo_v5

Expected behavior
File parsing error occurs, e.g.

File "/home/lonrix/miniconda3/envs/training_data_processing/lib/python3.11/site-packages/globox/annotation.py", line 136, in from_txt
    raise FileParsingError(path, e.reason)
globox.errors.FileParsingError: Error while reading file '/home/lonrix/train/faults_v4_taurangacc_2023/val/labels/1187B1R1-ROW-00159.txt': Syntax error in txt annotation file.

Environment (please complete the following information):

  • Python 3.11, latest version of globox.
@laclouis5 laclouis5 self-assigned this Aug 30, 2023
@laclouis5 laclouis5 linked a pull request Aug 30, 2023 that will close this issue
@laclouis5
Copy link
Owner

Hi @michael-mayo. I implemented the feature, could you try that #40 solves your issue?

@laclouis5
Copy link
Owner

@michael-mayo Any update? I did some tests on my side so I'll merge this in few days but it would be nice to have a feedback from you.

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

Successfully merging a pull request may close this issue.

2 participants