Print

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




    图像分析和识别    




  <<上一篇 




  下一篇>> 





多尺度特征融合工件目标语义分割
expand article info 和超, 张印辉, 何自芬
昆明理工大学机电工程学院, 昆明 650500

摘要

目的 目标语义特征提取效果直接影响图像语义分割的精度,传统的单尺度特征提取方法对目标的语义分割精度较低,为此,提出一种基于多尺度特征融合的工件目标语义分割方法,利用卷积神经网络提取目标的多尺度局部特征语义信息,并将不同尺度的语义信息进行像素融合,使神经网络充分捕获图像中的上下文信息,获得更好的特征表示,有效实现工件目标的语义分割。方法 使用常用的多类工件图像定义视觉任务,利用残差网络模块获得目标的单尺度语义特征图,再结合本文提出的多尺度特征提取方式获得不同尺度的局部特征语义信息,通过信息融合获得目标分割图。使用上述方法经多次迭代训练后得到与视觉任务相关的工件目标分割模型,并对训练权重与超参数进行保存。结果 将本文方法和传统的单尺度特征提取方法做定性和定量的测试实验,结果表明,获得的分割网络模型对测试集中的目标都具有较精确的分割能力,与单尺度特征提取方法相比,本文方法的平均交并比mIOU(mean intersection over union)指标在验证集上训练精度提高了4.52%,在测试集上分割精度提高了4.84%。当测试样本中包含的目标种类较少且目标边缘清晰时,本文方法能够得到更精准的分割结果。结论 本文提出的语义分割方法,通过多尺度特征融合的方式增强了神经网络模型对目标特征的提取能力,使训练得到的分割网络模型比传统的单尺度特征提取方式在测试集上具有更优秀的性能,从而验证了所提出方法的有效性。

关键词

残差网络; 语义分割; 多尺度特征; 深度学习; 视觉任务

Semantic segmentation of workpiece target based on multiscale feature fusion
expand article info He Chao, Zhang Yinhui, He Zifen
College of Mechanical and Electrical Engineering, Kunming University of Science and Technology, Kunming 650500, China
Supported by: National Natural Science Foundation of China (61461022, 61761024)

Abstract

Objective Image segmentation technology is one of the most difficult aspects of computer vision and image processing and is an indispensable step in the process of understanding and analyzing image information. The disadvantage of image segmentation technology is that the size and direction of the target in the image make the level of the image unpredictable. At the same time, the segmentation of images has a complex background, different brightness, and different textures is still problems in the image segmentation technology. The target semantic feature extraction effect directly influences the accuracy of image semantic segmentation. The image capturing device mounted on the robot has a variable spatial relationship with the target during the operation of the robot in the automated production line that segments the target by machine vision technology. When the image capturing device takes images from different distances and angles, the target has different scales in the image. The traditional single-scale feature extraction method has lower precision for semantic segmentation of the target. This study shows how to use the context information of the image to create the multiscale feature fusion module and develop the ability to extract rich target features and improve the segmentation performance of the network model. Method This paper proposes a method of workpiece target semantic segmentation based on multiscale feature fusion. The convolutional neural network is used to extract the multiscale local feature semantic information of the target, and the semantic information of different scales is pixel-fused so that the neural network fully captures context information of the image and obtains a better feature representation, thereby effectively achieving semantic segmentation of the workpiece target. The method uses the ResNet as the underlying network structure and combines the image gold tower theory to construct a multiscale feature fusion module. As the image pyramid is simply a change in image resolution, although the multiscale information representation of the image can be obtained, the output of the fourth block layer of the ResNet network is already a feature map with a small dimension. Reduced resolution of the feature map is not conducive to the feature response of the network model and tends to increase the amount of parameters calculated by the network model. Therefore, the resolution reduction operation in the original image pyramid is replaced in the form of the atrous convolution. The sensitivity field of the filter is effectively increased under a nonreduced resolution of the image, and the local feature information of the superior image can be fully obtained. In this study, a three-layer image pyramid is used, where the bottom layer image is the feature map of the Block4 layer output, the middle layer is a plurality of parallel atrous convolution layers with different sampling rates to extract local feature information of different scales, and the top layer is the fusion layer of the local feature information extracted by the middle layer. Result The method of this study is compared with the traditional single-scale feature extraction method through qualitative and quantitative experimental methods, and mean intersection over union (mIOU) is used as the evaluation index. Experiments show that the segmentation network model obtained by this method has more accurate segmentation ability for the targets in the test set. Compared with the traditional single-scale feature extraction network, the mIOU evaluation index of this method on the test set is improved by 4.84% compared with the network that also adopts the porous convolution strategy. The parallel structure proposed in this paper improves the mIOU evaluation index on the test set by 3.57%, compared with the network using the atrous spatial pyramid pooling strategy to improve the network semantic segmentation ability. The mIOU evaluation index of the method in the test set is also improved by 2.24%. When the test sample contains fewer types of targets and the target edges are clearer, more accurate segmentation results can be obtained. To verify that the method has certain generalization, this study uses the method to verify the dataset of the tennis court scene. The tennis court scene dataset includes nine categories of goals:tennis, rackets, inside the tennis court, venue lines, outside the tennis court, nets, people, tennis court fence, and sky. The size and scale of these types of targets are different, which is consistent with the multiscale feature extraction ideas proposed in this paper. Under the condition that the parameters set by the method are completely adopted and the network model has not optimized the parameter for the tennis court scene dataset in the mIOU evaluation index of the test set, the accuracy increased from 54.68% to 56.43%. Conclusion This study introduces the labeling method of multi-workpiece datasets, and uses methods such as data expansion and definition of learning rate update to effectively prevent the overfitting phenomenon in network training and improve the basic performance of the network model. The value of the neural network depth and the value of the hyperparameter in the neural network training process are determined by comparing the experiments. At the same time, a multiscale feature fusion module is designed to extract multiscale semantic information of the target. The multiscale feature fusion enhances the ability of the neural network model to extract the target features, and the designed MsFFNet network model in more accurate in extracting the semantic features of the target. Therefore, the method can perform the semantic segmentation task of robot vision-based robotic grabbing target on the automated production line under the condition that the spatial position between the image capturing device and the target is variable. In this study, the network model determined by the specific dataset provides a reference value for the subsequent artifact detection. The next step will also focus on the generalization ability of the dataset of other industrial scenes.

Key words

residual network; semantic segmentation; multiscale feature; deep learning; visual task

0 引言

图像分割技术是计算机视觉与图像处理中最基本的难点之一, 也是理解与分析图像信息过程中必不可少的一步。近年来,由于图像分割技术的应用领域不断延伸,使得如何精准有效地分割目标成为研究热点。图像分割的难点主要是图像中物体的大小和方向使图像的层次呈现不确定性,加之图像本身存在背景复杂、明亮程度不一和纹理不同等现象,使得图像分割技术有许多待解决的问题。

早期的图像语义分割是利用手工标注特征,如方向梯度直方图HOG(histogram of oriented gradient)(Kadota等,2009)和尺度不变特征转换(Zhou等,2009)。基于机器学习的方法是先将图像分为一定数量的区域块,提取每个区域块的特征,通过一定的规则建立该特征与语义类别之间的概率模型,建立目标函数,利用迭代计算的方式对目标函数进行优化,当出现最优参数时便得到了图像语义分割模型;其中基于条件随机场CRF(conditional random field)(He等,2004He等,2006)、马尔可夫随机场MRF(markov random field)(Kumar和Hebert,2003)和贝叶斯(BN)(Feng等,2002)的机器学习方法应用最为广泛。

随着深度卷积神经网络DCNNs(deep convolutional neural network)(LeCun等,1998)的快速发展,图像语义分割问题取得了巨大突破。Schulz和Behnke(2012)利用卷积神经网络CNN(convolutional neural network)产生粗略的分割图,并使用成对的类别定位过滤器实现较为精确的图像分割,比传统的图像分割方法速度更快,效果更好。Farabet等人(2012)为了充分利用图像的上下文信息,提出了多尺度CNN的图像语义分割算法,首先利用金字塔池化得到原始图像的不同尺度特征,再输入到CNN网络输出3个对应的特征图,并通过优化函数实现图像分割;Dai等人(2014)提出了通过CNN进行目标区域特征提取,并通过交叉训练与验证的方式实现图像分割。Shelhamer等人(2014)提出了全卷积神经网络用于图像语义分割,将传统的图像分类网络直接变为像素分类网络;蒋应锋等人(2016)提出多尺度迭代训练,对每个像素进行分类并通过超像素描绘分割图的轮廓;Mostajabi等人(2015)利用超像素为基本单元,提出缩放特征的图像语义分割模型;刘丹等人(2017)利用超像素中心产生不同尺度的图像作为输入图像,提出多尺度CNN模型结构用于图像语义分割。在依靠机器视觉技术检测目标的自动化生产线上(周衍超,2015蒋羽超,2016),取像装置固定于机械手上,机械手运作时,取像装置会跟随运作出现不同角度和距离的位姿,导致取像时目标在图像中表现出多个尺度。

对工件目标实现较为精确的语义分割需要考虑如何捕获图像的上下文信息,以获得不同类别目标之间、目标和背景之间的语义关系。本文主要解决如何利用图像的上下文信息,将使用本文设计的多尺度特征融合模块提取的丰富目标特征用于图像语义分割,并通过大量实验对比验证了本文方法的有效性。

1 多尺度特征融合分割网络

图 1为本文提出的网络结构。该网络框架是在残差网络ResNet(He等,2016)网络模型的基础上设计的,使用了残差网络ResNet的前4个残差模块作为目标的单尺度特征提取器,并将得到的单尺度特征输入多尺度特征融合模块获得包含不同尺度局部特征信息的融合语义特征。该多尺度特征融合模块主要包括使用不同采样率的多个并行多孔卷积层,通过不同采样率的多孔卷积获得不同尺度的局部特征信息,并将所有的特征信息融合后采用双线性插值上采样输出与原始图像分辨率相同的语义分割预测结果图。将本文设计的多尺度特征融合的分割网络(multi-scale feature fusion network)记为MsFFNet。

图 1 网络结构框架图
Fig. 1 Network structure block diagram

1.1 多孔卷积

正常的卷积过程中,卷积核作用于图像的像素区域是连续的,通常在卷积之后会使用池化操作进行下采样,以减小图像尺寸的方式增大感受视野。为了不减小图像尺寸也能增大感受视野,便将卷积核的每个像素之间插入$rate$- 1个0值进行卷积操作,实现多孔卷积,$rate$值即为多孔采样率。如图 2所示,当$rate$= 1时,卷积核的像素之间不插孔,即为普通卷积;当$rate$= 2时,卷积核的像素间插入1个0值变为多孔卷积;当$rate$= 3时,插入2个0值。

图 2 不同采样率的多孔卷积
Fig. 2 Atrous convolution with different sampling rates

1.2 图像金字塔

图像金字塔(章毓晋,2006)是以多分辨率来解释图像的一种既有效又概念简单的结构,是同一图像在不同尺度下的图集,各尺度为原图像以2为倍数进行分辨率变化所表达的不同尺度。图 3为3层图像金字塔,其底部为待分析原图像的高分辨率表达,顶层为原图像的低分辨率近似表达。

图 3 图像金字塔
Fig. 3 Image pyramid

一幅大小为M × N的原图像,分别在行、列两个方向对原图像进行1 :2的亚采样,可获得一幅基于原图像的(M/2)×(N/2)的缩略图。重复上述步骤,可以得到基于原图像的分辨率依次降2倍的缩略图,进而构成图像金字塔的各层图像。每一次亚采样操作得到的缩略图都包含了上层图像的低分率信息,不同金字塔层获得的不同分辨率图像信息就构成了图像的多尺度信息表达,而多尺度信息表达在图像分割方法中为全局特征和局部特征的结合提供了一个很好的途径。

1.3 多尺度特征融合模块

结合图像金字塔理论构建多尺度特征融合模块,本文在ResNet网络中的第4个block层后进行多尺度特征提取,由于图像金字塔只是简单地进行图像分辨率的变化,虽然能够获得图像的多尺度信息表达,但ResNet网络的第4个block层的输出已经是一个维度很小的特征图,若继续对其进行降分辨率操作,不但不利于后续的特征响应,反而还会增加网络模型计算的参数量。因此以空洞卷积的形式代替原图像金字塔中的降分辨率操作,在不降低图像分辨率的前提下,既有效增大了滤波器的感受视野,又能充分获得上级图像的局部特征信息。本文采用3层图像金字塔形式,底层图像为block4层输出的特征图,中层为使用不同采样率的多个并行多孔卷积层,以提取不同尺度的局部特征信息,顶层为中层提取的局部特征信息的融合层。本文设计的多尺度特征融合模块结构如图 4所示。

图 4 多尺度特征融合模块
Fig. 4 Multi-scale feature fusion module

图 4可以看出,图像经过ResNet的前4个block残差模块得到单尺度特征图(3层图像金字塔底层)。本文将其包含前4个block残差模块的神经网络记为基准网络(BaseNet),将基准网络输出的特征图定义为单尺度基准特征图(3层图像金字塔底层图像),并行的多孔卷积层(3层图像金字塔中层)的每一个多孔卷积都是在底层图像上进行操作的,每一次的多孔卷积都会因采用的多孔采样率的不同而得到不同尺度的局部特征信息,将不同尺度的局部特征信息在融合层(3层图像金字塔顶层)进行像素融合后得到包含多尺度信息的特征映射层;最后采用双线性插值上采样和softmax归一函数得到预测的分割图像。

2 实验

本文的视觉任务标定对象为轴承、螺丝刀、齿轮、钳子、扳手、螺栓、螺帽、垫片、榔头、锉刀等10类工件,且目标的背景不受限。数据集包含了不同背景下的多类工件图像,制作数据集时设置图像尺寸为480 × 360像素,包含上述10类工件目标。在采集数据时,定义同帧图像中最多包含10类目标中的任意5类,最少包含10类目标中的任意2类。大约采集600幅图像,采集完成后,以台式计算机为实验平台,本文使用的实验平台参数为:酷睿i5处理器、Geforce1050Ti 4 GB显卡、8 GB内存的台式电脑。使用Photoshop软件将数据集中的10类目标从背景中标识出来,制成标准的ground truth样本。为了防止网络在训练中出现过拟合现象,对采集的图像进行随机镜像和旋转操作,扩充至1 200幅,再进行实验训练和测试。将这1 200幅图像随机分成3个数据集,即训练集、验证集和测试集,且3个数据集之间图像不重复。其中训练集图像800幅,验证集图像200幅,测试集图像200幅。数据集标准样本中每一类目标对应的像素值如表 1所示。

表 1 各类目标对应的ground truth像素值
Table 1 Ground truth pixel values for each type of target

下载CSV
目标 ground truth像素值
轴承 128, 0, 0
螺丝刀 0, 128, 0
齿轮 128, 128, 0
钳子 0, 0, 128
扳手 128, 0, 128
螺栓 0, 128, 128
螺帽 128, 128, 128
垫片 64, 0, 0
榔头 192, 0, 0
锉刀 64, 128, 0

2.1 训练方法

整个实验过程采用基于TensorFlow的开源深度学习框架对网络进行实验训练和测试。学习速率采用poly速率更新方法,将初始学习速率设为0.001,将小批量大小(batch size)(Keskar等,2017)设为4,将power设为0.9,并使用随机梯度下降法对网络参数进行更新,实验时网络训练的迭代次数设为5 K。并在损失函数上加入L2正则化项减小损失函数值的震荡幅度。

本文使用平均交并比mIOU(mean intersection over union)(Nowozin,2014)作为网络性能的评价标准,IOU(intersection over union)是预测结果和标注信息的交集区域与预测结果和标注信息的并集区域的比值,平均IOU为所有类的IOU值的平均值。

2.2 实验结果分析

通过简单的神经网络可以有效地提取图像的语义特征,但针对复杂的目标分割问题其泛化能力会受到一定制约,虽然可以通过增加网络层深度来提取更多的特征信息从而提升网络的泛化能力,但盲目增加网络深度反而会导致梯度弥散或梯度爆炸。残差网络通过残差学习的方式巧妙规避了以上弊端,它通过前向神经网络和shortcut连接实现,shortcut连接相当于简单执行了同等映射,既不会产生额外的参数,又不会增加计算复杂度,但却能更为有效地提取图像的特征信息。残差网络对于复杂的目标分割问题也具有较为优秀的泛化能力,但太深的残差网络模型也会导致过拟合。

本文以基于ResNet残差网络的模型进行训练,为了选取本文标注的数据集最适合的网络模型,采用ResNet残差网络由浅到深的实验方式进行验证。采用Resnet_50、Resnet_101和Resnet_152等3种网络深度进行实验。表 2为采用不同深度网络模型对多类工件数据集进行神经网络训练时,得到的网络在多类工件数据集分配的验证集上的精度。从表 2可以看出,以50层的残差网络为基础,网络深度越深,模型的性能越优,但最深的152层残差网络的性能次于101层残差网络,因为太深的网络模型在训练本文数据集时发生了过拟合。因此将Resnet_101残差网络定为后续实验的基准网络(BaseNet)。

表 2 训练结果对比
Table 2 Comparison of training results

下载CSV
网络模型结构 mIOU/%
Resnet_152 56.11
Resnet_101 59.41
Resnet_50 56.96
注:加粗字体表示每组评价指标最高值。

2.2.1 训练超参数的选择

训练同一数据集时,小的批量大小引入的随机性更大,难以达到收敛,可以在合理范围内,增大批量大小的值,进而提高图形工作站内存的利用率,使大矩阵乘法的并行效率提高。目标函数的下降方向越准确,震荡越小。但批量大小增大到一定程度,其确定的下降方向已经基本不再变化,如果过大,则可能会出现局部最优的情况。学习率LearningRate决定着目标函数能否收敛到局部最小值以及何时收敛到最小值,合适的学习率能够使目标函数在合适的时间内收敛到局部最小值。

本文采用的数据集容量为1 200幅图像,不属于小样本数据集,故不能采用全数据集(full batch)的形式,因为较大的数据集若采用全数据集形式载入数据会使图形工作站的内存溢出从而无法工作。因此,本文从批量大小取值为2开始探索该超参数的上限值,该部分使用的网络为基准网络BaseNet。

表 3为使用不同的批量大小且其他超参数保持不变的条件下对网络进行训练得到的网络模型在多类工件数据集的验证集上的精度。从表 3可以看出,随着批量大小的增加,其对网络性能的有益影响在值取4时达到峰值,故将批量大小的值定为4。

表 3 不同批量大小值对应的训练结果
Table 3 Training results corresponding to different batch size values

下载CSV
batch size mIOU/%
2 55.25
3 58.38
4 59.41
5 59.22
注:加粗字体表示每组评价指标最高值。

本文神经网络训练过程中,采用随机梯度下降法对网络参数进行更新,若给定统一的学习率,整个优化过程中都是以确定的步长进行更新,但在迭代优化的前期,若学习率较大,则前期参数更新的步长就会越长,这时便能以较快的速度进行梯度下降,而在迭代后期,较小的学习率又有利于目标函数的收敛,更容易接近最优解。本文采用poly速率更新策略进行迭代优化,为使训练在迭代前期维持梯度下降较快的同时保证目标函数在后期迭代的收敛,需确定一个学习率的最大初始值。

表 4为将批量大小设置为4并使用初始学习速率从大到小的实验方式对网络进行训练得到的网络模型在多类工件数据集验证集上的精度。从表 4可以看出,当学习率为0.01时,训练得到的网络性能最优,且表 4中的最大精度值为基准网络BaseNet的最优精度值。

表 4 不同学习率值对应的训练结果
Table 4 Training results corresponding to different LearningRate values

下载CSV
学习率 mIOU/%
0.1 27.46
0.01 61.85
0.001 59.41
0.000 1 37.95
注:加粗字体表示每组评价指标最高值。

从以上实验可以得出,设置初始学习率为0.01、小批量大小为4时,最终训练得到的网络性能最好。因此在以后实验中均以此超参数对设计的MsFFNet网络进行训练和测试实验。

2.2.2 多尺度特征融合模块评估

本文提出的多尺度特征融合模块,最重要的部分为中层的并行多孔卷积层,故本文对中层的多孔卷积的个数$j$和多孔卷积所使用的采样率大小$i$对MsFFNet网络性能的影响进行了实验求证。实验设定为每个相邻的多孔卷积率呈一定的倍数关系,具体设定为1,$i$$2i$,…,$ji$。其中,每一个多孔卷积都会获得一个尺度的局部特征信息。

多孔卷积采样率的增大使滤波器获得的感受视野也随之增大,但是若滤波器的感受视野接近底层的特征图尺寸时,3×3的滤波器不再捕捉全图像的上下文信息,而是退化为简单的1×1滤波器,这样只有滤波器中心点的权重起了作用。因此,要通过实验求证多孔卷积采样率的最大值,使滤波器获得最大感受视野的同时又能最大限度地捕捉全图像的上下文信息。由于每个多孔卷积采样率的大小与多孔卷积的个数存在依赖关系,同时虽然多尺度的图像信息表达有利于图像的语义分割,但是多尺度信息表达中的冗余信息也会随着尺度数量的增加而增加,故需通过实验探索多孔卷积的个数$j$的最大值,从而求得过多的冗余信息对图像分割负面影响的临界点。

表 5为将多孔卷积的数量$j$和多孔卷积采样率$i$设置为不同值时网络在多工件数据集的验证集上mIOU评价指标的验证精度。从表 5可以看出,当多孔卷积采样率不变时,模型的性能并不是随多孔卷积的数量$j$的增加而更优,这是因为多孔卷积的数量达到饱和后,冗余信息的负面影响越来越大,致使网络性能变差,但多尺度特征提取模型的性能大部分都比BaseNet的单尺度特征提取模型表现得更好。且当多孔卷积采样率的最大值取20 ($j$ = 4,$i$ = 5)时,滤波器的感受视野达到最大饱和值,MsFFNet网络在平均IOU评价指标上的验证精度达到最优,且比基准网络BaseNet的最优精度值提高了4.52%。因此本文采用的多尺度特征融合模块的参数设置为$j$ = 4,$i$ = 5。

表 5 MsFFNet网络取不同$i$$j$值时验证集mIOU精度
Table 5 MsFFNet network takes different $i$ and $j$ values to verify the set mIOU accuracy

下载CSV
$i$ = 3 $i$ = 4 $i$ = 5 $i$ = 6 $i$ = 7
$j$ = 2 63.56 64.64 65.45 65.34 65.80
$j$ = 3 63.93 63.12 63.36 66.34 64.34
$j$ = 4 63.83 64.98 66.37 59.97 65.84
$j$ = 5 64.8 58.34 63.68 64.65 64.71
注:加粗字体表示指标最高值。

为了突出多尺度特征融合模块对网络性能的有益影响。本文在多工件数据集中,将10个单类目标单独提取出来,用MsFFNet网络和BaseNet对这10个单类目标做了定量和定性的测试结果对比,如表 6所示,并对包含多类工件目标的图像集做了同样的对比试验。从表 6可以看出,10个单类的mIOU精度大部分都是MsFFNet网络表现得更好,MsFFNet网络和BaseNet在齿轮和扳手两类的mIOU精度相差不多。多类目标的mIOU精度也是MsFFNet网络表现得更好。

表 6 目标测试集mIOU精度
Table 6 Target test set mIOU accuracy  

下载CSV
/%
类别 BaseNet MsFFNet
轴承 85.34 86.78
螺丝刀 82.23 84.83
齿轮 83.45 82.68
钳子 80.19 83.47
扳手 83.98 83.78
螺栓 62.04 80.56
螺帽 80.20 81.59
垫片 78.35 83.30
榔头 81.95 84.01
锉刀 83.86 85.69
多类 58.94 63.78
注:加粗字体表示指标最高值。

图 5为多类工件目标用BaseNet和MsFFNet网络做语义分割得到的结果直观对比图。图 5(a)为测试集中的一幅多目标图像,图 5(b)是语义标注图像,图 5(c)是BaseNet预测图,图 5(d)是MsFFNet网络预测图。从图 5可以看出,MsFFNet网络对于多目标工件的预测比BaseNet更为精准。

图 5 多类工件预测图
Fig. 5 Multi-class workpiece prediction map
((a) RGB; (b) ground truth; (c) BaseNet; (d) MsFFNet)

图 6为用BaseNet和MsFFNet网络对单目标工件进行语义分割得到的分割结果直观对比图。从图 6可以看出,MsFFNet网络预测的大部分类别的单类目标比BaseNet预测的目标更为精准。齿轮和扳手从预测图可以知道其mIOU精度低于BaseNet,因为预测齿轮时,MsFFNet网络没有预测出齿轮的中孔,预测扳手时,将背景的亮点错误预测为目标。

图 6 网络预测图
Fig. 6 Predicted images by network
((a) RGB; (b) ground truth; (c) predicted images by BaseNet; (d) predicted images by MsFFNet)

表 7为本文设计的网络模型与其他3种网络模型在测试集上的mIOU评价指标对比结果。ResNet网络为单尺度特征提取,本文方法从多尺度特征提取角度出发提高了语义分割精度;DeepLab_V1网络与本文一样采用多孔卷积方法,差异在于本文采用了多个不同采样率的多孔卷积形成并行结构且本文方法的语义分割精度更高;DeepLab_V3网络采用了空间金字塔池化策略提高语义分割精度,但其精度低于本文方法。以上对比结果验证了本文方法的有效性。

表 7 本文方法与其他方法的比较
Table 7 Comparison between other methods and ours

下载CSV
网络结构 mIOU/%
ResNet(He等,2016) 58.94
DeepLab_V1(Chen等,2017a) 60.21
DeepLab_V3(Chen等,2017b) 61.54
MsFFNet 63.78
注:加粗字体表示指标最高值。

为验证本文方法的泛化性,对网球场场景的数据集进行实验。网球场场景数据集包含网球、球拍、网球场场内、场地线、网球场场外、球网、人、网球场防护栏和天空等9类目标,9类目标大小不一, 实验结果如图 7所示。图 7(a)(b)为输入的RGB图像和真值图像,图 7(c)(d)为单尺度网络预测图像和本文提出的多尺度特征融合方法的网络预测图像。在完全采用本文方法设定的参数条件且未对网络模型针对网球场场景数据集进行参数优化的前提下,测试集的mIOU评价指标精度从54.68%提升到56.43%。图 7的预测图像表明,在采用多尺度特征融合后,网络模型对网球场场地类别的预测更为精确,且网络模型对各个目标轮廓的分割能力有所提高。因此,在使用本文提出的多尺度特征融合模块后,网络模型对网球场场景的语义分割能力更好,从而验证了本文方法具有一定的泛化性。

图 7 网球场场景语义分割结果
Fig. 7 Segmentation results of scene semantic of tennis court
((a) RGB; (b) ground truth; (c) predicted images by BaseNet; (d) predicted images by MsFFNet)

3 结论

介绍了多工件数据集的标注方式,采用数据扩充和定义学习率更新方式等方法有效防止了网络训练时的过拟合现象,提高了网络模型的基础性能,并通过实验对比验证确定了适用本文数据集的神经网络深度及神经网络训练中超参数的值。

设计了一个多尺度特征融合模块,用于提取目标的多尺度语义信息,使得设计的MsFFNet网络模型能更精准地提取目标的语义特征,在本文采用的数据集上,与传统单尺度特征提取网络、采用多孔卷积策略的其他网络、采用空间金字塔池化策略以提高网络语义分割能力的网络相比,本文方法在测试集上的mIOU评价指标分别提高了4.84%、3.57%和2.24%。因此,本文方法能在取像装置与目标之间的空间位置多变的条件下,更加精确实现自动化生产线上基于机器视觉的机械手抓取目标的语义分割任务。由于本文使用的数据集为特定工件目标,故本文设定的参数值目前只针对本文数据集。

本文通过特定数据集确定的网络模型为后续的工件检测提供了借鉴价值,下一步的工作将侧重于本文方法对其他工业场景数据集的泛化能力。

参考文献

  • Chen L C, Papandreou G, Kokkinos I, Murphy K and Yuille A L. 2017a. Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected CRFs[EB/OL].[2019-01-23]. https://arxiv.org/pdf/1606.00915v1.pdf
  • Chen L C, Papandreou G, Schroff F and Adam. 2017b. Rethinking atrous convolution for semantic image segmentation[EB/OL].[2019-01-13]. https://arxiv.org/pdf/1706.05587.pdf
  • Dai J F, He K M and Sun J. 2014. Convolutional feature masking for joint object and stuff segmentation//Proceedings of 2015 IEEE Conference on Computer Vision and Pattern Recognition. Boston, MA, USA: IEEE: 3992-4000[DOI:10.1109/CVPR.2015.7299025]
  • Farabet C, Couprie C, Najman L and LeCun Y. 2012. Scene parsing with multiscale feature learning, purity trees, and optimal covers[EB/OL].[2019-05-01].https://arxiv.org/pdf/1202.2160.pdf
  • Feng X J, Williams C K I, Felderhof S N. 2002. Combining belief networks and neural networks for scene segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 24(4): 467-483 [DOI:10.1109/34.993555]
  • He K M, Zhang X Y, Ren S Q and Sun J. 2016. Deep residual learning for image recognition//Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas, USA: IEEE: 770-778[DOI:10.1109/CVPR.2016.90]
  • He X M, Zemel R S and Carreira-Perpinan M A. 2004. Multiscale conditional random fields for image labeling//Proceedings of 2004 IEEE Computer Society Conference on Computer Vision and Pattern Recognition.Washington, DC, USA: IEEE: 695-702[DOI:10.1109/CVPR.2004.1315232]
  • He X M, Zemel R S and Ray D. 2006. Learning and incorporating top-down cues in image segmentation//Proceedings of the 9th European Conference on Computer Vision. Graz, Austria: Springer: 338-351[DOI:10.1007/11744023_27]
  • Jiang Y C. 2016. Research on Recognition of Workpiece and Sketch. Dalian: Dalian University of Technology (蒋羽超. 2016. 工件及简图识别的研究. 大连: 大连理工大学)
  • Jiang Y F, Zhang H, Xue Y B, Zhou M, Xu G P, Gao Z. 2016. A new multi-scale image semantic understanding method based on deep learning. Journal of Optoelectronics·Loser, 27(2): 224-230 (蒋应锋, 张桦, 薛彦兵, 周冕, 徐光平, 高赞. 2016. 一种新的多尺度深度学习图像语义理解方法研究. 光电子·激光, 27(2): 224-230) [DOI:10.16136/j.joel.2016.02.0652]
  • Kadota R, Sugano H, Hiromoto M, Ochi H, Miyamoto R and Nakamura Y. 2009. Hardware architecture for HOG feature extraction//Proceedings of the 5th International Conference on Intelligent Information Hiding and Multimedia Signal Processing. Kyoto, Japan: IEEE: 1330-1333[DOI:10.1109/IIH-MSP.2009.216]
  • Keskar N S, Mudigere D, Nocedal J, Smelyanskiy M and Tang P T P. 2017. On large-batch training for deep learning: generalization gap and sharp minima[EB/OL].[2019-01-20]. https://arxiv.org/pdf/1609.04836.pdf
  • Kumar S and Hebert M. 2003. Man-made structure detection in natural images using a causal multiscale random field//Proceedings of 2003 IEEE Computer Society Conference on Computer Vision and Pattern Recognition.Madison, WI, USA: IEEE: 119-126[DOI:10.1109/CVPR.2003.1211345]
  • LeCun Y, Bottou L, Bengio Y and Haffner P. 1998. Gradient-based learning applied to document recognition//Proceedings of 1998 IEEE, 86(11): 2278-2324[DOI:10.1109/5.726791]
  • Liu D, Liu X J, Wang M Z. 2017. Semantic segmentation with multi-scale convolutional neural network. Remote Sensing Information, 32(1): 57-64 (刘丹, 刘学军, 王美珍. 2017. 一种多尺度CNN的图像语义分割算法. 遥感信息, 32(1): 57-64) [DOI:10.3969/j.issn.1000-3177.2017.01.011]
  • Mostajabi M, Yadollahpour P and Shakhnarovich G. 2015. Feedforward semantic segmentation with zoom-out features//Proceedings of 2015 IEEE Conference on Computer Vision and Pattern Recognition. Boston, MA, USA: IEEE: 3376-3385[DOI:10.1109/CVPR.2015.7298959]
  • Nowozin S. 2014. Optimal decisions from probabilistic models: the intersection-over-union case//Proceedings of 2014 IEEE Conference on Computer Vision and Pattern Recognition. Columbus, USA: IEEE: 548-555[DOI:10.1109/CVPR.2014.77]
  • Schulz H and Behnke S. 2012. Learning object-class segmentation with convolutional neural networks//2012 European Symposium on Artificial Neural Network. Bruge: 25-27.
  • Shelhamer E, Long J, Darrell T. 2014. Fully convolutional networks for semantic segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(4): 640-651 [DOI:10.1109/TPAMI.2016.2572683]
  • Zhou H Y, Yuan Y, Shi C M. 2009. Object tracking using SIFT features and mean shift. Computer Vision and Image Understanding, 113(3): 345-352 [DOI:10.1016/j.cviu.2008.08.006]
  • Zhou Y C. 2015. Research on Flexible Grasp Key Technology of Robot Based on Vision Guiding. Guangzhou: Guangdong University of Technology (周衍超. 2015. 基于视觉引导的机器人智能抓取技术研究. 广州: 广东工业大学) [DOI:10.7666/d.Y2795373]
  • Zhang Y J. 2006. Image Engineering:Image Processing. 2nd ed. Beijing: Tsinghua University Press (章毓晋. 2006. 图像工程:上册.图像处理. 2版. 北京: 清华大学出版社)