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

The result is low ? #26

Open
chenkang455 opened this issue Jul 16, 2024 · 1 comment
Open

The result is low ? #26

chenkang455 opened this issue Jul 16, 2024 · 1 comment

Comments

@chenkang455
Copy link

Hi @zwx8981 @guspan-tanadi , i use the following code to test the LIQE metric, though the img is sharp, the liqe result seems relatively low, can you be kindly explain it?

import torch
import cv2
import torch.nn.functional as F
import pyiqa
iqa_metric = pyiqa.create_metric("liqe_mix", device="cuda")
img = cv2.imread('exp/REDS_cs_final/final_iter10/imgs/010_0010_sharp.png')
img = torch.tensor(img)[:,:,0]
img = img[None,None].cuda() / 255
short_edge = 384
h,w = img.shape[2],img.shape[3]
if h < w:
    new_h, new_w = short_edge, int(w * short_edge / h)
else:
    new_h, new_w = int(h * short_edge / w), short_edge
img = F.interpolate(img, size=(new_h, new_w), mode='bilinear', align_corners=False)
print(img.shape)
print(iqa_metric(img))
del img

torch.Size([1, 1, 384, 614])
tensor([1.5381], device='cuda:0')

010_0010_sharp

@zwx8981
Copy link
Owner

zwx8981 commented Jul 16, 2024

Hi, I think it is partially because this is a grayscale image. While LIQE is exposed to RGB images during training, there is some domain gap.

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

2 participants