Is there any function in PyTorch to scale images without padding in Transforms by keeping the aspect ratio?

Is there any function in PyTorch to scale images without padding in Transorms by keeping the aspect ratio?

1 Like
Yes `transforms.Resize`. https://pytorch.org/docs/stable/torchvision/transforms.html#torchvision.transforms.Resize

courtesy- @aakashns