boschresearch/OASIS

Replicate lpips results from paper

marl917 opened this issue · 2 comments

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 ?

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.

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 )