在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):cszn/IRCNN开源软件地址(OpenSource Url):https://github.com/cszn/IRCNN开源编程语言(OpenSource Language):MATLAB 99.9%开源软件介绍(OpenSource Introduction):Learning Deep CNN Denoiser Prior for Image RestorationPyTorch versionAbstractModel-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 IdeaWith 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
There is no additional training for these tasks. Half-Quadratic Splitting (HQS) AlgorithmImage DeblurringThe left is the blurred image. The right is the deblurred image by IRCNN with estimated kernels by other blind deblurring methods.
Use Demo_deblur_real_application.m to test IRCNN for image deblurring with estimated kernel by other blind deblurring methods. Image InpaintingThe left is the masked image. The right is the recovered image by IRCNN.
Use Demo_inpaint.m and Demo_inpaint_real_application.m to produce the above results. Single Image Super-Resolution (SISR)IRCNN considers three degradation models for SISR.1. Bicubic degradationy = 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 and Demo_SISR_RGB.m to produce the SISR results. 2. Blurring by Gaussian kernel followed by downsamplingFor scale factor 3, 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, 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 and Demo_SISR_RGB.m to produce the SISR results. 3. Blurring by arbitrary kernel followed by standard K-fold downsampler (matlab function 'downsample')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. The left is the low-resolution (LR) image. The right is the super-resolved image by IRCNN.
Use Demo_SISR_direct_downsampler_real_application.m to produce the above SISR results. Color Image DemosaickingThe left is the mosaiced image. The right is the demosaiced image by IRCNN.
Use Demo_demosaiking.m to produce the above results. Requirements and Dependencies
kusiwu)Example: Installation of CUDNN5.1, CUDA 8.0 GA2 and Matconvnet (Windows 7 64bit) (byDownload Visual studio 2015 and install it. Download and install cuda 8.0 GA2: There is two installer, one is base installer and the other one is patch. You should download all of them. https://developer.nvidia.com/cuda-80-ga2-download-archive First install base installer (1.3GB) and then install patch (43.1MB) My cuda install path is: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0'. You may need to add path CUDA_PATH if the setup does not do that. (as environment variable) Download cudnn5.1. You should register to nvidia and download cudnn 5.1. Search in google please. Then you should extract the zip into "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0" (See http://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html) Installations may need reboot. %Download matconvnet http://www.vlfeat.org/matconvnet/download/matconvnet-1.0-beta25.tar.gz %create a directory named as "matconvnet" inside your matlab directory. %My matlab directory is = "D:\Program files\MATLAB\R2016b" , yours may differ, please change yours. %then extract matconvnet zip file and copy the file into "D:\Program files\MATLAB\R2016b\matconvnet\matconvnet-1.0-beta25" %open matlab, all the below codes should be written into matlab command window. %write : in your case, the path can be different !!! Select visual studio 2015 path both C and C++ compiler.
%you will see lots of these messages and also many warnings may occur.
%write this
%Lets test the system.
%You will see messages like that this test may take 10 -20minute.
Testing IRCNN DemosUnzip IRCNN into a folder named for example: D:\IRCNN The last step, open matlab command window and write these,
Citation @inproceedings{zhang2017learning,
title={Learning Deep CNN Denoiser Prior for Image Restoration},
author={Zhang, Kai and Zuo, Wangmeng and Gu, Shuhang and Zhang, Lei},
booktitle={IEEE Conference on Computer Vision and Pattern Recognition},
pages={3929--3938},
year={2017},
} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论