Toward Convolutional Blind Denoising of Real Photographs

Toward Convolutional Blind Denoising of Real Photographs

Paper:http://openaccess.thecvf.com/content_CVPR_2019/papers/Guo_Toward_Convolutional_Blind_Denoising_of_Real_Photographs_CVPR_2019_paper.pdf
Code:https://github.com/GuoShi28/CBDNet
(阅读笔记,能力有限,如有不当,敬请谅解)

1.Main idea

  • 为了增加深度卷积神经网络的泛化性,训练一个卷积盲去模糊(预先不知道模糊核的去噪方法)的去噪网络,其中网络输入更多的真实的图片队。
    In order to improve the generalization ability of deep CNN denoisers, we suggest training a convolutional blind denoising network (CBDNet) with more realistic noise model and real-world noisy-clean image pairs.
  • 针对处理的噪声(噪声的来源):信号相关噪声,照相机内处理信号的噪声。
    On the one hand, both signal dependent noise and in-camera signal processing pipeline is considered to synthesize realistic noisy images. On the other hand, real-world noisy photographs and their nearly noise-free counterparts are also included to train our CBDNet.
  • 在CBDNet中嵌入了具有非对称学习的噪声估计子网,以抑制噪声水平的过低估计。
    a noise estimation subnetwork with asymmetric learning to suppress under-estimation of noise level is embedded into CBDNet.
  • 应用了不对称损失。
  • 评价衡量的方式:定性和定量。quantitative metrics and perceptual quality,

2.Problem(Issue)

  • 只有训练高斯白噪声图片对的一些网络在面对复杂的噪声来源时候,效果会很差。(如电流噪声,短噪声,热噪声)同时当遇到照相机拍摄,其内部信号处理的过程中,也会产生噪声。
  • 其次,如果知道噪声的分布来用CNN去噪,即是非盲去噪,会造成过度的平滑。这也是CNN只是用来记住高斯噪声的分布,去过拟合了这个噪声,而缺少对真实图像的泛化性。CNN的成功主要是能够匹配学习到的噪声分布。
    On the other hand, deep denoisers for non-blind AWGN removal would smooth out the details while removing the noise.

3.Contribution(论文贡献的总结)

  • 提出了一个处理真实图像噪声的网络方法。
    A realistic noise model is presented by considering both heteroscedastic Gaussian noise and in-camera processing pipeline, greatly benefiting the denoising performance.
  • 合成了噪点图像和真实的噪点照片。
    Synthetic noisy images and real noisy photographs are incorporated for better characterizing real-world image noise and improving denoising performance.
  • 提出了噪声估计子网络,同时可以人机交互式的调整噪声等级来进行去噪。
    Benefited from the introduction of noise estimation subnetwork, asymmetric loss is suggested to improve the generalization ability to real noise, and interactive denoising is allowed by adjusting the noise level map.

4.Proposed Method

提出的方法主要也是包括几个方面,网络结构,损失函数,真实噪声图像模型。

4.1 Architecture

主要包括两个部分:噪声估计子网络 CNNECNN_E非盲去噪子网络 CNNDCNN_D

  • 噪声估计网络用来估计输出噪声的等级映射。其中σ^\hat{\sigma}就是是噪声的等级,yy是噪声图像,FE\mathcal {F}_{E}就是整个网络,而且WEW_{E}就是网络的参数。
    σ^(y)=FE(y;WE) \hat{\sigma}(y)=\mathcal {F}_{E}(y;W_{E})
    CNNECNN_E就是五层的全卷积网络。也没有池化,没有BN。
  • 噪声估计网络用来估计输出噪声的等级映射。将噪声图片yy和噪声等级σ^(y)\hat{\sigma}(y)同时输入网络得到最终结果x^\hat{x}。Notes:其中噪声等级σ^(y)\hat{\sigma}(y)其实是允许人为预先调节的。即ϱ^(y)=γσ^(y)\hat{\varrho}(y) =\gamma*\hat{\sigma}(y)
    x^=FD(y,σ^(y);WD) \hat{x}=\mathcal {F}_{D}(y,\hat{\sigma}(y);W_{D})
    CNNDCNN_D就是U-net。
    Toward Convolutional Blind Denoising of Real Photographs

4.2 Loss(损失函数)

4.2.1 Asymmetric Loss(非对称损失)

