mmgeneration icon indicating copy to clipboard operation
mmgeneration copied to clipboard

height and width in Resize pipeline are misplaced

Open makecent opened this issue 2 years ago • 2 comments

Reproduction

from mmgen.datasets.pipelines import Resize, LoadImageFromFile
results = {'real_img_path': 'path-to-img/0001.jpg'}
t = LoadImageFromFile(key='real_img', io_backend='disk')(results)
tt = Resize(keys=['real_img'], scale=(128, 32), keep_ratio=False)(t)

Bug fix I think it's because mmcv.imresize uses (width, heights) for the scale argument.

makecent avatar Jan 08 '22 12:01 makecent

Hey @makecent , thanks for your interest in our project. We will fix this recently. We would also be glad that if you could create a pull request to fix this.

LeoXing1996 avatar Jan 08 '22 14:01 LeoXing1996

Hey @makecent , thanks for your interest in our project. We will fix this recently. We would also be glad that if you could create a pull request to fix this.

I just made a PR.

makecent avatar Jan 09 '22 09:01 makecent