# [Learning Deep CNN Denoiser Prior for Image Restoration](http://www4.comp.polyu.edu.hk/~cslzhang/paper/IRCNN_CVPR17.pdf)
![visitors](https://visitor-badge.glitch.me/badge?page_id=cszn/IRCNN)
# PyTorch version
[https://github.com/cszn/DPIR](https://github.com/cszn/DPIR)
# Abstract
Model-based optimization methods and discriminative learning methods have been the two dominant strategies for solving various inverse problems in low-level vision.
Typically, those two kinds of methods have their respective merits and drawbacks, e.g., model-based optimization methods are flexible for handling different inverse problems but are usually time-consuming with sophisticated priors for the purpose of good performance; in the meanwhile, discriminative learning methods have fast testing speed but their application range is greatly restricted by the specialized task.
Recent works have revealed that, with the aid of variable splitting techniques, denoiser prior can be plugged in as a modular part of model-based optimization methods to solve other inverse problems (e.g., deblurring). Such an integration induces considerable advantage when the denoiser is obtained via discriminative learning. However, the study of integration with fast discriminative denoiser prior is still lacking. To this end, this paper aims to train a set of fast and effective CNN (convolutional neural network) denoisers and integrate them into model-based optimization method to solve other inverse problems. Experimental results demonstrate that the learned set of denoisers can not only achieve promising Gaussian denoising results but also can be used as prior to deliver good performance for various low-level vision applications.
# Basic Idea
With the aid of variable splitting techniques, such as alternating direction method of multipliers (ADMM) method and half quadratic splitting (HQS) method, it is possible to deal
with fidelity term and regularization term of general image restoration formulation separately, and particularly, the regularization term only corresponds to a denoising subproblem.
Consequently, this enables an integration of any discriminative denoisers into model-based optimization methods to solve various image restoration tasks, such as
- **Image Deblurring**
- **Image Inpainting**
- **Single Image Super-Resolution**
- **Color Image Demosaicking**
There is no additional training for these tasks.
# Half-Quadratic Splitting (HQS) Algorithm
<img src="figs/HQS.png" width="600px"/>
# Image Deblurring
The left is the blurred image. The right is the deblurred image by IRCNN with estimated kernels by other blind deblurring methods.
- Deblur_set1
<img src="testsets/Deblur_set1/Blurry4_1.png" width="350px"/> <img src="testsets/Deblur_set1/Blurry4_1_output_ircnn.png" width="350px"/> <img src="testsets/Deblur_set1/Blurry4_1_kernel.png" width="60px"/>
<img src="testsets/Deblur_set1/Blurry2_3.png" width="350px"/> <img src="testsets/Deblur_set1/Blurry2_3_output_ircnn.png" width="350px"/> <img src="testsets/Deblur_set1/Blurry2_3_kernel.png" width="60px"/>
- Deblur_set2
<img src="testsets/Deblur_set2/im01_ker02.png" width="350px"/> <img src="testsets/Deblur_set2/im01_ker02_ircnn.png" width="350px"/> <img src="testsets/Deblur_set2/im01_ker02_out_kernel.png" width="60px"/>
<img src="testsets/Deblur_set2/im04_ker01.png" width="350px"/> <img src="testsets/Deblur_set2/im04_ker01_ircnn.png" width="350px"/> <img src="testsets/Deblur_set2/im04_ker01_out_kernel.png" width="60px"/>
- Deblur_set3
<img src="testsets/Deblur_set3/2013622235456945_blur_79.png" width="350px"/> <img src="testsets/Deblur_set3/2013622235456945_blur_79_ircnn_Isigma_1_Msigma_1.png" width="350px"/> <img src="testsets/Deblur_set3/2013622235456945_blur_79_kernel.png" width="60px"/>
<img src="testsets/Deblur_set3/color_patch_blur_99.png" width="350px"/> <img src="testsets/Deblur_set3/color_patch_blur_99_ircnn_Isigma_1_Msigma_1.png" width="350px"/> <img src="testsets/Deblur_set3/color_patch_blur_99_kernel.png" width="60px"/>
<img src="testsets/Deblur_set3/IMG_1240_blur.png" width="350px"/> <img src="testsets/Deblur_set3/IMG_1240_blur_ircnn_Isigma_2_Msigma_7.png" width="350px"/> <img src="testsets/Deblur_set3/IMG_1240_blur_kernel.png" width="60px"/>
Use [Demo_deblur_real_application.m](Demo_deblur_real_application.m) to test IRCNN for image deblurring with estimated kernel by other blind deblurring methods.
# Image Inpainting
The left is the masked image. The right is the recovered image by IRCNN.
- Inpaint_set1
<img src="testsets/Inpaint_set1/butterfly_color_80_masked.png" width="350px"/> <img src="testsets/Inpaint_set1/butterfly_color_80_ircnn.png" width="350px"/>
<img src="testsets/Inpaint_set1/butterfly_gray_75_masked.png" width="350px"/> <img src="testsets/Inpaint_set1/butterfly_gray_75_ircnn.png" width="350px"/>
<img src="testsets/Inpaint_set1/09_50_masked.png" width="350px"/> <img src="testsets/Inpaint_set1/09_50_ircnn.png" width="350px"/>
- Inpaint_set2
<img src="testsets/Inpaint_set2/3ch.png" width="350px"/> <img src="testsets/Inpaint_set2/3ch_ircnn.png" width="350px"/> <img src="testsets/Inpaint_set2/3ch_mask.png" width="60px"/>
<img src="testsets/Inpaint_set2/new.png" width="350px"/> <img src="testsets/Inpaint_set2/new_ircnn.png" width="350px"/> <img src="testsets/Inpaint_set2/new_mask.png" width="60px"/>
Use [Demo_inpaint.m](./Demo_inpaint.m) and [Demo_inpaint_real_application.m](Demo_inpaint_real_application.m) to produce the above results.
# Single Image Super-Resolution (SISR)
#### IRCNN considers three degradation models for SISR.
#### 1. Bicubic degradation
```matlab
y = imresize(x, 1/sf, 'bicubic') % y: LR image; x: clean HR image; sf: scale factor
```
IRCNN for bicubic degradation has a comparable performance to VDSR and DnCNN.
Use [Demo_SISR_YCbCr.m](./Demo_SISR_YCbCr.m) and [Demo_SISR_RGB.m](./Demo_SISR_RGB.m) to produce the SISR results.
#### 2. Blurring by Gaussian kernel followed by downsampling
For scale factor 3,
```matlab
kernelsize = ceil(sigma*3)*2+1; % or 7 for sigma = 1.6
kernel = fspecial('gaussian',kernelsize,sigma);
blur_HR = imfilter(im,kernel,'replicate')
LR = imresize(blur_HR, 1/scale, 'nearest');
```
For scale factors 2 and 4,
```matlab
kernelsize = ceil(sigma*3)*2+2;
kernel = fspecial('gaussian',kernelsize,sigma);
blur_HR = imfilter(im, kernel,'replicate');
LR = blur_HR(scale/2:scale:end-scale/2,scale/2:scale:end-scale/2,:);
```
Use [Demo_SISR_YCbCr.m](./Demo_SISR_YCbCr.m) and [Demo_SISR_RGB.m](./Demo_SISR_RGB.m) to produce the SISR results.
#### 3. Blurring by ***arbitrary*** kernel followed by standard K-fold downsampler (matlab function '***downsample***')
```matlab
blur_HR = imfilter(im, kernel,'replicate'); % kernel can be arbitrary, such as motion blur, Gaussian blur.
for i = 1:size(x,3)
LR(:,:,i) = downsample(downsample(blur_HR(:,:,i),sf)',sf)';
end
```
More details on this degradation model can be found in the following paper.
[1] Chan, Stanley H., Xiran Wang, and Omar A. Elgendy. "Plug-and-Play ADMM for image restoration: Fixed-point convergence and applications." IEEE Transactions on Computational Imaging 3.1 (2017): 84-98.
The left is the zoomed LR image (x3) with motion blur kernel, the right is the super-resolved image (x3) by IRCNN.
<img src="figs/LR1.png" width="350px"/> <img src="figs/LR1_IRCNN.png" width="350px"/>
The left is the low-resolution (LR) image. The right is the super-resolved image by IRCNN.
- SISR_set1, synthetic LR image SR
<img src="testsets/SISR_set1/LR3_noisy_x2.png" width="160px"/> <img src="testsets/SISR_set1/LR3_noisy_x2_ircnn_x2.png" width="320px"/>
<img src="testsets/SISR_set1/LR1_motion_x2.png" width="240px"/> <img src="testsets/SISR_set1/LR1_motion_x2_ircnn_x2.png" width="480px"/>
- SISR_set2, real LR image SR
<img src="testsets/SISR_set2/chip.png" width="109px"/> <img src="testsets/SISR_set2/chip_ircnn_x2.png" width="218px"/> <img src="testsets/SISR_set2/ch
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随
资源推荐
资源详情
资源评论
收起资源包目录
毕业设计&课设-用于图像恢复的深度CNN去噪先验学习(CVPR,2017)(Matlab).zip (647个子文件)
01796.bmp 1.32MB
barbara.bmp 1.19MB
monarch.bmp 1.13MB
00870.bmp 1.05MB
ppt3.bmp 1017KB
01052.bmp 916KB
baby_GT.bmp 768KB
pepper.bmp 768KB
man.bmp 768KB
lenna.bmp 768KB
04477.bmp 706KB
baboon.bmp 703KB
zebra.bmp 672KB
00474.bmp 643KB
01247.bmp 629KB
01027.bmp 623KB
00246.bmp 617KB
00371.bmp 586KB
00563.bmp 570KB
flowers.bmp 530KB
00546.bmp 488KB
00081.bmp 469KB
01084.bmp 389KB
01574.bmp 378KB
coastguard.bmp 297KB
foreman.bmp 297KB
comic.bmp 265KB
bridge.bmp 257KB
bird_GT.bmp 243KB
woman_GT.bmp 230KB
head_GT.bmp 230KB
face.bmp 223KB
butterfly_GT.bmp 192KB
boat.jpg 839KB
summerhouse.jpg 538KB
hanzi.jpg 525KB
flower.jpg 230KB
26.blurred.jpg 110KB
Demo_SISR_direct_downsampler_RGB.m 9KB
Demo_SISR_direct_downsampler_YCbCr.m 8KB
Demo_SISR_direct_downsampler_real_application.m 7KB
Cal_PSNRSSIM.m 6KB
Demo_SISR_YCbCr.m 6KB
Demo_demosaiking.m 6KB
Demo_SISR_RGB_IRCNN_closedform_final.m 6KB
Demo_SISR_RGB.m 6KB
Demo_deblur.m 5KB
Demo_deblur_real_application.m 5KB
linearlcc.m 5KB
Demo_inpaint.m 4KB
Demo_inpaint_real_application.m 4KB
wrap_boundary_liu.m 4KB
Demo_denoising_color.m 3KB
Demo_denoising_gray.m 3KB
INVLS.m 3KB
mosaic_bayer.m 2KB
shepard_initialize.m 2KB
opt_fft_size.m 1KB
imresize_down.m 1KB
HXconv.m 982B
constructGGt.m 693B
defGGt.m 404B
proj.m 327B
modcrop.m 279B
center_replace.m 168B
center_crop.m 136B
loadmodel.m 120B
downsample2.m 116B
shave.m 110B
upsample2.m 110B
modelcolor.mat 18.93MB
modelgray.mat 18.7MB
Levin09.mat 31KB
README.md 13KB
boat_ircnn_Isigma_3_Msigma_13.png 2.03MB
26.blurred_ircnn_Isigma_8_Msigma_7.png 1.87MB
summerhouse_ircnn_Isigma_2_Msigma_11.png 1.77MB
hanzi_ircnn_Isigma_7_Msigma_1.png 1.25MB
flower_blurred.png 1.17MB
8_patch_use_ircnn_Isigma_7_Msigma_9.png 1.11MB
8_patch_use.png 1.06MB
blurry_2_small_ircnn_Isigma_11_Msigma_7.png 1.02MB
blurry_2_small.png 1.01MB
las_vegas_saturated_ircnn_Isigma_1_Msigma_1.png 1010KB
7_patch_use.png 993KB
Blurry4_1_output_ircnn.png 960KB
Blurry4_5_output_ircnn.png 955KB
7_patch_use_ircnn_Isigma_7_Msigma_11.png 950KB
Blurry4_2_output_ircnn.png 949KB
Blurry4_4_output_ircnn.png 938KB
Blurry4_3_output_ircnn.png 935KB
IMG_1240_blur_ircnn_Isigma_2_Msigma_7.png 933KB
Blurry4_6_output_ircnn.png 930KB
Blurry4_12_output_ircnn.png 921KB
Blurry4_7_output_ircnn.png 921KB
Blurry2_8_output_ircnn.png 909KB
Blurry2_4_output_ircnn.png 899KB
Blurry2_1_output_ircnn.png 896KB
Blurry4_9_output_ircnn.png 890KB
Blurry2_2_output_ircnn.png 882KB
共 647 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
白话机器学习
- 粉丝: 9231
- 资源: 7681
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功