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: Too many Values given expected 5 #14

Open
BestITUserEUW opened this issue Feb 14, 2022 · 1 comment
Open

Fix: Too many Values given expected 5 #14

BestITUserEUW opened this issue Feb 14, 2022 · 1 comment

Comments

@BestITUserEUW
Copy link

Hey,
i got an error when trying to convert yolo2pascal format.
Error: Too many Values given expected five.
It occurs in yolo_io.py in parseYoloFormat. So i looked your code up and found out that my yolo dataset had an " " after the 5 Values. If anyone runs into that Problem to you can fix it by editing yolo_io.py -> parseYoloFormat to:

try:
classIndex, xcen, ycen, w, h = bndBox.split(' ')
except Exception:
classIndex, xcen, ycen, w, h, corrupted = bndBox.split(' ')

the .split method is basically splitting the Complete txt file into pieces. If you happen to have " " at the end it needs 6 Values to be asigned. Thats why it's throwing the Error above. Now it works like a Charm thank you for providing that library.

@hai-h-nguyen
Copy link
Owner

Thank you for providing a fix.

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

2 participants