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

Fixes for YOLO indices, file formats and paths with special characters #132

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

dpservis
Copy link
Contributor

  • Fixrs float indices in YOLO export
  • Fixes opening webp
  • Fixes opening image file paths with special characters

…s floats in the file. Then if you try to import them, pylabel fails. The reason is that iterrows does not presereve types while itertuples does.
@dpservis
Copy link
Contributor Author

A UT seems to fail but my simple test and working code succeed

image

@alexheat alexheat merged commit 61accce into pylabel-project:dev Nov 23, 2023
1 check failed
alexheat added a commit that referenced this pull request Nov 24, 2023
@alexheat
Copy link
Contributor

Thank you for your contribution @dpservis. I finally had time to look into this.
I figured out why the change was failing the validation tests. Using your method, grayscale images returned an array with only 2 values from the .shape property. (No value for the number of channels.)

I use this code to workaround the issue:

            # If the image is grayscale then there is no img_depth
            if len(im.shape) == 2:
                img_depth = 1
            else:
                img_depth = im.shape[2]  # 3 for color images

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 this pull request may close these issues.

2 participants