-
Notifications
You must be signed in to change notification settings - Fork 7.1k
torchvision.transforms.functional.adjust_hue does not respect alpha channel #3219
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
Comments
@jamespltan Thanks for reporting this. You are right to say that the Extending support and providing a proper and consistent solution across both backends is not trivial and will require storing additional meta-data about the images (for example their mode in case of tensors). This definitely requires additional discussion, so before tackling that "beast" I think it would be best to improve the current situation by:
Any contribution that addresses the above 3 points would be highly appreciated. |
Yeah I forgot to mention that in the doc... Maybe I can do the listed 3 points tomorrow to make up for it. |
That would be awesome @voldemortX, thank you. There might be more limitations on the adjust_* methods that we don't clearly mention. |
Many thanks my dudes 🙏 |
i want to fix this problem,any proposal?i just fix the same question in numpy,but,because it dosn't using gpu,seems like inefficient using for pyqt animation.so i need more efficiency solution,like use pytorch, think it is are not big issues,just copy alpha channel to result, @datumbox any good idea?, forget me dosn't really skilled the grammar with torchvision,and i ask a same questoin in here |
🐛 Bug
when working with RGBA images, the adjust_hue function does not seem to respect the alpha channel and imposes a max_value of 255 after the transform. Taking a quick look at the source code, it seems that the image is immediately converted to HSV without retaining the alpha channel. It should be a quick fix to retain the alpha channel and include it when merging back into RGBA.
To Reproduce
Steps to reproduce the behavior:
cc @vfdev-5
The text was updated successfully, but these errors were encountered: