JingyunLiang / HCFlow

Official PyTorch code for Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling (HCFlow, ICCV2021)

Home Page:https://arxiv.org/abs/2108.05301

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code versions of BRISQUE and NIQE used in paper

xmyhhh opened this issue · comments

commented

Hi,
I have run performance tests with the Matlab versions of the NIQE and BRISQUE codes and found deviations from the values reported in the paper.
Could you please provide a link to the code you used?
thanks a lot~

try;
path_input = 'results'
paths = dir(fullfile(path_input, '*.png') );
niqe_all = zeros(1, length(paths));
brisque_all = zeros(1, length(paths));
piqe_all = zeros(1, length(paths));

%for i = 1:length(paths)
parfor (i = 1:length(paths), 16)
    path = fullfile(paths(i).folder, paths(i).name);
    img = imread(path);

    s = size(img);
    if s(1) == 160 & s(2) == 160
        img = [img, img(:,end:-1:1,:); img(end:-1:1,:,:), img(end:-1:1,end:-1:1,:)];
    end

    niqe_all(i) = niqe(img);
    brisque_all(i) = brisque(img);
    piqe_all(i) = piqe(img);
    %fprintf('-%d-%.2f-%.1f-%.1f\n', i, niqe_all(i), brisque_all(i), piqe_all(i))
end

fprintf('\n %s, %d images', path_input, length(paths))
fprintf('\n average niqe: %.2f, brisque: %.1f, piqe: %.1f\n', mean(niqe_all), mean(brisque_all), mean(piqe_all))

catch; end; quit