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

Why do HR and LR have the same resolution? #23

Open
TZYSJTU opened this issue Apr 28, 2021 · 1 comment
Open

Why do HR and LR have the same resolution? #23

TZYSJTU opened this issue Apr 28, 2021 · 1 comment

Comments

@TZYSJTU
Copy link

TZYSJTU commented Apr 28, 2021

Why do HR and LR have the same resolution?
How to calculate Bicubic baseline since HR and LR are the same size?
Thanks!

@HolmesShuan
Copy link

HolmesShuan commented Sep 28, 2021

@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!

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