sunreef / BlindSR

Independent implementation of the algorithm from the paper "Blind Image Super-Resolution with Spatially Variant Degradations"
GNU General Public License v3.0
59 stars 9 forks source link

What is the spatial variant degradation kernel? #2

Closed mdyao closed 4 years ago

mdyao commented 4 years ago

Thanks for your work. I have read your paper and run your code to get a good result. But I don't understand

“We can have a single degradation kernel for the whole image or have one kernel per pixel in the image. This lets us handle the case of spatially-variant degradations. ”

in Section 3.3. I think it means the algorithm provides each pixel a degradation kernel to touch the "spatial variant". But I don't find related codes in implementation. And the output kernel is only on the 15*15 patch. Could you explain it more?

thx.

sunreef commented 4 years ago

This repository does not contain the original code used in the paper. It's an independent reimplementation I wrote afterwards and it is missing some parts.

Most notably, there is no notion of spatially-variant kernel in this repository for now. I might add it in the future if I find some free time to work on it as I do not have access to the original code anymore.

The 15*15 kernel you get as output is an estimate assuming that your degradation is uniform over the whole image.

mdyao commented 4 years ago

@sunreef thanks, another two questions.

  1. Should the network be re-trained in the case of predicting one kernel per pixel? Or only adjust the test code?
  2. What is the time cost of one kernel per pixel? Current test time for a single image is much longer than other SR networks because of the optimization during the test stage. Would "one kernel per pixel" be slower than current version?
sunreef commented 4 years ago
  1. The network does not need to be re-trained. Only the test function changes. The whole degradation map becomes the variable during the test optimization.
  2. The cost of per-pixel optimization is higher than the single kernel but not by much. I don't have the exact figures in mind but expect a 30%-40% overhead. Overall, our algorithm is not so fast in processing images because speed was never a main focus during development.
mdyao commented 4 years ago

BTW, could you please provide the hr image of BlindSR/input/8068.jpg?

sunreef commented 4 years ago

There is no ground-truth HR image here. The image in the input folder was not downsampled (at least we did not downsample it ourselves).