Git Product home page Git Product logo

Comments (8)

sefibk avatar sefibk commented on August 11, 2024 1

You can use the 'imresize' function in my code which gets the HR and the kernel and downscales it.

from kernelgan.

sefibk avatar sefibk commented on August 11, 2024

The code provided generates RANDOM kernel, therefore random corresponding LR images. If you want ours, simply use the dataset we provided. Not sure I understand your issue

from kernelgan.

greatlog avatar greatlog commented on August 11, 2024

I mean that your dataset has also provided 'gt_k_x2' and 'gt_k_x4', but I can not re-generate the dataset with your provided kernels. You may have made a mistake about the provided kernels in your dataset.

from kernelgan.

sefibk avatar sefibk commented on August 11, 2024

What function are you using to get the LR from the HR+kernel?

from kernelgan.

greatlog avatar greatlog commented on August 11, 2024

fileter.correlate(), the same as your provided code.

from kernelgan.

MeLonJ10 avatar MeLonJ10 commented on August 11, 2024

Hi, @greatlog. Did you get the consistent LR?
I try to get LR using the following code. However, it does not match LR provided in official DIV2KRK.

ker = sio.loadmat("e:/Dataset/SR/DIV2KRK/gt_k_x2/kernel_1.mat")['Kernel']
hr = cv2.imread("e:/Dataset/SR/DIV2KRK/gt/img_1_gt.png")
lr = cv2.imread("e:/Dataset/SR/DIV2KRK/lr_x2/im_1.png")
lr_my = imresize(hr, 1/2, kernel=ker)
err = np.mean(np.abs(np.float32(lr) - np.float32(lr_my)))

err: 2.51
@sefibk May you offer me some help. Thank you so much.

from kernelgan.

greatlog avatar greatlog commented on August 11, 2024

Hi, @greatlog. Did you get the consistent LR?
I try to get LR using the following code. However, it does not match LR provided in official DIV2KRK.

ker = sio.loadmat("e:/Dataset/SR/DIV2KRK/gt_k_x2/kernel_1.mat")['Kernel']
hr = cv2.imread("e:/Dataset/SR/DIV2KRK/gt/img_1_gt.png")
lr = cv2.imread("e:/Dataset/SR/DIV2KRK/lr_x2/im_1.png")
lr_my = imresize(hr, 1/2, kernel=ker)
err = np.mean(np.abs(np.float32(lr) - np.float32(lr_my)))

err: 2.51
@sefibk May you offer me some help. Thank you so much.

I can not get the consistent LR either. There seems to be some slight bias in the provided kernels or the processing method. This slight difference may not cause visual differences, however, it may heavily influence the results of a neural model. I have not fixed the problem yet. So I did not use the provided kernels as GT kernels.

from kernelgan.

sefibk avatar sefibk commented on August 11, 2024

Weird - IDK exactly why.
I was not the one that created this dataset.
You can find a detailed Git repo for the dataset here - https://github.com/assafshocher/BlindSR_dataset_generator

from kernelgan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.