scratchai icon indicating copy to clipboard operation
scratchai copied to clipboard

Resize - Aspect Ratio

Open oguz417 opened this issue 5 years ago • 0 comments

The resize implementation under get_trf uses val = (int(trf[2:]), int(trf[2:])) This does not keep the aspect ratio, which is a problem in rectangle size inputs. val = int(trf[2:]) will solve it, since torch resize already handles it. https://pytorch.org/vision/stable/transforms.html "If size is an int, smaller edge of the image will be matched to this number."

oguz417 avatar Apr 01 '21 14:04 oguz417