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

Key space/depth operations commonly used in SISR models are missing #20622

Open
Artoriuz opened this issue Dec 10, 2024 · 0 comments
Open

Key space/depth operations commonly used in SISR models are missing #20622

Artoriuz opened this issue Dec 10, 2024 · 0 comments
Assignees
Labels
stat:awaiting keras-eng Awaiting response from Keras engineer type:feature The user is asking for a new feature.

Comments

@Artoriuz
Copy link

Hi! I would like to ask if it would be possible to add support for the depth to space and space to depth operations commonly found on many SISR models.

While you can achieve the same result with some clever usage of keras.ops.reshape and keras.ops.transpose, both TF and Pytorch offer them as easy to use functions:

https://www.tensorflow.org/api_docs/python/tf/nn/depth_to_space
https://www.tensorflow.org/api_docs/python/tf/nn/space_to_depth

https://pytorch.org/docs/stable/generated/torch.nn.PixelShuffle.html
https://pytorch.org/docs/stable/generated/torch.nn.PixelUnshuffle.html

I've been able to find the same operations in the PIX library as well:

https://dm-pix.readthedocs.io/en/latest/api.html#depth-and-space-transformations

This exact same depth to space transformation can be found in the following example:

https://keras.io/examples/vision/super_resolution_sub_pixel/

Thanks in advance =)

@dhantule dhantule added type:feature The user is asking for a new feature. keras-team-review-pending Pending review by a Keras team member. labels Dec 11, 2024
@VarunS1997 VarunS1997 self-assigned this Dec 12, 2024
@sachinprasadhs sachinprasadhs added stat:awaiting keras-eng Awaiting response from Keras engineer and removed keras-team-review-pending Pending review by a Keras team member. labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting keras-eng Awaiting response from Keras engineer type:feature The user is asking for a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants