Print

发布时间: 2022-04-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.200729
2022 | Volume 27 | Number 4




    图像分析和识别    




  <<上一篇 




  下一篇>> 





空洞可分离卷积和注意力机制的实时语义分割
expand article info 王囡1, 侯志强1, 蒲磊2, 马素刚1, 程环环1
1. 西安邮电大学计算机学院,西安 710121;
2. 空军工程大学信息与导航学院,西安 710077

摘要

目的 为满足语义分割算法准确度和实时性的要求,提出了一种基于空洞可分离卷积模块和注意力机制的实时语义分割方法。方法 将深度可分离卷积与不同空洞率的空洞卷积相结合,设计了一个空洞可分离卷积模块,在减少模型计算量的同时,能够更高效地提取特征;在网络输出端加入了通道注意力模块和空间注意力模块,增强对特征的通道信息和空间信息的表达并与原始特征融合,以进一步提高特征的表达能力;将融合的特征上采样到原图大小,预测像素类别,实现语义分割。结果 在Cityscapes数据集和CamVid数据集上进行了实验验证,分别取得70.4%和67.8%的分割精度,速度达到71帧/s,而模型参数量仅为0.66 M。在不影响速度的情况下,分割精度比原始方法分别提高了1.2%和1.2%,验证了该方法的有效性。同时,与近年来的实时语义分割方法相比也表现出一定优势。结论 本文方法采用空洞可分离卷积模块和注意力模块,在减少模型计算量的同时,能够更高效地提取特征,且在保证实时分割的情况下提升分割精度,在准确度和实时性之间达到了有效的平衡。

关键词

实时语义分割; 深度可分离卷积; 空洞卷积; 通道注意力; 空间注意力

Real-time semantic segmentation analysis based on cavity separable convolution and attention mechanism
expand article info Wang Nan1, Hou Zhiqiang1, Pu Lei2, Ma Sugang1, Cheng Huanhuan1
1. College of Computer, Xi'an University of Posts and Telecommunications, Xi'an 710121, China;
2. College of Information and Navigation, Air Force Engineering University, Xi'an 710077, China
Supported by: National Natural Science Foundation of China (62072370)

Abstract

Objective Image semantic segmentation is an essential part in computer vision analysis, which is related to autonomous driving, scenario recognitions, medical image analysis and unmanned aerial vehicle (UAV) application. To improve the global information acquisition efficiency, current semantic segmentation models can summarize the context information of different regions based on pyramid pooling module. Cavity-convolution-based multi-scale features extraction can increase the spatial resolution at different rates without changing the number of parameters. The feature pyramid network can be used to extract features and the multi-scale pyramid structure can be implemented to construct networks. The two methods mentioned above improve the accuracy of semantic segmentation. The practical applications are constrained of the size of the network and the speed of reasoning. Hence, a small capacity, fast and efficient real-time semantic segmentation network is a challenging issue to be designed. To require accuracy and real-time performance of semantic segmentation algorithm, a real-time semantic segmentation method is illustrated based on cavity separable convolution module and attention mechanism. Method First, the depth separable convolution is integrated to the cavity convolution with different rates to design a cavity separable convolution module. Next, the channel attention module and spatial attention module are melted into the performance of ending network-to enhance the representation of the channel information and spatial information of the feature, and integrate with the original features to obtain the final fused features to further improve the of the feature illustration capability. At the end, the fused features are up-sampled to the size of the original image to predict the category and achieve semantic segmentation. The targeted implementation can be segmented into feature extraction stage and feature enhancement stage. In the feature extraction stage, the input image adopts the cavity separable convolution module for intensive feature extraction. The module first uses a channel split operation to split the number of channels in half, splitting them into two branches. The following standard convolution is substituted to extract features more efficiently and shrink the number of model parameters based on deep separable convolution for each branch while. Meanwhile, the cavity convolution with different rates is used in the convolution layer of each branch to expand the receptive field and obtain multi-scale context information effectively. In the feature augmenting stage, the extracted features are re-integrated to enhance the demonstration of feature information. Our demonstration is illustrated as bellows: First, channel attention module and spatial attention module branch are melted into the model to enhance the expression of channel information and spatial information of features. Next, the global average pool branch is integrated to global context information to further improve the semantic segmentation performance. At the end, the branching features are all fused and the up-sampling process is used to match the resolution of the input image. Result Cityscapes dataset and the CamVid dataset are conducted on our method in order to verify the effectiveness of our illustrated method. The segmentation accuracy of Cityscapes dataset and CamVid dataset are 70.4% and 67.8% each. The running speed is 71 frame/s, while the model parameter amount was only 0.66 M. The demonstration illustrated that our method improves the segmentation accuracy to 1.2% and 1.2% each compared with the original method without low speed. Conclusion To customize the requirements of accuracy and real-time performance of semantic segmentation algorithm, a real-time semantic segmentation method is facilitated based on the cavity separable convolution module and the attention mechanism. This redesign depth method the can be combined with an efficient separation of convolution and cavity convolution in the depth of each separable branches with different cavity rate of convolution to obtain a different size of receptive field. The channel attention and spatial attention module are melted. Our method shrinks the number of model parameters and conducts feature information learning. Deeper network model and context aggregation module are conducted to achieve qualified real-time semantic segmentation simultaneously.

Key words

real-time semantic segmentation; depth separable convolution; hole convolution; channel attention; spatialattention

0 引言

图像语义分割(青晨等,2020)是计算机视觉领域的一个重要研究内容,广泛应用于自动驾驶、场景识别与理解和机器人等领域。在图像语义分割任务中,深度卷积神经网络的使用大幅提高了分割的准确性。Zhao等人(2017)提出的金字塔池化模块能够聚合不同区域的上下文信息,从而提高全局信息的获取能力;Chen等人(2017, 2018)提出了采用不同速率的空洞卷积提取多尺度特征,在增大空间分辨率的同时不改变参数数量;Kirillov等人(2019)Lin等人(2017)采用特征金字塔网络进行特征提取,利用多尺度金字塔结构构建网络。但是上述网络的规模、推理速度限制了它们在实际中的应用。因此,如何设计一个容量小、速度快并且高效的实时语义分割网络是一个亟需解决的问题。

针对这个问题,已经出现许多轻量级的网络平衡语义分割的准确度和实时性,这些网络大致分为网络修剪和卷积分解两类。网络修剪方法中,Han等人(2016)通过修剪技术去除预先训练模型的冗余以提高效率;Wen等人(2016)对深度神经网络进行稀疏化,达到加速的目的;Paszke等人(2016)通过修剪大量卷积滤波器以减少计算量。卷积分解方法中,Zhao等人(2018a)提出了一种包含多分辨率分支的图像级联网络,使用图像级联加速语义分割方法;Ma等人(2018)Howard等人(2017)Sandler等人(2018)用深度可分离卷积替代标准卷积解决卷积网络计算效率和参数量的问题,将标准卷积分解成一个深度卷积和一个点卷积;Romera等人(2017)通过将2D卷积分解成两个1D因子分解卷积,在获得与2D卷积相似准确率的情况下减少了参数量,达到实时的要求;Mehta等人(2018)不仅将标准卷积进行分解,还引入了一个高效的空间金字塔,提升了速度和性能。Wang等人(2019)将深度可分离卷积与空洞卷积(Yu和Koltun,2016)相结合,在保持参数数量不变的同时产生大的感受野,获得参数量小、精度高的实时分割效果,但是在每个分支采用了空洞率大小相同的空洞卷积,不能获取不同大小的感受野信息。

注意力机制最早用于自然语言处理(Nadkarni等,2011)。随后因为注意力机制的有效性,相关人员将注意力机制引入语义分割任务(Zhao等,2018bYuan等,2021Fu等,2019)并获得不错的表现。注意力机制在获取整个输入特征时也具有选择性,目的是使网络将重点放在某些关键信息上增强特征的表达。Hu等人(2018)提出了一种有效的通道注意力模块,提升有用通道的重要性,抑制无用通道的重要性,取得了良好的性能。Woo等人(2018)借鉴了通道注意力模块的设计思想,将通道注意力模块与空间注意力模块相结合,增强对特征的通道信息和空间信息的表达。

