RealSR icon indicating copy to clipboard operation
RealSR copied to clipboard

How to reproduce Bicubic baseline results?

Open HolmesShuan opened this issue 2 years ago • 0 comments

@csjcai @TZYSJTU Hi, I encounter the same problem. How to reproduce the Bicubic results reported in the paper?

I use the modified test code to evaluate the Version 1 dataset.

clear; clc; close all; warning off;
addpath(genpath('./.'));

count = 1;
folder2 = ['./Test/2'];
filepathsHR =  [];
filepathsHR = cat(1,filepathsHR, dir(fullfile(folder2, 'HR', '*.png')));
filepathsLR =  [];
filepathsLR = cat(1,filepathsLR, dir(fullfile(folder2, 'LR', '*.png')));

for i = 1 : 1: length(filepathsHR)
    disp(filepathsHR(i).name)
    disp(filepathsLR(i).name)
    HR = imread(fullfile(folder2,'HR',filepathsHR(i).name));
    HR_Ycbcr = im2double(rgb2ycbcr(HR));
    HR_Y = im2single(HR_Ycbcr(:, :, 1));

    LR = imread(fullfile(folder2,'LR',filepathsLR(i).name));
    LR_Ycbcr = im2double(rgb2ycbcr(LR));
    LR_Y = im2single(LR_Ycbcr(:, :, 1));

    [PSNRCur, SSIMCur] = Cal_PSNRSSIM(im2uint8(HR_Y),im2uint8(LR_Y), 0, 0);
    PSNRs(count) = PSNRCur;
    SSIMs(count) = SSIMCur;
    count = count + 1;
end

length(PSNRs)
mean(PSNRs)
mean(SSIMs)

I have reorganized Test folder as follow:

./Test/2/HR/Canon_XXX_HR.png
./Test/2/LR/Canon_XXX_LR2.png
./Test/3/HR/Canon_XXX_HR.png
./Test/3/LR/Canon_XXX_LR3.png
./Test/4/HR/Canon_XXX_HR.png
./Test/4/LR/Canon_XXX_LR4.png
Scale Reported Reproduced Diff
x2 32.61 32.12 -0.49
x3 29.34 28.97 -0.37
x4 27.99 27.59 -0.40

Thanks in advance!

Originally posted by @HolmesShuan in https://github.com/csjcai/RealSR/issues/23#issuecomment-928947198

HolmesShuan avatar Sep 28 '21 07:09 HolmesShuan