-
Notifications
You must be signed in to change notification settings - Fork 218
Add support for JPEG-XL (file extension: jxl) #1413
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
Conversation
why does this add the import all over the place? |
It does it everywhere |
…eturn with caching
…separated t5/llama embed handling
…ktrace print for logging errors
I've got git problems solving the |
i think it's only necessary to do that in the image load function, since that's the one spot this is handled everywhere. but the default file loader is CV2, not PIL. |
About the image loading I searched for all files that were including When I missed it somewhere, e.g. due to CV2, I'm happy to look again. But I'd need a hint where I have to look :) |
…nderstand an image codec
Ok, there were only two places that are using CV2 instead of PIL to load an image. I've added a PIL fallback when CV2 doesn't understand a codec |
where you're adding the import, these scripts aren't always needing JPEG-XL. in general, i'd like to avoid having it as a baseline requirement because it sort of a rare format. we can wrap the import in a try catch and leave a note about JPEG-XL being unavailable. |
Also remove the CV2 to PIL fallback from toolkit/datasets/crop.py as requested
JPEG XL is not common right now, but it has wide momentum and is made available in many different places - and it's a great format for our usecase here. But I don't want to discuss formats, as that tends to be pointless 🙂 Now I've made it completely optional. Right now it's by default not included, but we could easily change it to be included by default with the possibility to exclude it. The crop.py also isn't using the CV2 to PIL fallback anymore. |
Add the possibility to use images in the JPEG XL file format.
This PS doesn't change any other setting, especially it doesn't touch any places with hard coded file formats.