-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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 more transform examples in gallery #3698
Conversation
Added as per below PR #3688 |
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 @harishsdev ! I made a few comments but this looks good.
The docs seem to not compile properly, you can build them locally to check any potential issue by following the instructions here: https://github.com/pytorch/vision/blob/master/CONTRIBUTING.md#documentation
gallery/plot_transforms.py
Outdated
# RandomHorizontalFlip | ||
# ------------ |
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.
The doc building is failing because the underline ---
is shorter than the title. Would you mind fixing these so that every title matches the underline (here and everywhere else)
gallery/plot_transforms.py
Outdated
plot(randomcrop_img, "Random Cropped transformed image") | ||
|
||
#################################### | ||
# RandomGrayscale |
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 the Grayscale
transform is very similar and already documented above, I think we don't need a new section for this one. How about just adding (addition in bold) above:
(see also to_grayscale and RandomGrayscale)
make sure that the links are properly rendered, you'll need to use :class:`~torchvision.transforms.RandomGrayScale`
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 @NicolasHug removed RandomGrayscale
gallery/plot_transforms.py
Outdated
# The :class:`~torchvision.transforms.RandomCrop` transform | ||
# (see also :func:`~torchvision.transforms.functional.crop`) | ||
# performs random crop transform on an image. | ||
randomcrop_img = T.RandomCrop(size=(128, 128))(orig_img) |
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.
nitpick: here and in other places:
randomcrop_img = T.RandomCrop(size=(128, 128))(orig_img) | |
random_crop_img = T.RandomCrop(size=(128, 128))(orig_img) |
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 @NicolasHug done for all the variables as per your suggestion
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 @harishsdev ! I pushed some minor changes / fixes in the last 2 commits. LGTM!
Examples for Image transformations