-
Couldn't load subscription status.
- Fork 7.2k
Added docs for v2 transforms (part 1) #7297
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
| v2.ToPILImage | ||
| v2.ToImagePIL | ||
| ToTensor | ||
| v2.ToTensor |
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.
Since it is deprecated, should we document it?
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.
It seems that ToImageTensor is missing from the list.
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.
Since it is deprecated, should we document it?
Some thoughts here https://github.com/pytorch/vision/pull/7297/files#r1113244517
It seems that ToImageTensor is missing from the list.
I did not add any new v2 transforms here, so that's normal
| PILToTensor | ||
| v2.PILToTensor | ||
| ConvertImageDtype | ||
| v2.ConvertImageDtype |
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.
Same as above. Just an alias for ConvertDtype
torchvision/transforms/v2/_color.py
Outdated
|
|
||
|
|
||
| class Grayscale(Transform): | ||
| """[BETA] Convert image to grayscale. |
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.
| """[BETA] Convert image to grayscale. | |
| """[BETA] Convert images or videos to grayscale. |
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.
Applies to every color transform
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.
(un-resolving because I didn't apply that to the rest of the color transforms yet)
|
|
||
|
|
||
| class RandomHorizontalFlip(_RandomApplyTransform): | ||
| """[BETA] Horizontally flip the given image/box/mask randomly with a given probability. |
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.
video is missing here as well
| .. note:: | ||
| In torchscript mode padding as single int is not supported, use a sequence of | ||
| length 1: ``[padding, ]``. |
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.
This comes up multiple times. Same question as above: should we document this at all?
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.
stamped
Co-authored-by: vfdev <[email protected]> Co-authored-by: Philip Meier <[email protected]>
|
Thanks @pmeier @vfdev-5 for the review - I'll merge now to unblock upcoming PRs, but there are outstanding comments that I haven't addressed (yet) in this PR. We'll address them in the next few PRs to come. I marked the alread-addressed comments as resolved, so we just need to check the un-resolved ones. |
|
Hey @NicolasHug! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Co-authored-by: vfdev <[email protected]> Co-authored-by: Philip Meier <[email protected]>
Summary: Reviewed By: vmoens Differential Revision: D44416569 fbshipit-source-id: 03689b20c6de2afe3971b3e41e1f74ef1845b53f Co-authored-by: vfdev <[email protected]> Co-authored-by: Philip Meier <[email protected]>
This PR adds docs for the v2 transforms that already exist in v1. I haven't tackled the new ones yet.
I jsut copy/pasted the docstrings and added:
[BETA]header in the first line.. betastatus::sphinx directive