Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Replicate lpips results from paper #16

Closed
marl917 opened this issue Dec 14, 2021 · 2 comments
Closed

Replicate lpips results from paper #16

marl917 opened this issue Dec 14, 2021 · 2 comments

Comments

@marl917
Copy link

marl917 commented Dec 14, 2021

Hi, thanks for the great work! Could you please specify which lpips model and version you used to replicate LPIPS results you report in the paper ?

@SushkoVadim
Copy link
Contributor

Hi,

As far as I could see in our evaluation scripts, we used the official LPIPS repository and used the VGG network:
lpips_net = PerceptualLoss(model='net-lin', net='vgg', use_gpu=True, gpu_ids=[0])

@edgarschnfld please correct me if I am wrong.

@edgarschnfld
Copy link
Contributor

Hi,

Yes, we used the official LPIPS repository. There has been an API change (see richzhang/PerceptualSimilarity#79), so use

# pip install lpips
from lpips import LPIPS

lpips_metric = LPIPS(net='vgg').cuda()
lpips_score = lpips_metric(image_1, image_2)  

The default value for the 'version' argument of LPIPS is '0.1', so I would guess the network version has not changed since then.

If you are also interested in the MS-SSIM: https://pypi.org/project/pytorch-msssim/

# pip install pytorch-msssim 
from pytorch_msssim import ms_ssim
ms_ssim_score = ms_ssim(image_1, image_2, data_range=1, size_average=False )  

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

No branches or pull requests

4 participants