Print

发布时间: 2019-10-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.190014
2019 | Volume 24 | Number 10




    图像分析和识别    




  <<上一篇 




  下一篇>> 





多路径卷积神经网络的轮廓感知
expand article info 谭明明, 范影乐, 武薇, 佘青山, 甘海涛
杭州电子科技大学模式识别与图像处理实验室, 杭州 310018

摘要

目的 引入视觉信息流的整体和局部处理机制,提出了一种多路径卷积神经网络的轮廓感知新方法。方法 利用高斯金字塔尺度分解获得低分辨率子图,用来表征视觉信息中的整体轮廓;通过2维高斯导函数模拟经典感受野的方向选择性,获得描述细节特征的边界响应子图;构建多路径卷积神经网络,利用具有稀疏编码特性的子网络(Sparse-Net)实现对整体轮廓的快速检测;利用具有冗余度增强编码特性的子网络(Redundancy-Net)实现对局部细节特征提取;对上述多路径卷积神经网络响应进行融合编码,以实现轮廓响应的整体感知和局部检测融合,获取轮廓的精细化感知结果。结果 以美国伯克利大学计算机视觉组提供的数据集BSDS500图库为实验对象,在GTX1080Ti环境下本文Sparse-Net对整体轮廓的检测速度达到42幅/s,为HFL方法1.2幅/s的35倍;而Sparse-Net和Redundancy-Net融合后的检测指标数据集尺度上最优(ODS)、图片尺度上最优(OIS)、平均精度(AP)分别为0.806、0.824、0.846,优于HED(holistically-nested edge detection)方法和RCF(richer convolution features for edge detection)方法,结果表明本文方法能有效突出主体轮廓并抑制纹理背景。结论 多路径卷积神经网络的轮廓感知应用,将有助于进一步理解视觉感知机制,并对减弱卷积神经网络的黑盒特性有着重要的意义。

关键词

轮廓检测; 空洞卷积; 卷积神经网络; 视觉感知; 特征融合

Contour perception based on multi-path convolution neural network
expand article info Tan Mingming, Fan Yingle, Wu Wei, She Qingshan, Gan Haitao
Laboratory of Pattern Recognition and Image Processing, Hangzhou Dianzi University, Hangzhou 310018, China
Supported by: National Natural Science Foundation of China (61501154)

Abstract

Objective This study aims to introduce the global and local processing mechanism of visual information flow by constructing a visual information encoding and decoding model based on the correlation between visual nerve coding and contour perception and propose a contour perception method based on multi-path convolution neural network. Method The Gauss pyramid scale decomposition was used to obtain low-resolution molecular images to characterize the whole contour of visual information. Two-dimensional Gauss derivative was used to simulate the directional selectivity of classical receptive fields to obtain boundary response sub-graphs describing details. A multi-path convolution neural network was constructed, and a sparse encoding sub-network (Sparse-Net) was used to realize the fast processing of the whole contour detection. Redundancy enhanced coding (Redundancy-Net) was used to extract local details. The response of the multi-path convolution neural network was fused and coded to integrate global perception and local detection of contour responses and obtain the fine perception results of the contour. Result With the BSDS500 image database provided by Berkely Computer Vision Group as the experimental object, the detection speed of Sparse-Net in GTX1080Ti environment reached 42 frame/s, which was 35 times higher than that of HFL method (1.2 frame/s). The detection index data set of Sparse-Net and Redundancy-Net after fusion was the best in scale (ODS) and picture scale (OIS) and AP are 0.806, 0.824, and 0.846 respectively, which are better than the holistically-nested edge detection (HED) and richer convolution features for edge detection (RCF) methods, which are based on the analysis of the lateral output feature map, progressive encoding and decoding, and feature fusion from the shallow to the deep layer of the network, learning fine contour features and achieving end-to-end contour detection. The proposed method cannot only effectively highlight the main contour and suppress the texture background but also improve the detection efficiency of contour. Conclusion Convolution neural network can be explained by visual mechanism in some dimensions, such as convolution operation corresponding to the topological mapping of retinal visual information. Pooling operation is related to complex cells and simple cells in visual pathway. As such, convolution neural network is still a black box model which depends heavily on massive samples on the whole. Considering that the actual visual pathway is not simply a serial transmission of information but a fusion of the local and global characteristics of multi-channel visual information flow in the visual cortex, a Gauss pyramid decomposition model was constructed for sparse encoding of the spatial scale of visual information and obtaining low-resolution molecular maps representing the overall characteristics. Lateral suppression of non-classical receptive fields was used in the lateral geniculate region. A classical receptive field with directional selection characteristics was set up for isotropic suppression of background information and considering the ability of primary visual cortex for information processing in the visual radiation region. A two-dimensional Gauss derivative model was constructed to process the visual information by directional selection. The boundary response sub-graph representing local features was obtained. A multi-path convolution neural network was constructed considering the local details of external excitation and the layer-by-layer perception of overall information in the primary and advanced visual cortex. In the network, the fast detection path was composed of a sub-network Sparse-Net containing a pooling unit for sparse coding of the overall image contour. The detail detection path was composed of a sub-network Redundancy-Net containing a void convolution unit to realize image bureau. Redundancy enhanced the coding of part details. Finally, the feedback and fusion process of high-level visual cortex to visual information flow was simulated, and the above-mentioned multi-path convolution neural network response was fused and coded for overall perception and local detection fusion of the contour response. Finally, the fine perception results of the contour were obtained. Contour perception based on multi-path convolution neural network is helpful to further understand the mechanism of visual perception and is of great significance to weaken the black-box characteristics of the convolution neural network. Taking the natural scene image subject contour perception under complex texture background as an example, simulating the neural coding mechanism of multi-path cooperative work in primary visual pathway will help understand the intrinsic mechanism of visual system and its specific application in visual perception. This works provides a new idea for subsequent image understanding and analysis based on visual mechanism.

