Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image normalisation before LPIPS evaluation #83

Open
Pixie8888 opened this issue Oct 13, 2021 · 2 comments
Open

Image normalisation before LPIPS evaluation #83

Pixie8888 opened this issue Oct 13, 2021 · 2 comments

Comments

@Pixie8888
Copy link

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?

@richzhang
Copy link
Owner

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

@DISAPPEARED13
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants