GaParmar / clean-fid

PyTorch - FID calculation with proper image resizing and quantization steps [CVPR 2022]
https://www.cs.cmu.edu/~clean-fid/
MIT License
943 stars 72 forks source link

fixed bug in resize.py #28

Closed ShlomoStept closed 2 years ago

ShlomoStept commented 2 years ago

fixed bug by PIL case where quantize_after = False case, where the s1 and s2 output sizes are switched, this causes the image to be warped when the width and height { from output_size=(width, height) } are not equal

-- rather than changing the image to be (width, height) it reshapes it to (height, width), after already resizing it to (width, height), this causes warping and other issues