Comments (8)
You can use the 'imresize' function in my code which gets the HR and the kernel and downscales it.
from kernelgan.
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.
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.
What function are you using to get the LR from the HR+kernel?
from kernelgan.
fileter.correlate(), the same as your provided code.
from kernelgan.
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.
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.
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)
- X4 kernel specs in DIV2KRK HOT 1
- It seems like a bug?
- UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize HOT 5
- RuntimeError: cuDNN error: CUDNN_STATUS_BAD_PARAM HOT 2
- network parameter asking HOT 6
- Why do you swap axis? HOT 2
- why not directly save the params of Generator for downscaling? why not non-linear? HOT 3
- Question about the DownScaleLoss HOT 1
- About DIV2KRK HOT 1
- about Generator and Discriminator output size HOT 5
- Questions about generator networks HOT 2
- How do you generate such an image? HOT 8
- How do you visualize the ".mat" files HOT 3
- There was a problem with training in another data set HOT 1
- How to gain the PSNR and SSIM HOT 2
- What's the meaning of "input-dir" and "input_img_path"
- Is your training data set the same as your test set HOT 2
- Why there needs flip orperation when calculate the kernel ? HOT 1
- No file .mat HOT 1
- ValueError: shapes (512,512,1) and (3,) not aligned: 1 (dim 2) != 3 (dim 0) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kernelgan.