Key words

contour detection; cavity convolution; convolution neural network (CNN); visual perception; feature fusion

0 引言

轮廓感知作为视觉系统的基本功能,对于实现高级皮层的视觉理解和认知具有重要的作用。传统轮廓检测方法主要建立在以像素亮度梯度为主要特征的边缘检测运算上,例如结合Sobel算子和模糊逻辑算法的目标轮廓检测方法[1],也有研究利用Canny算子以及HSV(hue, saturation, value)空间量化过程来细化轮廓信息[2],由于传统方法缺乏内在的视觉机制支撑,因此在细节深层次感知上存在着瓶颈。随着视觉神经实验和计算的进展,模拟视觉机制的轮廓检测方法逐渐受到了重视,例如基于初级视皮层神经元响应的轮廓检测模型[3],也有研究基于主视通路对视觉信息处理的协同作用,并结合非极大值抑制等视觉机制实现轮廓感知[4]。上述视觉机制方法主要还是从神经脉冲编解码的角度来展开研究,未能充分发挥视知觉学习过程对于轮廓感知的重要作用。近年来,随着海量标记样本的获取和图形计算能力的提高,以卷积神经网络(CNN)为代表的人工智能方法受到了关注。文献[5]基于模型参数来表征轮廓特征用于分类,并结合轮廓和背景相互错分的概率描述实现轮廓检测;文献[6]利用与物体相关的特征作为轮廓检测的高级提示;文献[7]基于随机决策森林理论构建神经网络框架,通过局部边缘掩模提取轮廓特征;文献[8]结合局部边缘方向空间和校准后的多尺度组合,构建深度网络进行轮廓检测;此外还有整体嵌套边缘检测(HED)[9]和丰富特征卷积的边缘检测(RCF)[10],通过对侧向输出的特征图进行解析,从网络的浅层到深层逐步编解码和特征融合,学习精细的轮廓特征并实现端到端的轮廓检测。虽然卷积神经网络在某些维度上可以利用视觉机制加以解释,例如卷积运算对应于视网膜视觉信息的拓扑映射,而池化运算又与视觉通路中的复杂细胞和简单细胞存在着一定关联,但卷积神经网络从整体上来看仍然是一种严重依赖于海量样本的黑箱式模型。

考虑到实际视觉通路并非只是简单的信息串行传递,而是多通路视觉信息流在视皮层上局部和整体特性的融合,因此本文提出了一种多路径卷积神经网络的轮廓感知方法。首先构建高斯金字塔分解模型实现视觉信息空间尺度的稀疏编码,获取表征整体特性的低分辨子图;然后在外侧膝状体区域利用非经典感受野的侧抑制,实现背景信息的各向同性抑制,在视辐射区域考虑到初级视皮层对于信息处理的能力,设置具有方向选择特性的经典感受野,构建2维高斯导函数模型对视觉信息进行方向选择处理,获取表征局部特征的边界响应子图。考虑到初高级视皮层对于外部激励的局部细节和整体信息逐层感知特性,构建多路径卷积神经网络,其中快速检测路径由包含池化单元的子网络Sparse-Net构成,实现对图像整体轮廓的稀疏编码;细节检测路径由包含空洞卷积单元的子网络Redundancy-Net构成,实现对图像局部细节的冗余度增强编码;最后模拟高级视皮层对视觉信息流的反馈和融合过程,对上述多路径卷积神经网络响应进行融合编码,以实现轮廓响应的整体感知和局部检测融合,最终获取轮廓的精细化感知结果。

1 算法原理

本文模拟视觉信息的多路径编码机制,考虑视觉感知的尺度和方向特性,分别将表征整体特性的低分辨子图和表征局部特性的边界响应子图作为视觉信息的多路径输入源,并针对性地构建具有稀疏编码和冗余度增强编码特性的卷积神经子网络,满足整体轮廓快速检测和局部细节精细化检测的需要。本文算法框图如图 1所示。

图 1 本文算法框图
Fig. 1 The block diagram of the algorithm in this paper

1.1 低分辨率子图获取

在视觉信息传递和处理过程中,观察尺度是视觉感知的重要因素之一。本文利用具有下采样特性的高斯金字塔分解算法,获取原图像的低分辨率子图,用来表征图像的整体轮廓信息。首先引入双线性插值法,对待检测图像进行尺寸扩展,使扩展后图像$\boldsymbol{I}$的长和宽相等且为2的整数幂次值。然后利用高斯金字塔分解算法,对$\boldsymbol{I}$进行分解层数为$n$的尺度分解,得到低分辨子图,用来表征待检测图像的轮廓整体特性,具体为

$ \begin{array}{*{20}{c}} {{\mathit{\boldsymbol{J}}_k}\left( {i,j} \right) = \sum\limits_{l = 0}^4 {\sum\limits_{m = 0}^4 {\left[ {\mathit{\boldsymbol{H}}\left( {l,m} \right) \cdot } \right.} } }\\ {\left. {{\mathit{\boldsymbol{J}}_{k - 1}}\left( {2i + l - 2,2j + m - 2} \right)} \right]} \end{array} $ (1)

高斯金字塔5×5分解矩阵为

$ \mathit{\boldsymbol{H}} = \frac{1}{{256}}\left[ {\begin{array}{*{20}{c}} 1&4&6&4&1\\ 4&{16}&{24}&{16}&4\\ 6&{24}&{36}&{24}&6\\ 4&{16}&{24}&{16}&4\\ 1&4&6&4&1 \end{array}} \right] $ (2)

式中,$\boldsymbol{J}_{k}$($i$, $j$)表示分解子图像$\boldsymbol{J}_{k}$在坐标($i$, $j$)处的特征值,1≤$k$$n$$n$为最高分解层数;0 < $i$, $j $ < $C_{k}$$C_{k}$表示第$k$层子图像的长和宽;$\boldsymbol{H}$为高斯金字塔核;$\boldsymbol{J}_{0}$对应于未分解前的图像$\boldsymbol{I}$$\boldsymbol{J}_{n}$即为低分辨率子图,记为$\boldsymbol{I}_{1}$$n $= 4的尺度分解示意图如图 2所示。

图 2 尺度分解示意图($n $= 4)
Fig. 2 The schematic diagram of scale decomposition ($n$ = 4) ((a) original image; (b) $\boldsymbol{J}_{0}$; (c) $\boldsymbol{J}_{1}$; (d) $\boldsymbol{J}_{2}$; (e) $\boldsymbol{J}_{3}$)

1.2 边界响应子图获取

视觉神经实验表明,初级视皮层感受野存在着对外界视觉激励的方向选择特性,由此实现对局部细节的特征提取[11]。因此本文设置具有方向选择特性的$N$方位经典感受野,结合2维高斯导函数模型,构建方向选择模型如下

$ RF(i,j,\theta ) = \frac{{\partial g(\tilde i,\tilde j,\theta )}}{{\partial \tilde i}} $ (3)

$ g(\tilde i,\tilde j,\theta ) = \frac{1}{{2{\rm{ \mathsf{ π} }}{\sigma ^2}}}\exp \left( { - \frac{{{{\tilde i}^2} + {\gamma ^2}{{\tilde j}^2}}}{{2{\sigma ^2}}}} \right) $ (4)

式中,$RF(i, j, θ)$为2维高斯导函数;$(\tilde {i}, \tilde {j})=(i\cos(θ)+j\sin(θ), -i\sin(θ)+j\cos(θ))$$θ∈[0, 2{\rm{ \mathsf{ π} }})$对应于$N$个可选择的经典感受野方向。$γ$表示滤波器的椭圆率,默认$γ=0.5$$σ$决定经典感受野大小。提取图像在经典感受野内的中心水平、中心垂直、正、负对角线4类边缘,得到边界响应子图,用来表征图像的局部细节特性。边界响应示意图如图 3所示。

图 3 边界响应示意图
Fig. 3 Boundary response diagram ((a) original image; (b) boundary response sub-graph)

对于某一特定方向$θ_{v}, v=1, 2, …, N$,输入图像$I$($i$, $j$)的经典感受野响应

$ {e_v}(i,j) = \left| {I(i,j) * RF\left( {i,j,{\theta _v}} \right)} \right| $ (5)

针对$\boldsymbol{I}$的某个像素,获得所有方向上的最大响应,并结合方向响应的响应强度系数$u$($i$, $j$)确定最终的边界响应,从而得到具有细节特征的边界响应子图$\boldsymbol{I}_{2}$,其中强度响应系数定义为

$ u\left( {i,j} \right) = \frac{{\max \left\{ {{e_\nu }\left( {i,j} \right)|v = 1,2, \cdots ,N} \right\}}}{{\sum\limits_v {{e_v}} \left( {i,j} \right)}} $ (6)

边界响应子图$\boldsymbol{I}_{2}$

$ {I_2}\left( {i,j} \right) = u\left( {i,j} \right) \times \max \left\{ {{e_v}\left( {i,j} \right)|v = 1,2, \cdots ,N} \right\} $ (7)

1.3 稀疏编码子网络(Sparse-Net)

视觉系统中主视觉皮层V1区的细胞感受野表现出一种稀疏编码的特性[12],对应于视觉信息整体特征提取时的去冗余过程,因此本文针对低分辨率子图$\boldsymbol{I}_{1}$构成一条快速检测路径,搭建提取其整体轮廓信息的稀疏编码子网络Sparse-Net。本文弱化卷积神经网络的多重特征提取特性,精简Sparse-Net卷积层以提高感知速度,如图 4所示。子网络Sparse-Net由4个单元构成,前两个单元都由两层3×3、步长为1的普通卷积层与一个2×2、步长为2的最大池化组成;第3个单元由两层3×3、步长为1的普通卷积层组成,无池化层;前3个单元每个每层卷积核个数相同,卷积核个数分别为96、192、384;第4个单元由1个4倍上采样、1个1×1、步长为1的普通卷积核和图像剪切层组成。每个卷积层后接1个修正线性单元(relu)作为激活函数。

图 4 Sparse-Net结构示意图
Fig. 4 Sparse-Net structure diagram

构建Sparse-Net的数据集{($\boldsymbol{X}_{n}$, $\boldsymbol{Y}_{n}$), $n$=1, 2, …, $N$},其中$\boldsymbol{X}$为训练样本的低分辨率子图,$\boldsymbol{Y}$= {$y_{m}|m=1, …, |\boldsymbol{X}|$}, $y_{m}$∈{$0, 1$}为$\boldsymbol{X}$所对应的二值轮廓标签图。随机设置初始卷积核权重,将低分辨率子图集输入Sparse-Net,最后的输出经sigmod函数激活后与样本标签进行损失运算,将沿损失函数减小方向反向传播更新卷积核权重,反复迭代后获得训练后的Sparse-Net模型。损失函数为

$ \begin{array}{*{20}{c}} { Loss\left( \mathit{\boldsymbol{W}} \right) = - \beta \sum\limits_{m \in {\mathit{\boldsymbol{Y}}_ + }} {\ln \mathit{Pr}\left( {{y_m} = 1\left| {\mathit{\boldsymbol{X}};\mathit{\boldsymbol{W}}} \right.} \right)} - }\\ {(1 - \beta )\sum\limits_{m \in {\mathit{\boldsymbol{Y}}_ - }} {\ln \mathit{Pr}\left( {{y_m} = 0\left| {\mathit{\boldsymbol{X}};\mathit{\boldsymbol{W}}} \right.} \right)} } \end{array} $ (8)

式中,网络参数$\boldsymbol{W}$为各单元卷积层的权重值集合,$\boldsymbol{Y}_{+}$$\boldsymbol{Y}_{-}$分别代表正负训练样本;引入参数$ \mathit{\boldsymbol{\beta }}$以降低训练数据中负样本对损失函数的影响[13],为了平衡正负样本之间的损失,参数设置:$\beta $=$|\boldsymbol{Y}_{-}|/|\boldsymbol{Y}|$,(1-$ \mathit{{\beta }}$) = $|\boldsymbol{Y}_{+}|/|\boldsymbol{Y}|$$Pr$($y_{m}$=1|$\boldsymbol{X}$; $\boldsymbol{W}$)和$Pr$($y_{m}$=0|$\boldsymbol{X}$; $\boldsymbol{W}$)分别表示第$m$个像素是否属于轮廓像素点的概率。

1.4 冗余度增强编码子网络(Redundancy-Net)

冗余度增强编码子网络Redundancy-Net的输入本身就是处理后的边界响应子图,是根据初级视皮层的方向敏感特性提取出大量图像边界和方向等代表性信息,另外特征提取层采用空洞卷积模块,目的是在增大感受野的情况下尽可能线性连接更多的神经元,充分发挥每一个方向信息点在轮廓检测中的贡献。因此本文取消Redundancy-Net网络特征提取层的最大池化模块,采取冗余化的方式增强边界细节特征,如图 5所示。Redundancy-Net由4个单元和1个融合层构成,每个单元由一个3×3,步长为1的普通卷积层与一个3×3、步长为1的空洞卷积层组成,每个单元中普通卷积核与空洞卷积核的个数相同,四个单元中卷积核的个数依次为32,64,128,256,空洞卷积的参数扩张度$d$分别等于2,2,4,4。每个卷积层后接一个修正线性单元(relu)作为激活函数。最后经过1个1×1卷积融合特征。其中空洞卷积核的每两个有效神经元之间都会存在若干个无效神经元(即:$d$ = 2表示卷积核中2个有效权值之间插入1个0权值;$d $= 4表示卷积核中2个有效权值之间插入3个0权值),整个卷积核的线性表示代表着上一层输入的某一视觉信息块中间隔神经元的线性组合,该视觉信息块即为隐含神经元群体的感受野,相互间隔的神经元可以重新组合成新的图像边界方向特征。融合层融合整个网络层对应的边界特征,形成表征图像局部细节轮廓的特征图。

图 5 Redundancy-Net结构示意图
Fig. 5 Redundancy-Net structure diagram

普通卷积的数学表达式为

$ \mathit{\boldsymbol{z}}(i,j) = \sigma \left( {\sum\limits_{p,q} {\mathit{\boldsymbol{f}}\left( {i + p,j + q} \right)} * \mathit{\boldsymbol{h}}\left( {p,q} \right) + b} \right) $ (9)

式中,$σ$(·)表示sigmoid函数;$ \mathit{\boldsymbol{h}}$($p$, $q$)表示卷积核在($p$, $q$)处的值;$\mathit{\boldsymbol{f}}$(·)表示待卷积图像;$b$为偏置。

空洞卷积目的是在增大感受野的情况下尽可能线性连接更多的神经元,因此在普通卷积的基础上增加了参数扩张度$d$,具体为

$ \begin{array}{*{20}{c}} {\mathit{\boldsymbol{z}}\left( {i,j} \right) = }\\ {\sigma \left( {\sum\limits_{p,q} {\mathit{\boldsymbol{f}}\left( {i + p \times d,j + q \times d} \right)} * \mathit{\boldsymbol{h}}\left( {p,q} \right) + b} \right)} \end{array} $ (10)

卷积核初始权重随机设置,将边界响应子图集输入Redundancy-Net,经过式(9)(10)所示的普通卷积和空洞卷积交叉卷积处理,最后的输出经sigmod函数激活与样本标签进行损失运算,同前所述,沿损失函数减小方向反向传播,从而迭代更新卷积核权重,最终获得训练后的Redundancy-Net模型。

1.5 整体和局部融合编码

考虑到视通路在处理复杂的视觉刺激时,并非单纯的某一条路径串级连接处理,而是多路径之间相互协作并行处理视觉信息流。受此启发,本文提出多路径协同作用下的整体和局部融合编码,基于对比度关系对Sparse-Net和Redundancy-Net的结果进行像素级融合。考虑到快速检测路径Sparse-Net的检测结果粗糙,且存在一些被漏检和误检的像素点;局部细节检测子网络Redundancy-Net的检测结果可以精细到边界处的细小纹理,但存在一些非轮廓的纹理噪声。因此根据视皮层对视信息流中亮度变化剧烈区域的感知敏感性,本文采用像素对比度来强化图像轮廓和非轮廓的区分度,将Sparse-Net和Redundancy-Net的输出特征图量化成灰度矩阵,分别记为$\boldsymbol{G}$($i$, $ j$)和$\boldsymbol{L}$($i$, $ j$)。以$\boldsymbol{L}$($i$, $ j$)的尺寸为基准,对$\boldsymbol{G}$($i$, $ j$)进行双线性插值。根据局部细节边缘信息$\boldsymbol{L}$($i$, $ j$)感受野内灰度最大值和最小值,计算$\boldsymbol{L}$($i$, $ j$)中每个像素点的对比度$temp$($i$, $j$),具体为

$ \mathit{temp}\left( {i,j} \right) = \frac{{{C_{\max }}\left( {i,j} \right) - {C_{\min }}\left( {i,j} \right)}}{{{C_{\max }}\left( {i,j} \right) + {C_{\min }}\left( {i,j} \right)}} $ (11)

式中,$C_{\max}$($i$, $j$)和$C_{min}$($i$, $j$)分别表示灰度矩阵$\boldsymbol{L}$中,以坐标($i$, $ j$)为中心8近邻的灰度最大值和最小值。

如果当前像素点的对比度值满足阈值条件,即$temp(u, v)>ξ$,则融合后的精细化轮廓检测结果$\mathit{\boldsymbol{R}}$($u$, $v$)计算为

$ \mathit{\boldsymbol{R}}\left( {u,v} \right) = \max \left( {\mathit{\boldsymbol{G}}\left( {u,v} \right),\mathit{\boldsymbol{L}}\left( {u,v} \right)} \right) $ (12)

如果$temp(u, v)≤ξ$,则$\mathit{\boldsymbol{R}}$($u$, $ v$)计算为

$ \mathit{\boldsymbol{R}}\left( {u,v} \right) = \min \left( {\mathit{\boldsymbol{G}}\left( {u,v} \right),\mathit{\boldsymbol{L}}\left( {u,v} \right)} \right) $ (13)

式中$ξ$表示轮廓像素点的对比度阈值。考虑到成像过程中的背景以及光线等因素,目标区域的对比度具有不确定性,而图像对比度最大值对应于相对凸显的细节信息,同时为了简化计算过程,本文将对比度阈值$ξ$和对比度最大值之间设置为线性跟随关系。

2 实验结果与分析

实验分为3个阶段。第1阶段,通过尺度分解处理训练样本图和对应的样本标签供Sparse-Net训练使用;通过方向选择处理训练样本图供Redundancy-Net训练使用。第2阶段,将尺度分解处理结果输入到Sparse-Net中训练网络模型;将方向选择处理结果输入到冗余度增强编码网络Redundancy-Net中训练网络模型。第3阶段,将待检测图像处理后分别输入到两个网络模型中,针对轮廓检测精度需求不是很高但要求快速检测的用户,直接获取Sparse-Net的输出即可;针对轮廓检测精度需求很高的用户,将两个网络的输出结果进行整体感知和局部细节的融合编码,获取精细检测的轮廓图。

2.1 实验数据和环境

本实验采用的是BSDS500自然图像数据集,数据中图像像素尺寸均为321×481像素或481×321像素,其中有200幅为训练图像集,200幅为测试图像集,100幅为验证图像集,每幅图像均为RGB图像,另外数据集有对应的人工标记。本文使用Tensorflow网络框架,硬件配置为GTX1080Ti。实验训练时设置的参数,两个网络各迭代训练20 000次;批量数为5;Sparse-Net的学习率为$3×10^{-5}$,Redundancy-Net的学习率为$5×10^{-5}$,各网络每迭代6 000次学习率下降1次,动量为0.9。训练时间,Sparse-Net大约耗时4 h;Redundancy-Net大约耗时6.5 h。整体和局部信息融合网络的对比度阈值$ξ$为最大对比度值的65%。

2.2 实验结果与讨论

将Sparse-Net和Redundancy-Net的响应进行融合编码,实现轮廓响应的整体感知和局部检测融合,获取轮廓的精细化感知结果,如图 6所示。

图 6 整体和局部融合效果图
Fig. 6 Global and local fusion effects((a)Sparse-Net; (b)Redundancy-Net; (c)information fusion)

图 6可以看出,1号区域的轮廓存在大量漏检,而2号区域存在大量误检,经融合编码修正,3号区域表现较好;再看4号区域轮廓比较模糊,5号区域轮廓纹理清晰但轮廓平滑度欠缺,而修正后的6号区域不仅轮廓清晰还很平滑。因此可以得出Sparse-Net的轮廓整体感知经Redundancy-Net的局部细节感知融合修复,获取轮廓的精细化感知结果。为了说明方法的适用性,本文给出了Sparse-Net和Redundancy-Net网络的更多检测效果图,如图 7所示。

图 7 Sparse-Net网络和Redundancy-Net网络的检测效果图
Fig. 7 Detection results of Sparse-Net and Redundancy-Net((a) the images to be detected; (b)Sparse-Net; (c)Redundancy-Net)

图 7可以看出,Sparse-Net网络的检测结果主要体现在主体轮廓上,虽然轮廓略显粗糙但是信息比较完整,符合快速检测路径的原理;Redundancy-Net网络的检测结果不但轮廓清晰而且包含很多细节纹理信息,体现冗余度增强的效果,符合精细检测路径的原理。

本文选择轮廓检测应用中Canny、文献[8]的OEF(oriented edge forests)和文献[10]的RCF等主流方法进行实验结果的比较,结果如图 8所示。其中G-Net (本文)表示本文的Sparse-Net方法、Fuse-Net (本文)表示本文的整体和局部融合编码方法。

图 8 轮廓检测效果对比图
Fig. 8 Comparison of contour detection results ((a)original images; (b)label images; (c)Canny; (d)OEF[8]; (e)G-Net (ours); (f)RCF; (g)Fuse-Net (ours))

检测后的轮廓图采用非最大抑制方法处理,以获得用于评估的细化轮廓。使用4种标准测量来评估轮廓检测的精度,即:1)数据集尺度上最优(ODS)的$F$评测指标;2)图片尺度上最优(OIS);3)平均准确率(AP);4)检测速率(FPS)。其中$F$评测指标的计算为

$ F = \frac{{2PR}}{{P + R}} $ (14)

式中,$P$表示像素点分类的准确率,$R$表示像素点的召回率。

图 9为BSDS500数据集中随机选取图片的准确率(precision)和召回率(recall)的数据曲线图,其中青色曲线代表G-Net (本文);红色曲线代表Fuse-Net (本文)。本文用BSDS500数据集的实验结果对G-Net (本文)、Fuse-Net (本文)以及其他轮廓检测方法进行了检测性能的对比,结果如表 1所示。

图 9 准确率和召回率的数据曲线图
Fig. 9 Data graphs of precision and recall

表 1 本文方法与其他方法检测性能结果对比
Table 1 Comparisons of performance between our method and other methods

下载CSV
方法 ODS OIS AP FPS/(幅/s)
Canny 0.611 0.676 0.52 15
ISCRA[14] 0.717 0.752 0.77 -
gPb-UCM[15] 0.729 0.755 0.745 1/240
SE[16] 0.743 0.764 0.8 2.5
MCG[17] 0.744 0.777 0.76 1/18
OEF[8] 0.746 0.77 0.815 2/3
DeepEdge[18] 0.753 0.772 0.807 1/1 000†
DeepContour[5] 0.757 0.776 0.79 1/30†
G-Net(本文) 0.765 0.783 0.774 42
HFL[19] 0.767 0.788 0.795 6/5†
HED[9] 0.788 0.808 0.84 30†
COB[20] 0.793 0.819 0.849 -
RCF[10] 0.806 0.823 0.839 30†
EGB[21] 0.614 0.658 0.564 10
BEL[22] 0.651 0.674 0.701 1/10
Fuse-Net(本文) 0.806 0.824 0.846 28†
注:加†表示GPU时间,未加为CPU时间。加粗字体表示最优结果。

图 9表 1可以看出,虽然G-Net (本文)的检测结果ODS = 0.765,OIS = 0.783,AP = 0.774处于中间水平,但检测速度FPS = 42†幅/s明显高于其他方法,而且G-Net (本文)在GTX1080Ti环境下检测速度达到42幅/s,为HFL方法1.2幅/s的35倍,此时G-Net (本文)的检测精度和HFL方法相差并不大。G-Net (本文)的检测精度虽然略小于HED方法和RCF方法,但速度大约是它们的1.4倍。充分说明单独Sparse-Net在满足一定精度要求的情况下,可以实现快速检测的任务要求。

Sparse-Net输出的整体特征和Redundancy-Net输出的局部特征通过对比度关系融合,即Fuse-Net (本文)方法,ODS = 0.806,OIS = 0.824,AP = 0.846等3个指标均高于其他方法,而且在检测速度上也优于RCF方法。充分说明本文方法在图像轮廓检测上具有较好的性能。

3 结论

以卷积神经网络为代表的深度学习方法在轮廓检测应用中受到了关注,虽然卷积神经网络在某些维度上可以利用视觉机制加以解释,例如卷积运算对应于视网膜视觉信息的拓扑映射,而池化运算又与视觉通路中的复杂细胞和简单细胞存在着一定关联,但卷积神经网络从整体上来看仍然是一种严重依赖于海量样本的黑箱式模型。考虑到实际视觉通路并非只是简单的信息串行传递,而是多通路视觉信息流在低高级视皮层上局部和整体特性的融合,因此本文提出一种多路径卷积神经网络的轮廓感知新方法。算法主要从以下几点模拟视觉机制建立模型:1)模拟生物视觉多尺度感知特性,通过尺度分解模型获取低分辨率子图,用来表征视觉信息中的整体轮廓;2)模拟初级视皮层经典感受野的方向选择特性,通过2维高斯导函数从多个选择方向择优选取,获得描述细节特征的边界响应子图;3)构建多路径卷积神经网络,利用包含池化单元在内的快速检测路径实现图像整体轮廓的稀疏编码,利用包含空洞卷积单元在内的细节检测路径实现图像局部细节的冗余度增强编码;4)对上述多路径卷积神经网络响应进行融合编码,以实现轮廓响应的整体感知和局部检测融合,最终获取轮廓的精细化感知结果。需要指出的是,虽然本文快速检测路径的检测精度在对比方法中处于中间水平,但检测效率较为理想;而Redundancy-Net和Sparse-Net结果的融合,明显提升了系统的检测性能,Fuse-Net (本文)方法的检测精度优于HED和RCF方法。本文以复杂纹理背景下的自然场景图像主体轮廓感知为例,模拟初级视通路多路径协同工作的神经编码机制,将有助于视觉系统内在机制的理解及其在视觉感知中的具体应用,为后续基于视觉机制的图像理解和分析提供了一种新思路。

参考文献

  • [1] Gonzalez C I, Melin P, Castro J R, et al. An improved sobel edge detection method based on generalized type-2 fuzzy logic[J]. Soft Computing, 2016, 20(2): 773–784. [DOI:10.1007/s00500-014-1541-0]
  • [2] Yang H Y, Wu J F, Yu Y J, et al. Content based image retrieval using color edge histogram in HSV color space[J]. Journal of Image and Graphics, 2018, 13(10): 2035–2038. [杨红颖, 吴俊峰, 于永健, 等. 一种基于HSV空间的彩色边缘图像检索方法[J]. 中国图象图形学报, 2018, 13(10): 2035–2038. ] [DOI:10.11834/jig.20081054]
  • [3] Lin C, Xu G L, Cao Y J. Contour detection model based on neuron behaviour in primary visual cortex[J]. IET Computer Vision, 2018, 12(6): 863–872. [DOI:10.1049/iet-cvi.2017.0661]
  • [4] Zhou T, Fan Y L, Zhu Y P, et al. Fast contour detection method based on hierarchical response model of primary visual pathway[J]. Space Medicine & Medical Engineering, 2018, 31(3): 75–83. [周涛, 范影乐, 朱亚萍, 等. 基于主视通路层级响应模型的轮廓检测方法[J]. 航天医学与医学工程, 2018, 31(3): 75–83. ] [DOI:10.16289/j.cnki.1002-0837.2018.03.012]
  • [5] Chen H, Qi X J, Yu L Q, et al. DCAN:deep contour aware networks for object instance segmentation from histology images[J]. Medical Image Analysis, 2017, 36: 135–146. [DOI:10.1016/j.media.2016.11.004]
  • [6] Yang W H, Feng J S, Yang J C, et al. Deep edge guided recurrent residual learning for image super resolution[J]. IEEE Transactions on Image Processing, 2017, 26(12): 5895–5907. [DOI:10.1109/TIP.2017.2750403]
  • [7] Dollár P, Zitnick C L. Fast edge detection using structured forests[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015, 37(8): 1558–1570. [DOI:10.1109/TPAMI.2014.2377715]
  • [8] Hallman S, Fowlkes C C. Oriented edge forests for boundary detection[C]//Proceedings of 2015 IEEE Conference on Computer Vision and Pattern Recognition. Boston, MA, USA: IEEE, 2015: 1732-1740.[DOI: 10.1109/CVPR.2015.7298782]
  • [9] Xie S N, Tu Z W. Holistically-nested edge detection[J]. International Journal of Computer Vision, 2017, 125(1-3): 3–18. [DOI:10.1007/s11263-017-1004-z]
  • [10] Liu Y, Cheng M M, Hu X W, et al. Richer convolutional features for edge detection[C]//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, Hawaii, USA: IEEE, 2017: 5872-5881.[DOI: 10.1109/CVPR.2017.622]
  • [11] Shao J, Gao J. Visual selective attention computational model based on synergetic perception[J]. Journal of Image and Graphics, 2008, 13(1): 129–136. [邵静, 高隽. 基于协同感知的视觉选择注意计算模型[J]. 中国图象图形学报, 2008, 13(1): 129–136. ] [DOI:10.11834/jig.20080124]
  • [12] Qian L L, Gao J, Xie Z. An improved hierarchical generic object recognition algorithm based on neural sparse coding[J]. Journal of Image and Graphics, 2010, 15(10): 1521–1529. [钱乐乐, 高隽, 谢昭. 一种融合神经稀疏编码机制的层次目标识别算法[J]. 中国图象图形学报, 2010, 15(10): 1521–1529. ] [DOI:10.11834/jig.20101004]
  • [13] Li Z M, Zhou C C, Gong Y H, et al. Saliency object detection based on domain transform and contour detection[J]. Journal of Computer-Aided Design & Computer Graphics, 2018, 30(8): 1457–1465. [李宗民, 周晨晨, 宫延河, 等. 结合域变换和轮廓检测的显著性目标检测[J]. 计算机辅助设计与图形学学报, 2018, 30(8): 1457–1465. ] [DOI:10.3724/SP.J.1089.2018.16778]
  • [14] Ren Z L, Shakhnarovich G. Image segmentation by cascaded region agglomeration[C]//Proceedings of 2013 IEEE Conference on Computer Vision and Pattern Recognition. Portland, OR, USA: IEEE, 2013: 2011-2018.[DOI: 10.1109/CVPR.2013.262]
  • [15] Arbelaez P, Maire M, Fowlkes C, et al. Contour detection and hierarchical image segmentation[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2011, 33(5): 898–916. [DOI:10.1109/TPAMI.2010.161]
  • [16] Dollár P, Zitnick C L. Structured forests for fast edge detection[C]//Proceedings of 2013 IEEE International Conference on Computer Vision. Sydney, Australia: IEEE, 2013: 1841-1848.[DOI: 10.1109/ICCV.2013.231]
  • [17] Arbeláez P, Pont-Tuset J, Barron J, et al. Multiscale combinatorial grouping[C]//Proceedings of 2014 IEEE Conference on Computer Vision and Pattern Recognition. Columbus, OH, USA: IEEE, 2014: 328-335.[DOI: 10.1109/CVPR.2014.49]
  • [18] Bertasius G, Shi J B, Torresani L. DeepEdge: a multi-scale bifurcated deep network for top-down contour detection[C]//Proceedings of 2015 IEEE Conference on Computer Vision and Pattern Recognition. Boston, MA, USA: IEEE, 2015: 4380-4389.[DOI: 10.1109/CVPR.2015.7299067]
  • [19] Bertasius G, Shi J B, Torresani L. High-for-Low and Low-for-High: efficient boundary detection from deep object features and its applications to high-level vision[C]//Proceedings of 2015 IEEE International Conference on Computer Vision. Santiago, Chile: IEEE, 2015: 504-512.[DOI: 10.1109/ICCV.2015.65]
  • [20] Maninis K K, Pont-Tuset J, Arbeláez P, et al. Convolutional oriented boundaries[C]//Proceedings of the 14th European Conference on Computer Vision. Amsterdam, The Netherlands: Springer, 2016: 580-596.[DOI: 10.1007/978-3-319-46448-0_35]
  • [21] Felzenszwalb P F, Huttenlocher D P. Efficient graph-based image segmentation[J]. International Journal of Computer Vision, 2004, 59(2): 167–181. [DOI:10.1023/b:visi.0000022288.19776.77]
  • [22] Dollar P, Tu Z, Belongie S. Supervised learning of edges and object boundaries[C]//Proceedings of 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. IEEE, 2006, 2: 1964-1971.[DOI: 10.1109/CVPR.2006.298]