-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add a GrayscaleToRgb transform that can expand channels to 3 #8247
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8247
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit b2daebd with merge base fa82fd3 (): FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @ahmadsharif1 ! I think there's a small issue where the images are in fact converted to grayscale instead of being preserved as RGB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @ahmadsharif1 , just one minor comment below but this looks good. Maybe you can undraft the PR?
Now it's time to bikeshed about the name. I'm tempted to just call that ToRGB()
instead of GrayScaleToRGB()
so that it can be called at the beginning of every pipeline without suggesting that the input has to be grayscale...
I can change it to I am happy to just go with |
As discussed offline, we should just try to be consistent with the existing transforms here (even though the existing transforms themselves are not completely consistent...).
Also before merging we'll have to add the transform and the functional to the docs here and here. To check for docs rendering you can either check out instructions in the contributing guide, or (probably easier for now) just wait for the CI job to be done and then check from #8247 (comment) |
Hey @ahmadsharif1! You merged this PR, but no labels were added. |
…#8247) Reviewed By: vmoens Differential Revision: D55062789 fbshipit-source-id: f98564a1276abccf2a0a126c6fa8846b93652cf6
This is for issue #8186.
GrayscaleToRgb transform can take a grayscale image and expand it to 3 channels, with the same values for R, G and B.
cc @vfdev-5