非盲去噪模型对噪声等级很敏感,提出不对称损失来避免噪声等级的估计错误。σ^(yi)\hat{\sigma}(y_i)是估计的噪声等级(在像素ii处),σ(yi)\sigma(y_i)是真实的水平。当估计的噪声等级小于真实的水平时,应当增加更大惩罚力度。也就是说非对称的意思就是在均方差MSEMSE时候一边要惩罚得多一点,一边要惩罚得少一点。下面用数学得方式进行了表述。
Lasymm=iαI(σ^(yi)σ(yi))×(σ^(yi)σ(yi))2 \mathcal {L}_{asymm}=\sum_i|\alpha-\mathbb{I_{(\hat{\sigma}(y_i)-\sigma(y_i))}}| \times (\hat{\sigma}(y_i)-\sigma(y_i))^2
α\alpha的设置一般为0到0.5之间,I(σ^(yi)σ(yi))\mathbb{I_{(\hat{\sigma}(y_i)-\sigma(y_i))}}就是一个数学表达式来表述非对称:

  • e<0e<0时候,Ie=1\mathbb{I_e}=1
  • e0e\geq0时候,Ie=0\mathbb{I_e}=0
  • NoteNote(σ^(yi)σ(yi)){(\hat{\sigma}(y_i)-\sigma(y_i))}就是上述的ee

所以当估计水平小于真实水平的时候,即e<0e<0,惩罚力度要大一点,比如说α\alpha设置为0.2,则有0.21=0.8|0.2-1|=0.8的系数,而e0e \geq 0时,就只有0.20=0.2|0.2-0|=0.2的系数。

4.2.2 Total variation (TV) regularizer

通过TV正则来控制估计的图像像素的平滑程度。(不能过于平滑)即是图像水平和垂直的像素变化不能差距太多,应该收缩到一定的范围,依次限制了平滑度。其中\bigtriangledown就是梯度算子(哈密顿算子),σ^(y)\hat{\sigma}(y)是估计的结果图像,如下的运算结果就是梯度。
LTV=hσ^(y)22+vσ^(y)22 \mathcal {L}_{TV}=\Vert \bigtriangledown_h\hat{\sigma}(y) \Vert^2_2+\Vert \bigtriangledown_v \hat{\sigma}(y) \Vert^2_2
Tips:u=(xi+yj+zk)u Tips:\bigtriangledown \overrightarrow{u}=(\frac{\partial }{\partial x}\overrightarrow{i}+\frac{\partial }{\partial y}\overrightarrow{j}+\frac{\partial }{\partial z}\overrightarrow{k})\overrightarrow{u}

4.2.3 Reconstruction Loss

最后重构的损失函数就是均方差损失函数。
Lrec=x^x22 \mathcal {L}_{rec}=\Vert\hat{x}-x\Vert^2_2

最后我们有了最终的损失函数
L=Lrec+λasymmLasymm+λTVLTV \mathcal {L}=\mathcal {L}_{rec}+\lambda_{asymm}\mathcal {L}_{asymm}+\lambda_{TV}\mathcal {L}_{TV}
λ\lambda只是权衡因子,就是占据整体损失不同比例的参数因子。

4.3 Realistic Noise Model(真实噪声模型)

  • 光子传感产生的噪声可以模拟为泊松噪声,稳态扰动可以建模为高斯噪声。最后可以认为近似是异方差的高斯模型(heteroscedastic Gaussian)n(L)N(0,σ2(L))\mathbf{n}(L) \sim \mathcal {N}(0,\sigma^2(L)),也就是方差不一样的高斯分布。
    σ2(L)=L×σs2+σc2 \sigma^2(L)=L\times\sigma_s^2+\sigma_c^2
    n(L)=ns(L)+nc \mathbf{n}(L)=\mathbf{n_s}(L)+\mathbf{n_c}

    • 其中LL就是辐照度图像,L=Mf1(x)L=\mathbf M f^{-1}(x),整体表示从干净图像xx得到了辐照度图像LLM(.)\mathbf M(.)将RGB图像转回到Bayer图像(CCD或CMOS传感器拍摄的相关知识)。
    • 方差主要就是两部分组成,一个是不变的σc2\sigma_c^2,一个是随空间变化的信号相关的噪声方差L×σs2L\times\sigma_s^2
  • 同时在数码相机信号处理的过程中存在噪声,还考虑到了去马赛克化伽马校正,得到最后的模型如下:
    y=f(DM(L+n(L))) y=f(\mathbf{DM}(L+\mathbf n(L)))
    其中yy是噪声图像,f(.)f(.)是相机响应均匀采样的过程(对应上述的 f1f^{-1}),DM(.)\mathbf{DM(.)}是去马赛克过程。

  • 考虑到了JPG图像的压缩的问题,得到最后的结果:
    y=JPEG(f(DM(L+n(L)))) y=JPEG(f(\mathbf{DM}(L+\mathbf n(L))))

不得不佩服该团队对真实相机噪声图像建模的分析太全面了!