Print

发布时间: 2020-05-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.190400
2020 | Volume 25 | Number 5




    图像处理和编码    




  <<上一篇 




  下一篇>> 





密集连接卷积网络图像去模糊
expand article info 吴迪, 赵洪田, 郑世宝
上海交通大学电子信息与电气工程学院, 上海 200240

摘要

目的 非均匀盲去运动模糊是图像处理和计算机视觉中的基础课题之一。传统去模糊算法有处理模糊种类单一、耗费时间两大缺点,且一直未能有效解决。随着神经网络在图像生成领域的出色表现,本文把去运动模糊视为图像生成的一种特殊问题,提出一种基于神经网络的快速去模糊方法。方法 首先,将图像分类方向表现优异的密集连接卷积网络(dense connected convolutional network,DenseNets)应用到去模糊领域,该网络能充分利用中间层的有用信息。在损失函数方面,采用更符合去模糊目的的感知损失(perceptual loss),保证生成图像和清晰图像在内容上的一致性。采用生成对抗网络(generative adversarial network,GAN),使生成的图像在感官上与清晰图像更加接近。结果 通过测试生成图像相对于清晰图像的峰值信噪比(peak signal to noise ratio,PSNR),结构相似性(structural similarity,SSIM)和复原时间来评价算法性能的优劣。相比DeblurGAN(blind motion deblurring using conditional adversarial networks),本文算法在GOPRO测试集上的平均PSNR提高了0.91,复原时间缩短了0.32 s,能成功恢复出因运动模糊而丢失的细节信息。在Kohler数据集上的性能也优于当前主流算法,能够处理不同的模糊核,鲁棒性强。结论 本文算法网络结构简单,复原效果好,生成图像的速度也明显快于其他方法。同时,该算法鲁棒性强,适合处理各种因运动模糊而导致的图像退化问题。

关键词

运动模糊; 盲去模糊; 生成对抗网络(GAN); 密集连接卷积网络(DenseNets); 感知损失; 全卷积网络(FCN)

Motion deblurring method based on DenseNets
expand article info Wu Di, Zhao Hongtian, Zheng Shibao
School of Electronic information and Electrical Engineering, Shanghai Jiao Tong University, Shanghai 200240, China
Supported by: National Natural Science Foundation of China(61671289)

Abstract

Objective Non-uniform blind deblurring is a challenging problem in image processing and computer vision communities. Motion blur can be caused by a variety of reasons, such as the motion of multiple objects, camera shake, and scene depth variation. Traditional methods applied various constraints to model the characteristics of blur and utilized different natural image prior to the regularization of the solution space. Most of these methods involve heuristic parameter-tuning and expensive computation. Blur kernels are more complicated than these assumptions. Thus, these methods are not useful for real world images. Impressive results have been obtained in image processing with the development of neural networks. Scholars use neural networks for image generation. In this study, motion deblurring is regarded as a special problem of image generation. We also propose a fast deblurring method based on neural network without using multi-scale, unlike other scholars. Method First, this study adopts the densely connected convolutional network (DenseNets) which recently performed well in image classification direction. Improvements are made for the model to make it suitable for image generation. Our network is a full convolutional network designed to accept various sizes of input images. The input images are trained through two convolutional layers to obtain a total of 256 feature maps with the dimension of 64×64 pixels. Then, these feature maps are introduced into the DenseNets containing bottleneck layers and transitions. The output of bottleneck layers in each dense block is 1 024 feature maps, while the output of the last convolution layer of each dense block is 256 feature maps. Finally, the output of the DenseNets is restored to the size of the original image by three convolutional layers. A residual connection is added between the input and output to preserve the color information of the original image as much as possible. We also speed up the time of training. To ensure the efficiency of deblurring, this network uses only nine dense layers and does not use the multi-scale model adopted by other scholars. However, this method can still guarantee the quality of the restored image. In this study, every layer in DenseNets is connected. With this method, the intermediate information in the network can be fully utilized. In our experiment, the denser the connection among the layers, the better the results obtained. Generative adversarial networks (GANs) help image generation domain achieve a qualitative fly-by. The images generated this way are closer to the real-world image in terms of overall details. Therefore, we also use this idea to improve the performance of deblurring. In terms of the loss function, we use perceptual loss to measure the difference between restored and sharp images. We choose the VGG(visual geometry group)-19 conv3.3 feature maps to define the loss function because a shallower network can better represent the texture information of an image. In the image deblurring field, we focus on restoring the texture and edges of the object rather than wasting too much computation to determine its exact position. Thus, we choose the latter one in meansquare error (MSE) loss and perceptual loss. Result Compared with typical traditional deblurring methods and the recent neural network-based method, the performance of the algorithm is estimated by testing the restoring time, peak signal to noise ratio (PSNR), and structural similarity (SSIM) between the restored and sharp images. Experimental results show that the restored image via our method is clearer than those of others. Moreover, the average PSNR on the test set increased by 0.91, which is obviously superior to that of the traditional deblurring algorithm. According to the qualitative comparison, our method can handle the details of blurry image better than other approaches can. Our proposed method can also restore the small objects, such as text in the image. Results of other relative datasets are also better than other methods. Abandoning the multi-scale approach leads to multiple advantages, such as effectively reduced parameters, shorter training time, and reduced restoring time up to 0.32 s. Conclusion Our algorithm has a simple network structure and good restoring effect. The speed of image generation is also significantly faster than that of other methods. At the same time, the proposed method is robust and suitable for dealing with various image degradation problems caused by motion blur.

Key words

motion blur; blind deblurring; generative adversarial network(GAN); densely connected convolution network(DenseNets); perceptual loss; fully convolution network(FCN)

0 引言

使用手机等轻量级设备进行拍摄时,由于有限的曝光间隔和物体与拍摄设备之间的相对运动,拍摄的图像通常是模糊的。众多学者对去运动模糊这一问题进行了深入研究,然而由于问题的病态性,复原出清晰图像并非易事。传统去模糊方法主要通过各种约束来模拟模糊特征(如均匀/非均匀/深度感知),并利用图像先验知识(Bahat等,2017)来制订解决方案。这些方法大多需要启发式的参数调整和大量的计算。而实际图像的模糊模型往往比这些假设复杂得多,因此这些算法在真实图像上的测试结果并不理想。

基于机器学习的去模糊方法取得了一定成果。早期基于机器学习的方法(Deng等,2009)主要是利用网络提取相关参数,以此来代替传统方法中的部分步骤。利用pix2pix处理模糊图像(Nah等,2017)和视频(Su等,2017)的方法兴起。Nah等人以多尺度(multi-scale)思想为基础,利用卷积神经网络(convolutional neural network, CNN)实现运动图像去模糊。这种由粗到细的方法相比于早期算法,在复原质量上有显著提升,复原时间上也有了质的飞越。但是多尺度方法消耗了过多的算力,进行了大量无意义计算。Kupyn等人(2018)以残差网络(residual networks, ResNets)为基础,抛弃了多尺度的方法,进一步降低了图像复原时间,提高了图像质量。

生成对抗网络(generative adversarial network,GAN)在图像超分辨率重建(Ledig等,2017)和修复等领域取得了重大进展。应用GAN处理图像,能够保留图像的纹理细节,在视觉上更接近于真实图像。受GAN在图像复原方面的影响,本文提出了基于生成对抗网络的深度学习框架来解决运动图像去模糊这一问题,使去模糊质量进一步提高。生成器网络采用最近提出的密集连接卷积网络(densely connected convolution network, DenseNets)结构(Huang等,2017),该结构能充分利用网络参数,在一定程度上减少网络层数。在损失函数方面采用感知损失(Johnson等,2016),保证生成图像和清晰图像在感官上的一致。实验结果表明,本文算法复原图像更加清晰,鲁棒性好,同时耗时更短,在Kupyn等人(2018)的基础上又缩短0.3 s,只需0.5 s就可实现复原。

1 相关工作

1.1 图像去模糊

非均匀模糊的通用模型为

$\boldsymbol{I}_{B}=\boldsymbol{k}(\boldsymbol{M}) * \boldsymbol{I}_{S}+\boldsymbol{N}$ (1)

式中,$\boldsymbol{I}_{B}$为模糊图像,$\boldsymbol{k}(\boldsymbol{M})$为运动场$\boldsymbol{M}$引起的模糊核,$\boldsymbol{I}_{S}$为清晰图像,$\boldsymbol{N}$为附加噪声。去模糊问题可分为两种类型:盲去模糊和非盲去模糊。早期的工作主要集中在非盲去模糊,这类问题首先假设模糊核$\boldsymbol{k}(\boldsymbol{M})$已知,再通过经典Lucy-Richardson算法,Wiener或Tikhonov滤波器来进行反卷积,得到清晰图像$\boldsymbol{I}_{S}$。然而通常情况下,模糊函数是未知的。这类问题就是盲去模糊,即要同时估计模糊核$\boldsymbol{k}(\boldsymbol{M})$和清晰图像$\boldsymbol{I}_{S}$,因此为图像中的每一个点确定模糊函数就成为一个非常困难的问题。

Fergus等人(2006)开始,迄今已经发展出许多去模糊方法(Xu等,2013)。一类方法基于先验模型,利用迭代来提高图像的清晰度。但是这种方法复原图像时间过长,迭代的停止条件也难以确立。另一类方法则通过对模糊源的简单假设,或者图像统计学的分析来确定模糊核。例如假设模糊是由相机抖动产生的,那么整幅图像的模糊就是均匀分布的。Whyte等人(2012)根据曝光过程中相机的旋转速度,提出了一种参数化几何模型,而Gupta等人(2010)则假设模糊只是由相机的3维运动引起。这类方法复原速度快,但是通常只能处理一类特定的问题。张璐等人(2013)为了解决这一问题,将模糊图像分区域计算模糊核,分区域复原,再把每个区域拼接起来,这种方法虽然局部复原效果好,但是又引入了图像拼接这一比较复杂的问题。

随着机器学习的发展,许多基于神经网络的去模糊方法相继提出。Sun等人(2015)利用卷积神经网络来估计模糊核,Gong等人(2017)利用全卷积网络来进行运动流估计。这两种方法利用神经网络更加精确地确定模糊核,以解决传统方法的鲁棒性问题。Noroozi等人(2017)Nah等人(2017)提出了一种不考虑模糊核的pix2pix去模糊方法,利用卷积神经网络直接去模糊。在此基础上,Kupyn等人(2018)利用ResNet,提高网络中间信息复用率,进一步提高了图像去模糊质量。基于pix2pix的去模糊方法可以处理多种类型的模糊图像,具有较高的鲁棒性,并极大程度地缩短了复原时间。

1.2 生成对抗网络

生成对抗网络的思想由Goodfellow等人(2014)提出。它的思想来源于二人零和博弈。该网络由生成网络和判别网络两部分组成。生成网络接收一个随机噪声$z$,噪声$z \sim \boldsymbol{P}(z)$,根据噪声生成假样本$\tilde{x}, \tilde{x}=G(z)$。判别网络用来判别样本是否真实,它的输入是真实样本$x$和假样本$\tilde{x}$。在训练过程中,生成网络的目标是使生成的$\tilde{x}$更加真实,从而欺骗判别网络。判别网络的目标则是把$x$$\tilde{x}$区别开来。这样,生成网络和判别网络就构成了一个动态的博弈过程。这一博弈关系可以表示为

$ \begin{array}{c} \min\limits_{G} \max\limits_{D} \underset{{x} \sim \boldsymbol{P}_{r}}{E}[\log (D(x))]+ \\ \underset{\tilde{x} \sim \boldsymbol{P}_{g}}{E}[\log (1-D(\tilde{x}))] \end{array} $ (2)

式中,$\boldsymbol{P}_{r}$为真实样本的分布,$\boldsymbol{P}_{g}$为假样本的分布。$G$代表生成器,$D$代表判别器,$D(*)$代表判别网络的作用,$E(*)$是求期望。实验表明,生成对抗网络可以学习真实样本的分布,探索样本的真实结构。

1.3 密集连接卷积网络

密集连接卷积网络由Huang等人(2017)提出。具体结构如图 1所示,图 1为一个5层的密集块,每层的输入是其前面所有密集块的特征图。基本思路与ResNets一致,但其建立了高层与之前所有层的紧密连接。

图 1 密集连接卷积网络示意图
Fig. 1 Diagram of dense connected convolutional networks

传统前馈神经网络把第$n$层的输出直接作为第$n+1$层的输入。假设网络包含$N$层,每一层都包含一个非线性变换$H_n=(*)$,其中$n$表示网络中的第$n$层。$H_n=(*)$代表各种网络作用,如归一化、激活、卷积或池化。将第$n$层的输出记为$X_n$。那么传统网络的转换可以表示为

$ X_{n}=H_{n}\left(X_{n-1}\right) $ (3)

ResNets在前馈神经网络上添加了一个残差连接,可表示为

$ X_{n}=H_{n}\left(X_{n-1}\right)+X_{n-1} $ (4)

ResNets优点在于梯度可以很好地从高层传递到更靠前的低层。但是这一方式对特征信息的利用还不够充分,高层难以再发掘低层特征。

DenseNets能够进一步改善层与层之间的信息交流,该结构把每一层的输出都直接连接到后续所有层。换言之,第$n$层会接收到之前所有层输出的特征图,可以表示为

$ X_{n}=H_{n}\left(\left[X_{0}, X_{1}, \cdots, X_{n-1}\right]\right) $ (5)

式中,$\left[X_{0}, X_{1}, \cdots, X_{n-1}\right]$为第$0, 1, \cdots, n-1$层输出的特征图。DenseNets有效地解决了梯度消失的问题,增强了特征的传播和重利用,进而减少了网络参数。

2 基于生成对抗网络的图像去模糊

盲去模糊的目标是仅在给出模糊图像$\boldsymbol{I}_{B}$的条件下生成清晰的图像$\boldsymbol{I}_{S}$,不提供任何有关模糊核的信息。本文所采用的数据集,每一幅模糊图像都有一幅清晰的图像与之对应,因此采用条件生成对抗网络(conditional GAN,CGAN)来指导样本生成。

2.1 密集块(DenseBlock)和过渡(Transition)

本文所采用的网络基于DenseNets-BC(Huang等,2017),即添加了瓶颈层(Bottleneck)和压缩层的密集网络。并在此基础上进行了一定的改进,使其适合图像生成。具体的密集块结构和变化如图 2所示。本文结构在归一化和池化层进行了改变。

图 2 DenseBlock结构与本文结构
Fig. 2 DenseBlock and the structure adopted in this paper((a) DenseBlock; (b)ours)

1) 密集块。假设每一密集层的输出都为$k$幅特征图,那么第$n$层的输入就会有$k_{0}+k \times(n-1)$幅,其中$k_{0}$为输入层的通道数。这样高层的输入就会很多,计算量大大增加。为了提高计算的效率,DenseNets引入瓶颈层,即在密集层中加一个卷积核为(1, 1),输出为$4k$幅特征图的卷积层。通过实验可以发现,瓶颈层一方面提高了计算效率,另一方面也做到了对信息的整合,提取出了对结果有意义的信息。

本文将密集块中所有的归一化改为InstanceNorm。一方面是由于实验中的batch_size为1,另一方面去模糊的结果主要依赖于当前输入对象实例。所以InstanceNorm更加合适。

2) 过渡。过渡主要由压缩层和池化层组成。过渡中的压缩层是为了减少特征图的数量,如果没有压缩层,下一个密集块的输入就会很大,会消耗大量的计算。

图像去模糊与分类不同,不需要池化层来逐渐压缩特征图的大小。因此将池化层去掉,直接将卷积后的特征图作为下一个密集块的输入。

2.2 网络结构

生成器和判别器的网络结构如图 3所示。生成器网络首先用两个卷积层对图像进行下采样,得到256幅特征图,再用密集块进行特征提取,最后用一个卷积块和两个转置卷积块恢复原图像的通道和尺寸。生成器网络中密集块的长度和个数是通过一组对照实验确定,实验结果表明,仅采用一个密集块,放置9个密集层的网络效果最优。每个密集层内采用的作用层和顺序如图 2所示,第1个卷积层为瓶颈层,卷积核大小为(1×1),卷积后添加ReLU激活和InstanceNorm归一化, 之后是一个(3×3)的卷积层,卷积后添加ReLU激活和InstanceNorm归一化。为了避免出现过拟合的现象,(3×3)卷积层添加了随机失活(dropout),失活率设置为0.5。此外,本文还在输入和输出之间添加了一个残差连接。这样中间网络对输出的作用可视为增加了修正因子$\boldsymbol{I}_{R}$,即$\boldsymbol{I}_{S}=\boldsymbol{I}_{B}+\boldsymbol{I}_{R}$。实验表明,这一结构会使生成图像尽可能地保留原图像的色彩信息,会使网络训练得更快,效果也更好。

图 3 生成器和判别器的网络结构
Fig. 3 Networks of generator and discriminator((a) gemerator network; (b) disciminator network)

判别器网络由5个卷积层构成,第1个卷积层后面添加了LeakyReLU激活,之后3个卷积层每层后面添加了InstanceNorm归一化和LeakyReLU激活。最后一层卷积后面添加了Sigmoid激活,用于计算图像真假的概率。

2.3 损失函数

损失函数的定义对训练结果起着非常重要的作用,由于采用了CGAN,损失函数是对抗损失$L_{a d}$和内容损失$L_{X}$的加权和,即

$L=L_{a d}+\lambda L_{X}$ (6)

式中,$\lambda$在实验中设置为100。其定义思路如图 4所示,模糊的图像作为生成器的输入并通过网络的恢复,得到去除模糊后的图像。判别器把真实清晰的图像和恢复后图像作为输入,并判断输入的图像哪一个是真实图像, 哪一个是经过恢复的。而生成器则通过真实图像和恢复图像的损失函数,来进行优化。

图 4 生成对抗网络的训练模式
Fig. 4 Training mode of generative adversarial networks

1) 对抗损失。与大多数学者采用的方法相同(Kim和Lee,2014),用GAN的原始公式来定义对抗损失$L_{a d}$,计算公式为

$ \begin{array}{c} L_{a d}=\underset{\boldsymbol{I}_{S} \sim \boldsymbol{P}_{S}}{E}\left[\log \left(D\left(\boldsymbol{I}_{S}\right)\right)\right]+ \\ \underset{\boldsymbol{I}_{B} \sim \boldsymbol{P}_{B}}{E}\left[\log \left(1-D\left(\boldsymbol{I}_{B}\right)\right)\right] \end{array} $ (7)

式中,$\boldsymbol{I}_{S}$为清晰图像,$\boldsymbol{I}_{B}$为模糊图像。$\boldsymbol{P}_{S}$为清晰图像的分布,$\boldsymbol{P}_{B}$为模糊图像的分布。不采用生成对抗网络,生成的图像相对于原图像虽然会有一定的改善,但是图像大多比较模糊,物体边缘的过渡会比较平滑,与真实图像相比差距明显。加入生成对抗网络后,网络能更深入地探索生成样本与真实样本的差距,使生成图像的视觉效果进一步提高。此外,该网络也提高了算法的鲁棒性。

2) 内容损失。两个经典内容损失为$L1$(即mean absolute error,MAE)损失和$L2$(即mean square error,MSE)损失,这两种损失函数都是针对图像原始像素点进行定义。用这类计算方式作为唯一的损失函数会导致生成图像在细节上比较模糊(Ledig等,2017),物体边缘不清晰。因此,本文采用了感知损失(perceptual loss)(Johnson等,2016)。感知损失由训练好的CNN网络中的特征图参数来定义。用这一函数监督训练得到的结果与自然图像更加相似,细节上也更加逼真。感知损失定义为

$ \begin{array}{c} L_{X}=\frac{1}{W_{i, j} H_{i, j}} \sum\limits_{x=1}^{W_{i, j}} \sum\limits_{y=1}^{H_{i, j}} \\ \left(\phi_{i, j}\left(\boldsymbol{I}_{S}\right)_{x, y}-\phi_{i, j}\left(G\left(\boldsymbol{I}_{B}\right)_{x, y}\right)^{2}\right. \end{array} $ (8)

式中,$\phi_{i, j}$是预训练(Deng等,2009)VGG(visual geometry group)19网络中第$i$个池化层前的第$j$个卷积层输出的特征图,$W_{i. j}$$H_{i, j}$是特征图的维度,$G(*)$代表生成器的作用。本文采用VGG3, 3这一卷积层激活后的特征图来定义内容损失。研究发现,较高层输出的特征图大多代表图像更抽象的特征(Zeiler和Fergus,2014),较低层输出的特征图则代表图像纹理信息,因此选择(3, 3)特征图来定义内容损失。

3 实验

实验均使用Pytorch深度学习架构,在GTX 1080Ti GPU上进行训练。

1) 数据集。神经网络训练需要大量的数据集,早期模糊图像通过模糊核与清晰图像卷积得到。但是这种简单方法产生的模糊图像与相机采集的真实图像存在较大差别。Nah等人(2017)提出了一种新的图像生成方法,用高速运动的摄像机拍摄视频,并提取相连的短曝光帧进行平均,从而得到模糊图像。例如用GoPro Hero 4 Black去获得长曝光模糊图像。该方法可以模拟复杂的相机抖动和物体运动,得到的图像更接近现实图像。GOPRO数据集就是由此方法生成的。

本文实验采用GOPRO数据集训练网络。该数据集包含3 214对模糊和清晰的图像,选取2 103对图像进行训练,另外1 111对图像进行测试。

2) 模型训练。采用Adam优化算法进行训练,$\beta_{1}$设置为0.5,使得动量与梯度的占比相同,$\beta_{2}$设置为默认值。由于学习率设置过大,难以找到最优解,设置过小,则使得损失下降缓慢,所以将前1 000个epoch的学习率设置为0.000 1,之后每增加100个epoch,学习率由0.000 1线性下降为0。实验发现,1 500个epoch就可以充分训练网络。

每个batch训练开始前,都要对训练图像进行处理。首先将模糊图像和清晰图像在随机的相同位置处裁剪成256×256像素大小的图像。裁剪后的模糊图像作为生成器的输入,判别器的输入则为裁剪后的清晰图像和生成器的输出。需要注意的是,只有当判别器的判别能力足够强时,才能保证对生成器的优化产生正面的影响。因此在实验中,设置每训练1次生成器就要训练5次判别器。

3) 结果测试。将测试集中的模糊图像放入生成网络进行处理,得到去模糊后的图像。在这一过程中不需要使用判别器。由于生成网络是全卷积网络,任意大小的图像都能正确恢复,因此用两个数据集来进行结果测试,分别为GOPRO数据集和Kohler数据集。通过对比恢复图像的峰值信噪比(peak signal to noise ratio,PSNR)、结构相似性(structural similarity,SSIM)和时间长短,来评判算法的优劣。

4 实验结果

4.1 不同密集块设计对训练结果的影响

针对密集块的数量和长度进行了多种设计,为了保证时间效率,网络总密集层数均不超过9层。具体的网络设计分别为{3, 3, 3},{4, 4}和{9},其中{3, 3, 3}代表网络含有3个密集块,每个密集块含有3个密集层,这3个密集层之间是紧密连接的。{4, 4}则代表网络中包含两个密集块,每个密集块含有4个密集层,这4个密集层紧密连接。同理{9}则代表网络中只含有一个密集块,共有9个密集层,它们之间都紧密连接。通过测试这3种方法在GOPRO数据集上的复原结果,来进行网络选择。具体结果如表 1所示。

表 1 不同模型定量对比结果
Table 1 Quantitative comparison results of different models

下载CSV
{3, 3, 3} {4, 4} {9}
PSNR/dB 28.72 28.82 29.11
SSIM 0.927 0 0.927 2 0.931 2
注:加粗字体为每行最优结果。

通过实验结果可以发现,网络设计为{9}时,重建图像的质量最好。原因是在网络层数相同的情况下,层与层之间的联系越紧密,特征参数的利用就会越充分,得到的结果也越好。在接下来的实验对比中,采用的都是含有一个密集块,包含9个密集层的网络。

4.2 本文结果与主流算法对比

4.2.1 GOPRO数据集

选取几种经典算法进行对比,在GOPRO数据集中1 111幅测试图像进行结果对比,其中GOPRO数据集的图像分辨率为1 280×720像素。

通过表 2的定量对比和图 5定性对比,可以看出本文方法在去模糊的质量上相比于其他方法有明显提高。Xu和Jia(2010)Kim和Lee(2014)孙士洁等人(2017)基于传统方法进行去模糊,虽然这类方法有一定的去模糊效果,但是物体边缘并不清晰,一幅图的复原时间也过长,满足不了现实的应用。Sun等人(2015)利用神经网络来估计模糊核,再进行去模糊,可以明显地看到,这种方法在GOPRO数据集上并不适用,不能准确地估计大部分模糊核,去模糊后的图像清晰程度不高,复原时间也过长。Nah等人(2017)算法重建的图像比较清晰,但是在细节上仍比较模糊。本文结果与Kupyn等人(2018)算法在视觉上都较为清晰,能清楚地复原出图像的细节,如模糊的车牌号码、远处的电线。通过表 2的定量对比,可以看出从图像处理效果和时间效率等综合因素考虑,本文算法明显更胜一筹。原因是相对于Kupyn等人(2018),本文引入了DenseNet网络,使得网络较低层的信息能够更充分地传到高层,进一步提高了信息利用率。可以看出,本文方法在GOPRO数据集上复原质量高、时间短。

表 2 在GOPRO数据集上去模糊性能的定量比较
Table 2 Quantitative comparison of deblurring performance on GOPRO dataset

下载CSV
Xu和Jia(2010) Kim和Lee(2014) 孙士洁等人(2017) Sun等人(2015) Nah等人(2017) Kupyn等人(2018) 本文
PSNR/dB 25.19 23.64 25.22 24.64 29.08 28.20 29.11
SSIM 0.896 0 0.823 9 0.811 0 0.842 9 0.913 5 0.932 0 0.931 2
时间 1 h 1 h 20 min 20 min 3.09 s 0.85 s 0.53 s
注:加粗字体为每行最优结果;时间均是在GPU加速的条件下测试。
图 5 在GOPRO测试集上的去模糊结果对比
Fig. 5 Comparison of deblurring results on GOPRO test set
((a) blurred images; (b) Whyte et al.(2012); (c) Sun et al.(2015); (d) Nah et al.(2017); (e) Kupyn et al.(2018); (f) ours)

4.2.2 Kohler数据集

Kohler是一个评价盲去模糊的基础数据集,产生方式为先用相机拍摄视频,然后通过视频回放判断相机的运动轨迹,即得到模糊核。将清晰图像与模糊核卷积,从而得到模糊图像。该数据集包含4幅基础图像,每幅图像通过12种不同的模糊核处理,最后得到48幅模糊图像。在图 6中展示了由4种不同模糊核生成的模糊图像,可以看出,本文方法针对不同模糊核,都有一定的去模糊能力,比较复杂的纹理也能较好恢复,如一排排座椅。Kohler数据集的评价方法是:将复原得到的图像分别与相机采集的100幅图像进行测试,得到的100组结果中选取PSNR和SSIM的最大值作为评价指标。用此评价指标对结果进行测试,测试结果在表 3中展示。可以看出,本文方法在Kohler数据集的复原性能明显优于其他算法,这说明本文方法能较好地处理不同的模糊核,具有较好的鲁棒性。

图 6 本文算法在Kohler测试集上的结果
Fig. 6 Results of our method on the Kohler test set ((a) blurred picture made of four different blur kernels; (b)ours)

表 3 在Kohler数据集上去模糊性能的定量比较
Table 3 Quantitative comparison of deblurring performance on Kohler dataset

下载CSV
Xu和Jia(2010) Kim和Lee(2014) 孙士洁等人(2017) Sun等人(2015) Nah等人(2017) Kupyn等人(2018) 本文
PSNR/dB 27.41 24.68 18.90 25.22 26.48 26.10 26.51
SSIM 0.750 6 0.793 7 0.525 0 0.773 5 0.807 9 0.816 0 0.822 0
时间 40 min 40 min 14 min 14 min 2.14 s 0.59 s 0.37 s
注:加粗字体为每行最优结果;时间均是在GPU加速的条件下测试。

5 结论

针对现阶段运动图像去模糊效率低的问题,提出了一种基于神经网络的快速去模糊方法。采用pix2pix方式,可以在不求解模糊核的前提下复原图像。该方法以密集连接网络为基础,挖掘了该网络在图像去模糊领域的应用价值。该网络充分利用了神经网络中间层的数据,使得本文方法利用少量的网络参数就能达到很好的去模糊效果,继而提升了处理效率。另外,损失函数采用了感知损失,虽然用感知损失可能会使测试结果中的PSNR值降低,但是去模糊追求的是图像的清晰度,所以利用感知损失可以得到更理想的结果。实验结果表明,本文方法在多组数据集中都表现出色,既能显著提升复原图像的质量,又不会有太多的时间消耗,因此具有较高的应用价值。

今后的工作将围绕以下展开:1)该算法对于大尺寸模糊核图像的复原效果还有欠缺,需要进一步提高算法的鲁棒性;2)密集连接网络有很强的特征提取特性,因此该网络在图像和视频处理等其他方向的应用也值得探究。

参考文献

  • Bahat Y, Efrat N and Irani M. 2017. Non-uniform blind deblurring by reblurring//Proceedings of the IEEE International Conference on Computer Vision. Venice: IEEE: 3306-3314[DOI: 10.1109/ICCV.2017.356]
  • Deng J, Dong W, Socher R, Li L J, Li K and Li F F. 2009. ImageNet: a large-scale hierarchical image database//Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition. Miami: IEEE: 248-255[DOI: 10.1109/CVPR.2009.5206848]
  • Fergus R, Singh B, Hertzmann A, Roweis S T, Freeman W T. 2006. Removing camera shake from a single photograph. ACM Transactions on Graphics, 25(3): 787-794 [DOI:10.1145/1141911.1141956]
  • Gong D, Yang J, Liu L Q, Zhang Y N, Reid L, Shen C H, Van Den Hengel A and Shi Q F. 2017. From motion blur to motion flow: a deep learning solution for removing heterogeneous motion blur//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE: 3806-3815[DOI: 10.1109/CVPR.2017.405]
  • Goodfellow I J, Pouget-Abadie J, Mirza M, Xu B, Warde-Farley D, Ozair S, Courville A and Bengio Y. 2014. Generative adversarial nets//Proceedings of the 27th International Conference on Neural Information Processing Systems. Montreal, Canada: MIT Press: 2672-2680
  • Gupta A, Joshi N, Zitnick C L, Cohen M and Curless B. 2010. Single image deblurring using motion density functions//Proceedings of the 11th European Conference on Computer Vision. Heraklion: Springer: 171-184[DOI: 10.1007/978-3-642-15549-9_13]
  • Huang G, Liu Z, Van Der Maaten L and Weinberger K Q. 2017. Densely connected convolutional networks//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE: 2261-2269[DOI: 10.1109/CVPR.2017.243]
  • Johnson J, Alahi A and Li F F. 2016. Perceptual losses for real-time style transfer and super-resolution//Proceedings of the 14th European Conference on Computer Vision. Amsterdam: Springer: 694-711[DOI: 10.1007/978-3-319-46475-6_43]
  • Kim T H and Lee K M. 2014. Segmentation-free dynamic scene deblurring//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition. Columbus: IEEE: 2766-2773[DOI: 10.1109/CVPR.2014.348]
  • Kupyn O, Budzan V, Mykhailych M, Mishkin D and Matas J. 2018. DeblurGAN: blind motion deblurring using conditional adversarial networks//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE: 8183-8192[DOI: 10.1109/CVPR.2018.00854]
  • Ledig C, Theis L, Huszár F, Caballero J, Cunningham A, Acosta A, Aitken A, Tejani A, Totz J, Wang Z H and Shi W Z. 2017. Photo-realistic single image super-resolution using a generative adversarial network//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE: 105-114[DOI: 10.1109/CVPR.2017.19]
  • Nah S, Kim T H and Lee K M. 2017. Deep multi-scale convolutional neural network for dynamic scene deblurring//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE: 257-265[DOI: 10.1109/CVPR.2017.35]
  • Noroozi M, Chandramouli P and Favaro P. 2017. Motion deblurring in the wild//Proceedings of the 39th German Conference on Pattern Recognition. Basel: Springer: 65-77[DOI: 10.1007/978-3-319-66709-6_6]
  • Su S C, Delbracio M, Wang J, Sapiro G, Heidrich W and Wang O. 2017. Deep video deblurring for hand-held cameras//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE: 237-246[DOI: 10.1109/CVPR.2017.33]
  • Sun J, Cao W F, Xu Z B and Ponce J. 2015. Learning a convolutional neural network for non-uniform motion blur removal//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Boston: IEEE: 769-777[DOI: 10.1109/CVPR.2015.7298677]
  • Sun S J, Zhao H C, Li B, Hao M G, Lyu J F. 2017. Blind deconvolution for noisy and blurry images using low rank prior. Journal of Electronics and Information Technology, 39(8): 1919-1926
  • Whyte O, Sivic J, Zisserman A, Ponce J. 2012. Non-uniform deblurring for shaken images. International Journal of Computer Vision, 98(2): 168-186 [DOI:10.1007/s11263-011-0502-7]
  • Xu L and Jia J Y. 2010. Two-phase kernel estimation for robust motion deblurring//Proceedings of the 11th European Conference on Computer Vision. Heraklion: Springer: 157-170[DOI: 10.1007/978-3-642-15549-9_12]
  • Xu L, Zheng S C and Jia J Y. 2013. Unnatural l0 sparse representation for natural image deblurring//Proceedings of 2013 IEEE Conference on Computer Vision and Pattern Recognition. Portland: IEEE: 1107-1114[DOI: 10.1109/CVPR.2013.147]
  • Zeiler M D and Fergus R. 2014. Visualizing and understanding convolutional networks//Proceedings of the 13th European Conference on Computer Vision. Zurich, Switzerland: Springer: 818-833[DOI: 10.1007/978-3-319-10590-1_53]
  • Zhang L, Sheng B, Ma L Z. 2013. Motion deblurring based on image segmentation. Journal of Image and Graphics, 18(4): 467-475 (张璐, 盛斌, 马利庄. 2013. 分区域去运动模糊. 中国图象图形学报, 18(4): 467-475) [DOI:10.11834/jig.20130415]