CenterCrop after Resize with the same size value #7042
Closed
tolgacangoz
started this conversation in
General
Replies: 1 comment 1 reply
-
parser.add_argument(
"--resolution",
type=int,
default=512,
help=(
"The resolution for input images, all the images in the train/validation dataset will be resized to this"
" resolution"
),
) transforms.Resize(args.resolution)
transforms.CenterCrop(args.resolution)
So in short, Is necessary if the image is not a square image, resize maintains the aspect ratio of the image. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
diffusers
community,I wonder what is the reason for using
transforms.CenterCrop(size)
aftertransforms.Resize(size)
with the same values. Isn't CenterCrop(size) unnecessary? Example.Beta Was this translation helpful? Give feedback.
All reactions