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

Create Training Dataset inverts some images. #94

Closed
Abe404 opened this issue Mar 27, 2023 · 4 comments
Closed

Create Training Dataset inverts some images. #94

Abe404 opened this issue Mar 27, 2023 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers ready for release when an issue is in master but not yet in a release

Comments

@Abe404
Copy link
Owner

Abe404 commented Mar 27, 2023

See example in attached screenshot. This is not the case for all images.

Screenshot from 2023-03-27 12-51-45

@Abe404 Abe404 assigned Abe404 and unassigned Abe404 Mar 29, 2023
@Abe404 Abe404 added bug Something isn't working good first issue Good for newcomers labels Mar 29, 2023
@Abe404
Copy link
Owner Author

Abe404 commented Mar 30, 2023

It appears there is a bug with converting some greyscale PNG Pillow images to numpy.

I found a workaround involving converting them to RGB with Pillow first and then converting to numpy.

im = Image.open(fpath).convert("RGB")

I convert all images to RGB internally anyway so this is fine for now.

@Abe404
Copy link
Owner Author

Abe404 commented Mar 30, 2023

I have added a bug report for the Pillow library: python-pillow/Pillow#7045

@Abe404
Copy link
Owner Author

Abe404 commented Mar 30, 2023

This is now fixed with the following commit:
dd6ea9a

But is not yet available in a release:

@Abe404 Abe404 closed this as completed Mar 30, 2023
@Abe404 Abe404 reopened this Mar 30, 2023
@Abe404 Abe404 added the ready for release when an issue is in master but not yet in a release label Mar 30, 2023
@Abe404
Copy link
Owner Author

Abe404 commented May 8, 2023

@Abe404 Abe404 closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers ready for release when an issue is in master but not yet in a release
Projects
None yet
Development

No branches or pull requests

1 participant