PerceptualSimilarity icon indicating copy to clipboard operation
PerceptualSimilarity copied to clipboard

Image normalisation before LPIPS evaluation

Open Pixie8888 opened this issue 4 years ago • 2 comments

Hi, I have a question about image normalisation before LPIPS evaluation. It seems that image must be normalised to [-1, 1] before evaluation? I saw some paper normalise image to [0,1] or use imagenet std and means to normalise, will they affect evaluation?

Pixie8888 avatar Oct 13 '21 12:10 Pixie8888

If your image is normalized to [0,1], turn on the normalize flag and the LPIPS.forward function will normalize it to [-1, 1]. The mean and std were adjusted to expect [-1, +1] https://github.com/richzhang/PerceptualSimilarity/blob/master/lpips/lpips.py#L150

richzhang avatar Oct 13 '21 15:10 richzhang

Have you solve this problem? @Pixie412 , I've met the same bug with you!

DISAPPEARED13 avatar Oct 19 '21 08:10 DISAPPEARED13