shadyabh / Correction-Filter

76 stars 8 forks source link

Correction-Filter

The official implementation of the work "Correction Filter for Single Image Super-Resolution: Robustifying Off-the-Shelf Deep Super-Resolvers" (https://arxiv.org/abs/1912.00157 , Accepted to CVPR 2020 - oral)

Non-Blind

  1. Downsample images and put into folders according to which down-sampling filter was used (it is recommended to use '.mat' for saving the LR images).
  2. Define the sampling and reconstruction basis (s and r) in "correct_imgs.py" (lines 25-33).
  3. Run: python correct_imgs.py --in_dir "Directory to the folder of the LR images" --out_dir "Directory of where to save the corrected images" --scale_factor "SR scale factor".
  4. Run any off-the-shelf deep SR network trained using r (usually bicubic) on the images saved to out_dir

Note that this code assumes that the images within a folder are sampled using the same kernel.

Blind

  1. Define the SR network in "estimate_correction.py".
  2. Run: estimate_correction.py --scale_factor "SR scale factor" --in_dir "Directory of the LR images" --out_dir "Directory to save the LR corrected images in it"
  3. Run any off-the-shelf deep SR network trained using r (usually bicubic) on the images saved to out_dir

Citation:

@ARTICLE{correction_filter,
  author = {{Abu Hussein}, Shady and {Tirer}, Tom and {Giryes}, Raja},
  title = "{Correction Filter for Single Image Super-Resolution: Robustifying Off-the-Shelf Deep Super-Resolvers}",
  journal = {In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  year = "2020"
}

Results

Non-Blind Super-Resolution

Non-blind super-resolution with scale factor of 4 on Gaussian model with std 4.5/sqrt(2) (left is DBPN without correction, right is with correction filter)

Non-blind super-resolution with scale factor of 2 on Gaussian model with std 2.5/sqrt(2) (left is DBPN without correction, right is with correction filter)

Blind Super-Resolution

Synthetic Images

Here we demonstrate the performance of our method on images that were sampled from their ground-truth image.

Man image from Set14

Blind super-resolution with scale factor of 4 on Gaussian model with std 4.5/sqrt(2) (left is DBPN without correction, right is with estimated correction filter)

Images from DIV2KRK dataset

Blind super-resolution with scale factor of 2 tested on images from DIV2KRK dataset http://www.wisdom.weizmann.ac.il/~vision/kernelgan/ (left is DBPN without correction, right is with estimated correction filter)

Real-World Super-Resolution

Here we present the results of our approach on images with no ground-truth images

Images from Set5 dataset

Here we take images from Set5 and apply our blind SR (scale factor of 2) algorithm on them directly (without down-sampling them).

On the left is DBPN without correction, right is with estimated correction filter.

Chip image

Super resolution with scale factor of 4 on the famous chip image. On the left is the original LR image, in the middle is the result of DBPN applied directly, and on the right is DBPN applied with the estimated correction filter.