基于上述分析,对于实时语义分割任务来说,在有限的资源下追求更好的分割准确性仍有进一步改进空间。本文提出了一种新的网络结构用于实时语义分割,主要工作如下:1)为了有效获取不同大小的感受野信息,设计了一个结合深度可分离卷积和不同大小空洞率的空洞卷积模块,将深度可分离卷积和不同空洞率的空洞卷积相结合,在减少模型计算量的同时,可以更高效地提取特征。2)在网络输出端,先引入通道注意力模块,获取特征不同通道之间的重要性,再采用级联的方式,将空间注意力模块进行结合,增强了特征的空间信息和通道信息的表达,并与原始特征融合以进一步提高对特征的表达能力。3)在Cityscapes数据集和CamVid数据集上进行测试,并与近几年类似方法进行比较,结果表明本文方法在准确度和实时性之间取得了有效平衡。

1 本文工作

1.1 网络总体框架

本文提出的基于空洞可分离卷积模块和注意力机制的实时语义分割主要分为特征提取阶段和特征增强阶段,如图 1所示。其中,特征提取阶段由下采样模块(down-sampling unit)和空洞可分离卷积模块(dilated separable convolution module,DSCM)组成。特征增强阶段由通道注意力模块(channel attention module,CAM)、空间注意力模块(spatial attention module,SAM)、全局平均池化(global average pooling,GAP)和上采样(upsampling)组成。

图 1 网络总体框架图
Fig. 1 Overall framework of the network

在特征提取阶段,输入图像先经过下采样操作,该下采样操作由步长为2的3×3卷积和2×2的最大池化组成。因为下采样操作减小了特征图的大小,对最终的预测结果产生影响。为了保留空间信息细节,本文模型首先使用3次下采样操作,获得原图1/8的特征图分辨率,然后采用本文设计的空洞可分离卷积模块密集提取特征。该模块使用通道分离操作将通道数分为原来的一半,分成两个分支。每个分支用深度可分离卷积代替标准卷积,以此减少参数量,并在每个分支的卷积层使用不同空洞率的空洞卷积扩大感受野,有效获取多尺度上下文信息。

在特征增强阶段,对提取的特征进行了重新整合,增强特征信息表达,具体操作如下:首先,本文在模型中同时引入通道注意力模块和空间注意力模块分支,增强特征的通道信息和空间信息的表达。其次,为了进一步提高语义分割性能,引入全局平均池化分支整合全局上下文信息。最后,将所有分支特征进行融合,并使用上采样操作匹配输入图像的分辨率。

1.2 空洞可分离卷积模块

通过深度可分离卷积和残差连接的组合提取网络特征是轻量级网络常用的方法。如Romera等人(2017)提出的Non-bottleneck-1D模块和Wang等人(2019)提出的SS-nbt模块,如图 2所示。Non-bottleneck模块采用两组1维分解卷积代替标准卷积,使精度和参数量获得一个平衡,是一个单分支模块。SS-nbt模块采用双分支结构,每个分支使用两组1维卷积,在最后一组卷积中使用相同空洞率(dilation rate,D)的空洞卷积,最后合并两个分支。然而这些方式在网络学习能力和效率方面依然会有一些限制,没有考虑到多尺度信息的获取。在Chen等人(2018)对多尺度信息工作研究的启发下,在本文的模块(DSCM)中,同样采用双分支结构,并且在每个分支结合了不同大小空洞率(D1D2)的空洞卷积,有效获取多尺度信息,如图 2(c)所示。

图 2 不同类型模块的比较(w为通道数)
Fig. 2 Comparison of different types of modules (w is the number of channels)
((a) Non-bottleneck-1D;(b) SS-nbt; (c) DSCM)

首先,对于输入,使用通道分离操作将通道数分为原来的一半,分成两个分支。针对每个分支采用一组可分离卷积代替标准卷积,以此减少参数量。然而,简单地使用深度可分离卷积代替标准卷积会导致性能下降,并且在语义分割中多尺度信息的获取同样重要。所以本文将深度可分离卷积与空洞卷积相结合,在每个分支上的卷积层使用不同大小空洞率的空洞卷积扩大感受野,有效获取多尺度信息。在第1个分支采用空洞率为D1的空洞卷积,在第2个分支采用空洞率为D2的空洞卷积。在结构参数的选择上,与Yu和Koltun(2016)的选择相同,每个分支采用不同空洞率的空洞卷积大小依次以2、4、8、16为基准进行设计,按此顺序逐渐扩大感受野。然后,使用concat操作将两个分支进行合并,恢复原有通道数。因为两个分支考虑了不同大小感受野信息,所以使用1 × 1卷积促进融合两个分支之间的信息,加强信息之间的交流,增强特征表达,并且将输入特征和两个分支融合后的特征进行残差连接操作,便于训练。

与其他可分离卷积模块(图 2(a)(b))相比,本文模块不仅具有足够的感受野,密集地利用多尺度信息,而且具有更少的参数量和更强的特征表达能力。

1.3 通道注意力模块

图像经过卷积操作之后,特征图的各通道往往表达不同的特征,这些特征对于分割的影响存在差异。其中,特征图中的每个通道都保持相同的权重,没有考虑每个通道之间的重要性关系,不利于增强目标的特征信息。而通道注意力模块可以获取特征图不同通道间的重要程度,并赋予每个通道相应的权重,能够更好地利用权重高的特征并抑制权重低的特征,增强特征之间的表达。

通道注意力模块如图 3所示。首先,对于输入的特征图F,在空间维度上使用平均池化和最大池化操作提取空间和通道权重,得到两个不同的特征描述,分别表示平均池化特征和最大池化特征。然后,将两个描述特征送到多层感知(multi-layer perceptron,MLP)中,将MLP输出的特征进行融合操作。具体为

$ \boldsymbol{F}_{\mathrm{avg}}=\operatorname{MLP}(AvgPool(\boldsymbol{F})) $ (1)

$ \boldsymbol{F}_{\max }=\operatorname{MLP}(MaxPool(\boldsymbol{F})) $ (2)

$ \boldsymbol{F}_{\mathrm{m}}=\boldsymbol{F}_{\mathrm{avg}}+\boldsymbol{F}_{\max } $ (3)

图 3 通道注意力模块
Fig. 3 Channel attention module

式中,Favg表示平均池化后进行MLP后的特征,Fmax表示最大化池化后进行MLP后的特征,Fm表示将MLP输出的特征进行加权操作,F表示输入的特征图。

最后,再经过sigmoid激活函数生成通道注意力特征图,将注意力特征图与输入特征图相乘得到具有通道关注的特征图。具体为

$ \boldsymbol{F}_{\mathrm{c}}=\sigma\left(\boldsymbol{F}_{\mathrm{m}}\right) \cdot \boldsymbol{F} $ (4)

式中,F表示输入特征图,Fc表示加入通道注意力之后的特征图。

1.4 空间注意力模块

不同于通道注意力模块,空间注意力模块更加侧重于关注空间位置信息,由于卷积运算通过将通道和空间信息混合在一起提取特征,因此在分割任务中起着重要作用。本文采用空间注意力模块,如图 4所示,在获取特征图的不同通道间的重要程度时,还能获取特征图的空间位置信息的重要程度,突出关键特征的位置,从而增强特征图表示能力。

图 4 空间注意力模块
Fig. 4 Spatial attention module

首先,对经过通道注意力模块得到的特征图Fc在通道维度上进行平均池化和最大池化,得到两个不同信息表示的特征图。具体为

$ \boldsymbol{F}_{\mathrm{avg}}^{\mathrm{c}}=Avg\left(\boldsymbol{F}_{\mathrm{c}}\right) $ (5)

$ \boldsymbol{F}_{\max }^{\mathrm{c}}=Avg\left(\boldsymbol{F}_{\mathrm{c}}\right) $ (6)

式中,Fc表示经过通道注意力的特征图,Favgc表示经过平均池化后的特征,Fmaxc表示经过最大池化后的特征。

其次,使用concat操作将这两个不同表示的特征图进行直接拼接,再使用大小为7 × 7的卷积层进行卷积,再经过sigmoid激活函数得到空间注意力特征图。具体为

$ \boldsymbol{F}_{\mathrm{ss}}=\sigma\left(f\left[\boldsymbol{F}_{\mathrm{avg}}^{\mathrm{c}} ; \boldsymbol{F}_{\max }^{\mathrm{c}}\right]\right) $ (7)

式中,f[Favgc; Fmaxc]表示卷积操作,Fss为经过激活后的特征。

最后,将Fss与输入特征Fc相乘即可得到具有空间关注的特征图Fs

2 实验结果与分析

2.1 数据集及评价指标

本文实验中采用两个数据集进行结果分析比较,分别是Cityscapes数据集和CamVid数据集。

Cityscapes是一个大型城市街道场景数据集,在语义分割领域广泛使用,包含5 000幅精细标注的图像和20 000幅粗略标注的图像。本文实验只使用精细标注的图像,包含2 975幅用于训练的精细注释图像、1 525幅用于测试的图像和500幅用于验证的图像。

CamVid数据集是从驾驶汽车的角度来看的一个街景数据集,包含701幅图像,其中367幅用于训练,101幅用于验证,233幅用于测试。数据集包含11个语义类别。

本文采用的评价指标为平均交并比(mean intersection over union,mIoU)和每秒处理帧数(frames per second,FPS),这两种评价指标为当前语义分割应用较多的标准度量。

mIoU计算两个集合为真实值和预测值的交集与并集之比,用于评价算法精度。IoU(intersection over union)是每一个类别的交集与并集之比,而mIoU则是所有类别的平均IoU,具体计算为

$ f_{\mathrm{mIoU}}=\frac{1}{k+1} \sum\limits_{i=0}^{k} \frac{p_{i j}}{\sum\limits_{j=0}^{k} p_{i j}+\sum\limits_{j=0}^{k} p_{j i}-p_{i i}} $ (8)

式中,k是前景对象的个数,pij是指原本属于第i类却分类到第j类的像素的数量。

FPS用于评价算法速度,具体计算为

$ f_{\mathrm{FPS}}=\frac{N}{\sum\limits_{j=1}^{N} T_{j}} $ (9)

式中,N表示图像数量,Tj表示算法处理第j幅图像的时间。

2.2 实验结果

2.2.1 算法消融实验

为了验证模块的性能,对各模块分别进行实验,由于本文方法采用的通道注意力模块和空间注意力模块均为轻量级,几乎不增加参数量,因此采用mIoU和FPS为评价标准,同步进行分析,验证各模块对提升整体方法的性能表现,实验结果如表 1所示。包括空洞可分离卷积模块(dilated separable convolution module,DSCM)、通道注意力模块(channel attention module,CAM)、空间注意力模块(spatial attention module,SAM)以及全局平均池化(global average pooling,GAP)。

表 1 引入各模块的性能比较
Table 1 Performance comparison of the introduced modules

下载CSV
模块 mIoU/% FPS/(帧/s)
DSCM 69.2 73
DSCM+CAM 69.9 72
DSCM+SAM 69.8 72
DSCM+CAM+SAM 70.2 71
DSCM+CAM+SAM+GAP 70.4 71
注:加粗字体表示各列最优结果。

首先,仅采用空洞可分离卷积模块(DSCM)提取图像特征并上采样进行输出,得到69.2%的精度和73帧/s的速度。然后,在此基础上仅引入通道注意力模块(DSCM + CAM),对特征不同通道间的信息进行增强,得到69.9%的精度和72帧/s的速度。随后,考虑空间注意力模块(DSCM + SAM),增强特征的空间位置信息,在特征提取后,仅引入空间注意力模块,得到69.8%的精度和72帧/s的速度。受Woo等人(2018)将通道注意力模块和空间注意力模块组合使用的启发,将通道注意力模块和空间注意力模块(DSCM + CAM + SAM)级联使用,在特征提取后,先引入通道注意力模块,再通过级联的方式引入空间注意力模块,同时增强通道和空间特征之间的表达,得到70.2%的精度和71帧/s的速度。最后,引入全局平均池化模块(DSCM + CAM + SAM + GAP)以获得一个大的感受野,最终得到70.4%的精度和71帧/s的速度。

为了更加直观地显示各模块的性能,图 5给出了加入不同模块的分割结果图。可以看出,加入通道注意力模块后,当图像中有相似目标出现时,不会互相造成干扰,减少了分割错误;加入空间注意力模块后,对于一些细小类别可以在一定程度上正确分割出来;因此同时引入通道注意力模块和空间注意力模块,可以对图像中重要目标的位置和特征种类有所侧重,能够更好地理解图像中的内容;最后在此基础上加入全局平均池化模块,获得图像中的全局信息,有效改善分割结果。

图 5 引入各模块的结果比较
Fig. 5 Comparison of results with introduced modules
((a)input images; (b)DSCM; (c)DSCM + CAM; (d)DSCM + SAM; (e)DSCM + CAM + SAM; (f)DSCM + CAM + SAM + GAP)

上述实验证明,算法中各模块对整体分割精度都有提升作用,算法结构设计合理。训练出的模型性能得到有效提升。

2.2.2 Cityscapes数据集上的结果

为了验证本文方法的性能,在Cityscapes数据集中选取4幅图像与CGNet(context guided network)(Wu等,2020)、ERFNet(efficient residual factorized ConvNet)(Romera等,2017)、ICNet(image cascade network)(Zhao等,2018a)、ESPNetV2(efficient spatial pyramid network V2)(Mehta等,2019)和LEDNet(light encoder-decoder network)(Wang等,2019)等实时语义分割方法分别进行定性和定量实验对比,结果如图 6表 2所示。

图 6 不同方法在Cityscapes数据集上的实验结果对比
Fig. 6 Comparison of experimental results among different mothods on the Cityscapes dataset
((a)input images; (b)ground truth; (c)CGNet; (d)ERFNet; (e)ICNet; (f)ESPNetV2;(g)LEDNet; (h)ours)

表 2 不同方法在Cityscapes数据集上的对比结果
Table 2 Comparison of results among different methods on the Cityscapes dataset

下载CSV
方法 mIoU/% FPS/(帧/s) 参数量/MB
CGNet 64.8 50 0.5
ERFNet 68.1 42 2.1
ICNet 69.5 30 26.5
ESPNetV2 66.2 67 1.25
LEDNet 69.2 71 0.94
本文 70.4 71 0.66
注:加粗字体表示各列最优结果。

图 6的定性对比结果可以看出,第1行图像中,与其他方法相比,本文方法对路中间的人可以很清晰地分割出来;第2行图像中,本文方法对图像中的一群人能很好地进行分割,不会互相造成干扰;第3行图像中,本文对一些细小类别,比如电线杆、路标具有更好地分割效果;第4行图像中,对比方法对车辆分割存在相似类别信息干扰,而本文方法可以避免相似类别信息干扰。实验结果表明,本文方法具有良好的语义分割能力和识别能力。

表 2的定量实验结果可以看出,与对比方法相比,本文方法的分割精度分别提升了5.6%、2.3%、0.9%、4.2%和1.2%。在模型参数量上,虽然CGNet有较小的参数量,略低于本文方法,但本文方法的分割精度明显高于CGNet,比CGNe提升了5.6%。在分割速度上,CGNet为50帧/s,本文方法达到71帧/s。与基准算法LEDNet相比,在保持分割速度相等的情况下,本文方法的分割精度提高了1.2%,参数量降低了0.28 MB。通过实验比较,本文方法在准确度和实时性之间取得了有效平衡。

2.2.3 CamVid数据集上的结果

在CamVid数据集上同样选取4幅图像进行实验验证,与CGNet(Wu等,2020)、ICNet(Zhao等,2018a)和LEDNet(Wang等,2019)等实时语义分割方法分别进行定性和定量实验对比,结果如图 7表 3所示。

图 7 不同方法在CamVid数据集上的实验结果对比
Fig. 7 Comparison of experimental results among different mothods on the CamVid dataset
((a)input images; (b)ground truth; (c)CGNet; (d)ICNet; (e)LEDNet; (f)ours)

表 3 不同方法在CamVid数据集上的对比结果
Table 3 Comparison of results among different methods on the CamVid dataset

下载CSV
方法 mIoU/% FPS/(帧/s) 参数量/MB
CGNet 65.6 50 0.5
ICNet 67.1 30 26.5
LEDNet 66.6 71 0.94
本文 67.8 71 0.66
注:加粗字体表示各列最优结果。

图 7的定性对比结果可以看出,本文方法基本能够准确识别图像中物体位置并且分割出物体,而CGNet在第1、2行的图像中未能识别出路灯,ICNet和LEDNet在第3行的图像中未能很好地分割出广告牌,在第4行的图像中对比方法对路面以及远距离小物体路灯未能很好地识别出来。实验结果表明,本文方法具有良好的语义分割能力和识别能力。

表 3的定量实验结果可以看出,与对比方法相比,本文方法的分割精度分别提升了2.2%、0.6%和1.2%。在模型参数量上,CGNet有较小的参数量,而本文方法的参数量略高于CGNet,但本文方法的分割精度比CGNet提升了2.2%。与基准算法LEDNet相比,在保持分割速度相等的情况下,本文方法的分割精度提高了1.2%,参数量降低了0.28 MB,在保持实时的情况下提升分割精度。从实验结果分析可以发现,本文方法在参数量较少的条件下,具有较高的分割精度,同时保持了较好的分割速度。可见,本文方法在图像语义分割的实时性和准确性之间取得了很好的平衡,是一种性能优良的实时语义分割算法。

3 结论

为满足对语义分割算法准确度和实时性的要求,本文提出一种基于空洞可分离模块和注意力机制的实时语义分割方法。基于考虑到多尺度信息的获取,本文方法将深度可分离卷积与不同空洞率的空洞卷积有效结合,在每个深度可分离卷积分支上采用不同空洞率的空洞卷积获取不同大小的感受野,并且引入通道注意力模块和空间注意力模块,增强特征的表达。在Cityscapes和CamVid数据集上进行实验验证,精度分别为70.4%和67.8%,分割速度达到71帧/s,模型参数量仅为0.66 MB。本文方法在参数量较少的条件下,具有较高的分割精度,同时保持了较好的分割速度,在语义分割实时性和准确度之间取得了很好的平衡。在下一步工作中,将考虑使用更深的网络模型和引入上下文聚合模块进行实时语义分割,进一步提高语义分割算法的性能。

参考文献

  • Chen L C, Papandreou G, Kokkinos I, Murphy K, Yuille A L. 2017. Deeplab: semantic image segmentation with deep convolutional nets, Atrous convolution, and fully connected CRFs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(4): 834-848 [DOI:10.1109/TPAMI.2017.2699184]
  • Chen L C, Zhu Y K, Papandreou G, Schroff F and Adam H. 2018. Encoder-decoder with Atrous separable convolution for semantic image segmentation//Proceedings of the 15th European Conference on Computer Vision (ECCV). Munich, Germany: Springer: 833-851 [DOI: 10.1007/978-3-030-01234-2_49]
  • Fu J, Liu J, Tian H J, Li Y, Bao Y J, Fang Z W and Lu H Q. 2019. Dual attention network for scene segmentation//Proceedings of 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach, USA: IEEE: 3141-3149 [DOI: 10.1109/CVPR.2019.00326]
  • Han S, Mao H Z and Dally W J. 2016. Deep compression: compressing deep neural networks with pruning, trained quantization and Huffman coding [EB/OL]. [2020-11-14]. https://arxiv.org/pdf/1510.00149.pdf
  • Howard A G, Zhu M L, Chen B, Kalenichenko D, Wang W J, Weyand T, Andreetto M and Adam H. 2017. MobileNets: efficient convolutional neural networks for mobile vision applications [EB/OL]. [2020-11-14]. https://arxiv.org/pdf/1704.04861.pdf
  • Hu J, Shen L and Sun G. 2018. Squeeze-and-excitation networks//Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City, USA: IEEE: 7132-7141 [DOI: 10.1109/CVPR.2018.00745]
  • Kirillov A, Girshick R, He K M and Dollár P. 2019. Panoptic feature pyramid networks//Proceedings of 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach, USA: IEEE: 6392-6401 [DOI: 10.1109/CVPR.2019.00656]
  • Lin T Y, Dollár P, Girshick R, He K M, Hariharan B and Belongie S. 2017. Feature pyramid networks for object detection//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, USA: IEEE: 936-944 [DOI: 10.1109/CVPR.2017.106]
  • Ma N N, Zhang X Y, Zheng H T and Sun J. 2018. ShuffleNet V2: practical guidelines for efficient CNN architecture design//Proceedings of the 15th European Conference on Computer Vision (ECCV). Munich, Germany: Springer: 122-138 [DOI: 10.1007/978-3-030-01264-9_8]
  • Mehta S, Rastegari M, Caspi A, Shapiro L and Hajishirzi H. 2018. ESPNet: efficient spatial pyramid of dilated convolutions for semantic segmentation//Proceedings of the 15th European Conference on Computer Vision (ECCV). Munich, Germany: Springer: 561-580 [DOI: 10.1007/978-3-030-01249-6_34]
  • Mehta S, Rastegari M, Shapiro L and Hajishirzi H. 2019. ESPNetv2: a light-weight, power efficient, and general purpose convolutional neural network//Proceedings of 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach, USA: IEEE: 9182-9192 [DOI: 10.1109/CVPR.2019.00941]
  • Nadkarni P M, Ohno-Machado L, Chapman W W. 2011. Natural language processing: an introduction. Journal of the American Medical Informatics Association, 18(5): 544-551 [DOI:10.1136/amiajnl-2011-000464]
  • Paszke A, Chaurasia A, Kim S and Culurciello E. 2016. ENet: a deep neural network architecture for real-time semantic segmentation [EB/OL]. [2020-11-14]. https://arxiv.org/pdf/1606.02147.pdf
  • Qing C, Yu J, Xiao C B, Duan J. 2020. Deep convolutional neural network for semantic image segmentation. Journal of Image and Graphics, 25(6): 1069-1090 (青晨, 禹晶, 肖创柏, 段娟. 2020. 深度卷积神经网络图像语义分割研究进展. 中国图象图形学报, 25(6): 1069-1090) [DOI:10.11834/jig.190355]
  • Romera E, Álvarez J M, Bergasa L M, Arroyo R. 2017. ERFNet: efficient residual factorized ConvNet for real-time semantic segmentation. IEEE Transactions on Intelligent Transportation Systems, 19(1): 263-272 [DOI:10.1109/TITS.2017.2750080]
  • Sandler M, Howard A, Zhu M L, Zhmoginov A and Chen L C. 2018. MobileNetV2: inverted residuals and linear bottlenecks//Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City, USA: IEEE: 4510-4520 [10.1109/CVPR.2018.00474]
  • Wang Y, Zhou Q, Liu J, Xiong J, Gao G W, Wu X F and Latecki L J. 2019. Lednet: a lightweight encoder-decoder network for real-time semantic segmentation//Proceedings of 2019 IEEE International Conference on Image Processing (ICIP). Taipei, China: IEEE: 1860-1864 [DOI: 10.1109/ICIP.2019.8803154]
  • Wen W, Wu C P, Wang Y D, Chen Y R and Li H. 2016. Learning structured sparsity in deep neural networks//Proceedings of the 30th International Conference on Neural Information Processing Systems. Barcelona, Spain: ACM: 2082-2090 [DOI: 10.5555/3157096.3157329]
  • Woo S, Park J, Lee J Y and Kweon I S. 2018. CBAM: convolutional block attention module//Proceedings of the 15th European Conference on Computer Vision (ECCV). Munich, Germany: Springer: 3-19 [DOI: 10.1007/978-3-030-01234-2_1]
  • Wu T Y, Tang S, Zhang R, Cao J, Zhang Y. 2020. CGNet: a light-weight context guided network for semantic segmentation. IEEE Transactions on Image Processing, 30: 1169-1179 [DOI:10.1109/TIP.2020.3042065]
  • Yu F and Koltun V. 2016. Multi-scale context aggregation by dilated convolutions. [EB/OL]. [2020-11-14]. https://arxiv.org/pdf/1511.07122.pdf
  • Yuan Y H, Huang L, Guo J Y, Zhang C, Chen X L and Wang J D. 2021. OCNet: object context network for scene parsing [EB/OL]. [2021-03-15]. https://arxiv.org/pdf/1809.00916.pdf
  • Zhao H S, Qi X J, Shen X Y, Shi J P and Jia J Y. 2018a. ICNet for real-time semantic segmentation on high-resolution images//Proceedings of the 15th European Conference on Computer Vision (ECCV). Munich, Germany: Springer: 418-434 [DOI: 10.1007/978-3-030-01219-9_25]
  • Zhao H S, Shi J P, Qi X J, Wang X G and Jia J Y. 2017. Pyramid scene parsing network//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, USA: IEEE: 6230-6239 [DOI: 10.1109/CVPR.2017.660]
  • Zhao H S, Zhang Y, Liu S, Shi J P, Loy C C, Lin D H and Jia J Y. 2018b. PSANet: point-wise spatial attention network for scene parsing//Proceedings of the 15th European Conference on Computer Vision (ECCV). Munich, Germany: Springer: 270-286 [DOI: 10.1007/978-3-030-01240-3_17]