-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Request: webp support #57647
Comments
@Lunatik00 Thank you! |
ok, I found tf.keras.utils.image_dataset_from_directory( ) function after, the official tutorials i saw ( https://www.tensorflow.org/guide/data ) use the tf.keras.preprocessing.image.ImageDataGenerator() function, i will post in the keras repo also, but the lack of webp support is also in the tf.io module |
Aparently there is some advance already made in the IO repository, there is a decode webp function, but it is not integrated in tf.io , is only available in tensorflow_io ( https://github.com/tensorflow/io/blob/master/tensorflow_io/python/ops/image_ops.py ), I checked the function and it works fine with my images, but it should be added to the main tf.io library and integrated to the rest of the functions to have a good compatibility |
Hi @Lunatik00, The . |
What I said is that, yes, it is there, the decode works using another package besides tensorflow directly, it is in tfio but not in tf.io and it is not integrated with the rest of the tf package, I can use that for reading individual images, but it doesn't help when I need to use it for a dataset, since it is not integrated with the rest of the package, not to mention that even when there is a decode there is not an encode, don't you find odd that a format that was developed by google is not available as default in another project developed by google? and that I can't save images using that format with the package from google but I would need to use another package like opencv to save them?, the decode is available in a related project, but it is not in the main project, the encode, I haven't found it, the use of webp from other functions that are to read batches of images, non existent, I tried to seek where in the package was the reading part when loading a batch, I haven't found it, but I only use this package, I have only a superficial knowledge of where everything is, I was seeking if at least I could have the batch available for webp when tfio is installed, is not, so, there is no support from other functions even if i install tfio, is not the individual images the problem that I think should be solved, is everything else down the line, the function you mentioned is the one I already pointed out as what I see as the starting point, not the finish line. |
Related issue in TFDS: tensorflow/datasets#3345 |
Hi @Lunatik00, On the Keras side: If you're interested in contributing support for webp decoding to With respect to using this for a dataset, as a workaround you can load the webp-encoded images into a dataset and decode them using a call to Thanks! |
thanks for the workaround, i will test it, to have a TLDR for whoever resolves the root issue, it is adding webp to the main branch, my specific problem can be solved in a general way only after it is added to io.decode_image() To have a few bulletpoints about what I tested:
With those changes I was able to load and use the dataset, that is why I know the main issue is with the decode_image() function and to have this as a solution is not viable because it drops the support for every other format and I can't expect the rest of the group to add it to their environments. After it is added to the decode_image function then the keras side only needs to add it to the list of supported formats in the code. |
@ianstenbit , cc: @fchollet |
From my understanding, it looks like this is a functionality request for core TF, and once it's supported a simple Keras change will be needed to utilize it. So I think this should be routed through the appropriate TF (not Keras) triage @sachinprasadhs (please let me know if I've misunderstood) |
Click to expand!
Issue Type
Feature Request
Source
binary
Tensorflow Version
2.10.0
Custom Code
No
OS Platform and Distribution
Archlinux
Mobile device
No response
Python version
3.9
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
Standalone code to reproduce the issue
Relevant log output
No response
The text was updated successfully, but these errors were encountered: