摘要
针对显著性目标检测任务中识别结果边缘模糊的问题,提出了一种能够充分利用边缘信息增强边缘像素置信度的新模型。该网络主要有两个创新点:设计三重注意力模块,利用预测图的特点直接生成前景、背景和边缘注意力,并且生成注意力权重的过程不增加任何参数;设计边缘预测模块,在分辨率较高的网络浅层进行有监督的边缘预测,并与网络深层的显著图预测融合,细化了边缘。在6种常用公开数据集上用定性和定量的方法评估了该模型,并且与其他模型进行充分对比,证明设计的新模型能够取得最优的效果。此外,该模型参数量为30.28 M,可以在GTX 1080 Ti显卡上达到31 帧·
人的视觉系统能选择性地注视不同场景中富含丰富信息的区
在SOD发展的早期,大多数模型依赖于图像低层特征和启发式算
(1)特征融合
为了充分利用来自不同卷积层的信息从而检测不同尺度的物体,一些研究聚焦于如何有效地整合多尺度特征。文献[
(2) 注意力机制
注意力机制是近些年的深度神经网络中一个频繁被使用的方法,通过给不同区域的特征赋予不同的权值,达到强调特定信息的目的,在SOD领域,注意力机制也被广泛地应用。文献[
(3) 显著图细化
显著图边缘模糊的问题也是很多学者工作的重点。文献[
本文模型的骨干网络为去掉全连接层的ResNet-5

图1 网络总体结构图
Fig. 1 Overall architecture of network
ResNet-50网络各层输出的特征定义为。假设输入的图像I大小为,则第层特征的大小为,其中,为特征通道数。在计算过程中,第5层的经多尺度上下文模块MSCM输出最小、最粗糙的显著图预测;在第层,TAM利用和(表示双倍上采样)输出残差,与相加,获得比前一层更精细的显著图预测;在最上层,EPM利用最大、细节最丰富的特征预测边缘,并输出残差,与相加后得到网络的最终预测结果。显著图的真值为,在训练中监督每层输出的显著图预测;显著边缘图的真值为,在训练中监督EPM中的边缘预测。
在自顶向下逐层补充信息、优化显著图的过程中,由于来自深层的显著图中已有一部分语义信息,故如果直接用每层的特征对显著图进行优化,会被大量的冗余信息干扰。如果可以舍弃这些冗余,就能提高信息利用率,进而提高优化效果。为此,本文提出三重注意力模块即TAM,通过前景、背景、边缘三重注意力引导网络从各层特征中充分提取信息。前景注意力又称正注意力,可以突出并强化显著区域的预测;背景注意力又称负注意力,可以通过突出非显著区域补充丢失的细节信息;边缘注意力突出了物体边缘,补充了复杂的边缘细节信息。TAM的结构如

图2 TAM示意图
Fig. 2 Illustration of TAM
第i层TAM的输入为与。经过两倍上采样后为,记作。即正注意力,负注意力用公式得到,边缘注意力用公式得到。特征经过三个分支分别获得上述三种注意力,生成正特征、负特征、边缘特征,公式表达为
(1) |
(2) |
(3) |
式中:“”表示逐元素乘;Conv表示连续的卷积、批归一
(4) |
式中:Concat表示沿着通道维度的连接;Convs表示连续的Conv操作。残差由TAM输出后,与相加即可得到本层的显著图预测结果,这体现了自顶向下逐层优化的思想。
三种注意力中,正注意力与负注意力分别强调了前景与背景,而边缘注意力则强化了边缘细节,下面对边缘注意力的计算进行详细的解释。由于在显著图预测结果中,显著性区域各像素的值是接近1的,只在靠近边缘的地方小于1,而且是渐渐由1平滑地过渡到0,即非显著区域。因此,把值接近0.5的像素点认为是恰好在边缘上,而将值接近0或1的像素点认为是远离边缘的。在TAM中,使用公式将显著预测图转化为边缘预测图,并保证值域仍为。如

图3 边缘注意力生成示意图
Fig. 3 Illustration of edge attention generation
通过逐层优化的方式可以得到细节越来越丰富的显著图,在此基础上,本文进一步提出边缘预测模块即EPM,在细节信息最丰富的网络第1层,用监督的方式获得显著性物体的边缘,并优化显著图,得到边缘更加清晰的预测结果。TAM中的边缘注意力来自网络内部,而EPM从外部获取边缘信息,两者互为补充,共同增强边缘信息。EPM的结构如

图4 EPM示意图
Fig. 4 Illustration of EPM
EPM的输入为X1,X1经过RSU(residual u-blocks
(5) |
式中:EP(edge prediction)表示用于预测边缘的网络,本文采用的是RSU。RSU内部为U型结构,可以在不降低特征图大小的前提下提取出多尺度特征,保留充足的边缘信息。EPM输出的残差E1与第2层显著图相加,得到最终的预测结果。
本文使用深监督的方式,对每个尺度的显著图输出进行监督,损失函数定义为
(6) |
式中:表示上采样到输入图像大小的各层显著预测图;表示真值预测图;表示二元交叉熵(binary cross entropy)损失;表示交并比(intersection over union)损失。
BCE是图像分割领域常用的衡量显著图与真值逐像素误差的方法,计算方法如下:
(7) |
式中:表示像素坐标。
IoU的含义是两个图形相交部分与合并后图形面积的比,用于在对象级别衡量预测显著目标与真实显著目标之间的误差,计算方法如下:
(8) |
对EPM中预测边缘的监督采用基础的BCE损失:
(9) |
将显著图损失与边缘损失结合,得到最终损失函数:
(10) |
式中:与在本文中都取1。
本文使用PyTorch实现模型,并用ResNet-50的预训练模型初始化。在训练中,使用Adam优化器,参数为默认参数(betas=(0.9, 0.999), epsilon=1, weight decay=0)。批大小为14,初始学习率为,每30代衰减至10 %,共训练50代。本文使用DUT
为了充分评估本文提出模型的泛化能力,本文选取了6个被广泛使用的数据集用于评估,包括HKU-I
本文使用F-measur
F-measure是综合地考虑精确率和召回率的一种评估方法,定义如下:
(11) |
式中:和分别代表精确率和召回率;按经验设为0.3从而给予精确率更多的权重。在本文中报告的是平均F-measure,计算方法为每张显著图的阈值取所有像素平均值的两倍。
MAE的计算方法是,取显著图与真值之间的逐像素误差的平均值:
(12) |
式中:H和W表示图片的高与宽;S和G表示显著图和真值图;表示像素坐标。数据集的MAE通过计算所有图片的MAE的平均值得到。
S-measure用于评估预测显著图与真值之间的结构相似度,由
(13) |
式中:表示目标结构相似度;表示区域结构相似度;按经验设为0.5。
PR曲线是用于评估概率图的基本方法,精确率和召回率是通过比较数据集中所有图片的所有像素的预测结果和真值而来。在PR曲线上,每一个点代表之间的某个阈值下的一对精确率和召回率。
与PR曲线类似,F-measure曲线上的每一个点代表之间的某个阈值下的F-measure。
本文选取了近几年表现最优异的若干SOD模型,在最常用的数据集上进行定量评估,并与本文提出的方法进行对比,如
模型 | 参数量/M | FPS | HKU-IS | ECSSD | PASCAL-S | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
F | M | S | F | M | S | F | M | S | |||
AFNe | 21.08 | 19 | 0.888 | 0.036 | 0.905 | 0.908 | 0.042 | 0.913 | 0.820 | 0.070 | 0.849 |
Amule | 33.15 | 10 | 0.841 | 0.051 | 0.886 | 0.868 | 0.059 | 0.894 | 0.757 | 0.100 | 0.818 |
BASNe | 87.06 | 32 | 0.896 | 0.032 | 0.909 | 0.880 | 0.037 | 0.916 | 0.771 | 0.076 | 0.838 |
BDM | 22.09 | — | 0.871 | 0.039 | 0.907 | 0.868 | 0.045 | 0.911 | 0.762 | 0.074 | 0.844 |
CAGNe | 20.98 | — | 0.905 | 0.033 | 0.897 | 0.915 | 0.042 | 0.898 | 0.819 | 0.076 | 0.827 |
HVPNe | 1.23 | 312 | 0.872 | 0.045 | 0.899 | 0.889 | 0.052 | 0.904 | 0.784 | 0.089 | 0.830 |
PAGR | — | — | 0.886 | 0.048 | 0.887 | 0.894 | 0.061 | 0.889 | 0.799 | 0.089 | 0.822 |
PiCANe | 32.85 | 5 | 0.870 | 0.043 | 0.904 | 0.886 | 0.046 | 0.917 | 0.792 | 0.076 | 0.854 |
RASNe | 24.59 | 40 | 0.906 | 0.030 | 0.915 | 0.923 | 0.034 | 0.925 | — | — | — |
SAMNe | 1.33 | 332 | 0.871 | 0.045 | 0.898 | 0.891 | 0.050 | 0.907 | 0.778 | 0.092 | 0.826 |
SR | 43.74 | 12 | 0.874 | 0.046 | 0.887 | 0.892 | 0.054 | 0.895 | 0.792 | 0.084 | 0.834 |
U2Ne | 44.02 | 30 | 0.896 | 0.031 | 0.916 | 0.892 | 0.033 | 0.928 | 0.770 | 0.074 | 0.845 |
UC | 23.98 | 12 | 0.823 | 0.062 | 0.875 | 0.844 | 0.069 | 0.883 | 0.726 | 0.116 | 0.806 |
本文模型 | 30.28 | 31 | 0.905 | 0.029 | 0.916 | 0.900 | 0.033 | 0.926 | 0.797 | 0.065 | 0.854 |
模型 | 参数量/M | FPS | SOD | DUTS | DUT-OMRON | ||||||
F | M | S | F | M | S | F | M | S | |||
AFNe | 21.08 | 19 | — | — | — | 0.793 | 0.046 | 0.867 | 0.739 | 0.057 | 0.826 |
Amule | 33.15 | 10 | 0.741 | 0.144 | 0.755 | 0.678 | 0.085 | 0.804 | 0.647 | 0.098 | 0.781 |
BASNe | 87.06 | 32 | 0.744 | 0.112 | 0.772 | 0.791 | 0.048 | 0.866 | 0.756 | 0.057 | 0.836 |
BDM | 22.09 | — | 0.761 | 0.106 | 0.790 | 0.745 | 0.050 | 0.862 | 0.692 | 0.064 | 0.810 |
CAGNe | 20.98 | — | — | — | — | 0.822 | 0.045 | 0.852 | 0.744 | 0.057 | 0.807 |
HVPNe | 1.23 | 312 | 0.779 | 0.122 | 0.765 | 0.749 | 0.058 | 0.849 | 0.721 | 0.065 | 0.831 |
PAGR | — | — | 0.770 | 0.145 | 0.720 | 0.784 | 0.056 | 0.839 | 0.711 | 0.071 | 0.775 |
PiCANe | 32.85 | 5 | 0.785 | 0.103 | 0.793 | 0.759 | 0.051 | 0.869 | 0.717 | 0.065 | 0.832 |
RASNe | 24.59 | 40 | — | — | — | 0.831 | 0.037 | 0.884 | 0.763 | 0.055 | 0.836 |
SAMNe | 1.33 | 332 | 0.780 | 0.124 | 0.762 | 0.745 | 0.058 | 0.849 | 0.717 | 0.065 | 0.830 |
SR | 43.74 | 12 | 0.780 | 0.126 | 0.745 | 0.753 | 0.059 | 0.836 | 0.707 | 0.069 | 0.780 |
U2Ne | 44.02 | 30 | 0.769 | 0.106 | 0.789 | 0.792 | 0.045 | 0.874 | 0.761 | 0.055 | 0.847 |
UC | 23.98 | 12 | 0.737 | 0.148 | 0.763 | 0.631 | 0.112 | 0.782 | 0.621 | 0.120 | 0.760 |
本文模型 | 30.28 | 31 | 0.773 | 0.103 | 0.788 | 0.813 | 0.039 | 0.880 | 0.765 | 0.051 | 0.838 |

图5 F-measure曲线
Fig. 5 Curves of F-measure
对上述算法在数据集DUT-OMRON、DUTS、ECSSD、HKU-IS、PASCAL-S、SOD上绘制了F-measure曲线和PR曲线,结果如

图6 PR曲线
Fig. 6 Curves of PR
从上述数据集中选取了6张有代表性的图片进行测试,在各算法之间进行定性对比,如

图7 定性对比
Fig. 7 Qualitative comparison
为了充分验证本文所提出创新点的效果,本文进行了消融实验,见
注意力 | EPM | F-measure | MAE | S-measure | ||
---|---|---|---|---|---|---|
N | P | E | ||||
√ | 0.891 3 | 0.036 5 | 0.919 1 | |||
√ | √ | 0.897 9 | 0.033 9 | 0.924 4 | ||
√ | √ | 0.888 0 | 0.035 2 | 0.922 4 | ||
√ | √ | √ | 0.898 5 | 0.033 7 | 0.924 4 | |
√ | √ | √ | 0.894 8 | 0.035 2 | 0.921 8 | |
√ | √ | √ | √ | 0.899 7 | 0.033 0 | 0.925 9 |
单独对边缘融合进行消融实验,对比不融合边缘预测结果(EP)和融合边缘预测结果(EPM)时效果的差异,见
模型 | F-measure | MAE | S-measure |
---|---|---|---|
基准 | 0.891 3 | 0.036 5 | 0.919 1 |
EP(简) | 0.890 7 | 0.035 1 | 0.920 9 |
EP(RSU) | 0.894 6 | 0.036 8 | 0.920 2 |
EPM | 0.897 9 | 0.033 9 | 0.924 4 |
在本文中,针对常用SOD算法的结果中目标边缘较为模糊的问题,本文提出了一种边缘信息增强的SOD网络。该网络的主体结构是自顶向下逐层优化的,能够提取多尺度的信息。在此基础上,本文引入了两个模块以增强边缘信息的提取。首先,本文提出了TAM,融合了前景、背景和边缘注意力,并且在不增加任何参数的前提下就能从预测图中直接得出;其次,本文提出了EPM,其位于网络最浅层,使用较高分辨率的特征以有监督的方式预测边缘,并于网络深层的预测图融合,保留了更多的边缘细节信息。TAM与EPM互为补充,有效地提高了显著图预测的效果。本文在6个常用SOD数据集上用三种定量指标评估了本文模型,在HKU-IS、PASCAL-S和DUT-OMRON上把MAE分别降低了0.1 %、0.5 %和0.4 %;本文还以定性的方式展示了本文模型与近几年SOD模型的预测结果,体现出本文模型能够更完整地预测显著目标,并且能够精确地预测目标边缘。本文模型参数量为30.28M,可以在GTX 1080 Ti上达到31FPS的预测速度。最后,用消融实验证明了本文提出创新点的有效性。
作者贡献声明
赵卫东:设计框架、技术指导、论文审定。
王 辉:实验研究、论文撰写。
柳先辉:技术指导、论文审定。
参考文献
CORBETTA M, SHULMAN G L. Control of goal-directed and stimulus-driven attention in the brain[J]. Nature Reviews Neuroscience, 2002, 3(3): 201. [百度学术]
BORJI A, CHENG M M, JIANG H, et al. Salient object detection: A benchmark[J]. IEEE Transactions on Image Processing, 2015, 24(12): 5706. [百度学术]
WANG W, LAI Q, FU H, et al. Salient object detection in the deep learning era: An in-depth survey[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021, 44(6): 3239. [百度学术]
XIE S, TU Z. Holistically-nested edge detection[C]//Proceedings of the IEEE International Conference on Computer Vision. Boston: IEEE, 2015: 1395-1403. [百度学术]
LI G, YU Y. Deep contrast learning for salient object detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 478-487. [百度学术]
ZHANG P, WANG D, LU H, et al. Amulet: Aggregating multi-level convolutional features for salient object detection[C]//Proceedings of the IEEE International Conference on Computer Vision. Venice: IEEE, 2017: 202-211. [百度学术]
WANG T, BORJI A, ZHANG L, et al. A stagewise refinement model for detecting salient objects in images[C]//Proceedings of the IEEE International Conference on Computer Vision. Venice: IEEE, 2017: 4019-4028. [百度学术]
ZHANG L, DAI J, LU H, et al. A bi-directional message passing model for salient object detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 1741-1750. [百度学术]
ZHANG X, WANG T, QI J, et al. Progressive attention guided recurrent network for salient object detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 714-722. [百度学术]
CHEN S, TAN X, WANG B, et al. Reverse attention for salient object detection[C]//Proceedings of the European Conference on Computer Vision (ECCV). Munich: Springer Science, 2018: 234-250. [百度学术]
LI T, SONG H, ZHANG K, et al. Recurrent reverse attention guided residual learning for saliency object detection[J]. Neurocomputing, 2020, 389: 170. [百度学术]
LI J, PAN Z, LIU Q, et al. Complementarity-aware attention network for salient object detection[J]. IEEE Transactions on Cybernetics, 2020, 52(2): 873. [百度学术]
LIU N, HAN J, YANG M H. Picanet: Learning pixel-wise contextual attention for saliency detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 3089-3098. [百度学术]
ZHANG Z, LIN Z, XU J, et al. Bilateral attention network for RGB-D salient object detection[J]. IEEE Transactions on Image Processing, 2021, 30: 1949. [百度学术]
HU P, SHUAI B, LIU J, et al. Deep level sets for salient object detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE, 2017: 2300-2309. [百度学术]
LUO Z, MISHRA A, ACHKAR A, et al. Non-local deep features for salient object detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE, 2017: 6609-6617. [百度学术]
WEI J, WANG S, WU Z, et al. Label decoupling framework for salient object detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 13025-13034. [百度学术]
HE K, ZHANG X, REN S, et al. Deep residual learning for image recognition[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 770-778. [百度学术]
ZEILER M D, FERGUS R. Visualizing and understanding convolutional networks[C]//European Conference on Computer Vision. Cham: Springer, 2014: 818-833. [百度学术]
IOFFE S, SZEGEDY C. Batch normalization: Accelerating deep network training by reducing internal covariate shift[C]//International Conference on Machine Learning. Lille: PMLR, 2015: 448-456. [百度学术]
GLOROT X, BORDES A, BENGIO Y. Deep sparse rectifier neural networks[C]//Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics. Fort Lauderdale: PMLR, 2011: 315-323. [百度学术]
QIN X, ZHANG Z, HUANG C, et al. U2-Net: Going deeper with nested U-structure for salient object detection[J]. Pattern Recognition, 2020, 106: 107404. [百度学术]
WANG L, LU H, WANG Y, et al. Learning to detect salient objects with image-level supervision[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE, 2017: 136-145. [百度学术]
LI G, YU Y. Visual saliency detection based on multiscale deep CNN features[J]. IEEE Transactions on Image Processing, 2016, 25(11): 5012. [百度学术]
YAN Q, XU L, SHI J, et al. Hierarchical saliency detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Portland: IEEE, 2013: 1155-1162. [百度学术]
LI Y, HOU X, KOCH C, et al. The secrets of salient object segmentation[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Columbus: IEEE, 2014: 280-287. [百度学术]
MOVAHEDI V, ELDER J H. Design and perceptual validation of performance measures for salient object segmentation[C]//2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition-Workshops. San Francisco: IEEE, 2010: 49-56. [百度学术]
YANG C, ZHANG L, LU H, et al. Saliency detection via graph-based manifold ranking[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Portland: IEEE, 2013: 3166-3173. [百度学术]
MARGOLIN R, ZELNIKMANOR L, TAL A. How to evaluate foreground maps?[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Columbus: IEEE, 2014: 248-255. [百度学术]
FAN D P, CHENG M M, LIU Y, et al. Structure-measure: A new way to evaluate foreground maps[C]//Proceedings of the IEEE International Conference on Computer Vision. Venice: IEEE, 2017: 4548-4557. [百度学术]
FENG M, LU H, DING E. Attentive feedback network for boundary-aware salient object detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach: IEEE, 2019: 1623-1632. [百度学术]
QIN X, ZHANG Z, HUANG C, et al. Basnet: Boundary-aware salient object detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach: IEEE, 2019: 7479-7489. [百度学术]
MOHAMMADI S, NOORI M, BAHRI A, et al. CAGNet: Content-aware guidance for salient object detection[J]. Pattern Recognition, 2020, 103: 107303. [百度学术]
LIU Y, GU Y C, ZHANG X Y, et al. Lightweight salient object detection via hierarchical visual perception learning[J]. IEEE Transactions on Cybernetics, 2020, 51(9): 4439. [百度学术]
LIU Y, ZHANG X Y, BIAN J W, et al. SAMNet: Stereoscopically attentive multi-scale network for lightweight salient object detection[J]. IEEE Transactions on Image Processing, 2021, 30: 3804. [百度学术]
QIN X, ZHANG Z, HUANG C, et al. U2-Net: Going deeper with nested U-structure for salient object detection[J]. Pattern Recognition, 2020, 106: 107404. [百度学术]
ZHANG P, WANG D, LU H, et al. Learning uncertain convolutional features for accurate saliency detection[C]//Proceedings of the IEEE International Conference on Computer Vision. Venice: IEEE, 2017: 212-221. [百度学术]