Print

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




    图像理解和计算机视觉    




  <<上一篇 




  下一篇>> 





利用LapSVM的快速显著性检测方法
expand article info 王晨1,2, 樊养余1, 熊磊2
1. 西北工业大学电子信息学院, 西安 710072;
2. 空军工程大学航空航天工程学院, 西安 710038

摘要

目的 随着互联网技术的发展,信息的数量呈几何级数增长。信息改变着人类的传统生活方式,它可以给人们的娱乐,教育,商业活动提供便利。但是另一方面,需要处理的信息数量大大超过了计算机的处理能力,因此,如何使计算机能像人眼一样可以自动在大量信息中选择重要信息进行加工就显得十分重要。图像的视觉显著性信息能够反映图像中不同区域对人视觉系统刺激的程度。可靠的显著性方法可以从大量的信息中自动预测预测和挖掘重要的视觉信息,这些信息可以为图像分割、图像检索等应用提供有价值的线索。目前,显著性检测算法的鲁棒性和实时性是研究的热点。本文提出一种基于拉普拉斯支持向量机(LapSVM)的快速显著性检测方法。方法 采用简单线性迭代聚类算法SLIC(simple linear iterative clustering)将原始图像首先分成若干个超像素块,并用它代替图像像素参与计算,可以减少算法所需的计算量。利用超像素之间相似性构建图Laplacian。分析每个图像块的边缘特性定义粗糙标识样本,并利用一种快速LapSVM进行分类。LapSVM是一种基于流形正则化的半监督分类方法。通过引入提前停止机制来加速LapSVM的训练。这样可以快速地计算出一个近似结果。计算的复杂性由原来的O(n3)降到了O(kn2),其中n是未标识样本和标识样本的数量。k是经验评价值,它远远小于n。通过分析得到的分类结果,提取出更准确的背景和目标样本作为新的标识样本再次进行LapSVM分类。最后,利用能量函数对分类结果进行优化得到最终的显著性检测结果。结果 ASD数据库是MSRA数据库的子集,包含1 000幅图片,被广泛用于各种显著性检测算法的实验中。本文算法在ASD图像数据库上与7种流行的图像显著性检测算法进行对比实验。本文算法不仅在准确率和召回率上保持了与其他算法相当的鲁棒性,平均绝对误差达到4%左右,同时算法的平均运行时间缩短为0.03 s左右。结论 提出一种基于LapSVM的快速图像显著性检测算法,通过区域边缘特征和分类结果分析,实现图像中背景和目标样本的准确检测。实验结果表明,本文算法具有良好的鲁棒性,显著地提高了算法的实时性。因此,与其他算法相比本文算法更适用于检测跟踪等实时性要求较高的场合。该方法可以在较短的时间内,以更好地准确率水平提取显著性区域。

关键词

显著性检测; 边缘特征; LapSVM算法; 标识样本; 流形函数

Rapid saliency detection method using LapSVM
expand article info Wang Chen1,2, Fan Yangyu1, Xiong Lei2
1. School of Electronics & Information, Northwestern Polytechnical University, Xi'an 710072, China;
2. School of Aeronautics and Astronautics Engineering, Air Force Engineering University, Xi'an 710038, China
Supported by: National Natural Science Foundation of China(61379104)

Abstract

Objective With the development of Internet technologies, the amount of information has grown exponentially.The information can change the traditional ways of people's lifestyle.They can bring great convenience in daily amusement, education, and commerce, but they also lead to many new challenges on the existing processing technologies.On one hand, people need to handle the amount of information, which greatly exceeds the processing capability of computers.Thus, allocating the limited computational resource to the important visual information is important.On the other hand, people hope computers can simulate the functions of human eyes, which can effortlessly select a small amount of important information for further complex processing.Visual saliency of images can reflect the degree of stimulation of the human visual system to different regions.The reliable saliency methods can automatically predict, locate, and mine the important visual information.Thus, it can help computers in effective selection of important information from the massive visual data, which is suitable for image segmentation and image retrieval.At present, the robustness and real-time performance of the algorithm have been a very active research area.In this paper, we present a rapid saliency detection method based on Laplacian Support Vector Machines(LapSVM).The proposed saliency method can extract the salient regions in image within a relatively short period of times and reach a better accuracy. Method First, we segment the source image into many regular regions using the Simple Linear Iterative Clustering(SLIC) algorithm.The SLIC algorithm is a simple and efficient method to decompose an image in visually homogeneous regions.These regions are called superpixels, which provide a convenient way to calculate local features.They can reduce the complexity of image processing by obtaining the redundancy of images.In this paper, we use superpixels instead of image pixels to participate in the calculation of the algorithm, thus reducing the amount of computation required.Then, we construct the graph using the similarity between character of regions.Second, we define the rough-labelled samples using the boundary feature of image regions, and classify using LapSVM algorithm.LapSVM has shown the state-of-the-art performance in semi-supervised classification.Following the manifold regularization approach, the LapSVM used is trained in the primal.We speed-up the training by using an early stopping strategy based on the prediction on unlabeled data or, if available, on labeled validation examples.This allows the algorithm to quickly compute approximate results with roughly the same classification accuracy as the optimal ones, considerably reducing the training time.The computational complexity of the training algorithm is reduced from O(3n) to O(kn2), where n is the combined number of labeled and unlabeled samples and k is empirically evaluated to be significantly smaller than n.Thus, the LapSVM trained in the primal is the primary tool of the proposed saliency detection algorithm.Third, we extract the more robust labelled samples based on analysis of the result of classification.Then, the classification must be done again based on LapSVM.The classification result of every superpixel is the probability of the category to be owned, and we define the probability as the saliency value of the superpixel.Finally, we get the saliency map using the energy function to optimize the classification result.The saliency map is a gray image and its intensity is between 0 and 1.We can use the ground truth to verify the accuracy of results. Result Compared with seven other well-known saliency detection algorithms on ASD dataset.The ASD dataset is the subdataset of the MSRA dataset, and it contains 1 000 images.It is widely used in the saliency detection experiments of many algorithms.Experiments show that the proposed algorithm exhibits impressive performance with real feature and it maintains also good robustness.The running time of the proposed algorithm is shortened to about 0.03 s and Mean Absolute Error(MAE) is about 4%. Conclusion We propose a novel rapid saliency detection method based on LapSVM.Using the boundary feature of regions and analysis of classification, we get the more accurate background and foreground samples.Experimental results prove that the proposed algorithm maintains the robustness compared with the latest algorithms, and greatly reduces the running time.Therefore, compared with other algorithms, the proposed algorithm is more suitable for real-time application, such as detection and tracking.

Key words

saliency detection; boundary feature; LapSVM algorithm; labelled samples; manifold function

0 引言

显著性目标检测是指在未知场景中自动提取符合人类视觉习惯的兴趣目标的方法。最初的显著性检测是建立在心理学和神经学的研究基础之上。目前目标显著性的分析计算已经成为计算机视觉研究的一个热点,它被广泛应用到各个领域,如图像分割[1]、目标识别[2]、图像压缩[3],以及图像检索[4]等等。显著性检测方法大致分为两类,第1类为自下而上由数据驱动的方法[5-8],它关注的是如何理解人的注意力,如何判断人的注意力在场景中的定位,如Center-surround等理论;第2类为自上而下由任务驱动[9-10]的方法,它关注的是显著性目标到底在哪儿,对一些高水平视觉任务非常有用。本文的研究属于第1类自下而上的显著性检测方法。

近年来,有许多优秀的显著性检测算法涌现出来[5-8, 11]。其中GS(geodesic saliency)算法[6]发现“在图像中背景区域可以方便地连接图像边缘,但目标区域则不能。”基于此,该算法将区域的显著性定义为其到图像边缘的最短距离。MR(manifold ranking)算法[7]是将显著性检测看成一个基于图的流形排序问题,将图像的边缘作为背景查询样本,用流形排序的方法将与其内部结构相似的区域定义为一类。在GS和MR算法的基础上,有研究者提出了一种更优的背景检测方法-BD(background detection)方法[8]。BD方法发现“在自然图像中目标区域与图像边缘的连接长度要比背景区域少”,因此定义了一个全新的概念--“边缘连接”。利用这个概念可以更准确地评估每个区域作为背景的概率。该方法可以成功的进行显著性检测而不需要背景先验,因此在未知图像中得到较好的检测结果。以上几种方法在显著性检测中都取得了不错的效果,但有些方面仍不太理想,如图 1所示。其中图 1(f)为按照人类视觉特点描出的兴趣目标图(即:真实图),由数据库MSRA的相关学术文献提供[7]图 1(c)显示的是利用MR方法得到的检测结果,它不仅将边缘归为背景,同时将与边缘具有相似颜色的一部分目标(如:人物面部)归为背景。图 1(d)中BD方法将一些不与边缘连接的区域(如:人物身体)也定义为目标。以上这些情况都会造成检测中的误差。

图 1 不同算法产生的显著性图
Fig. 1 Saliency maps from different algorithms ((a)input image; (b)GS; (c)MR; (d)BD; (e)ours; (f)ground truth)

另外,值得注意的是,作为一种图像预处理技术,显著性检测算法的运行效率和时间会对后续的图像处理过程产生重要的影响。如何尽可能地降低算法的时间成本也是本文显著性检测研究的一个重要目标。

因此,本文提出一种基于LapSVM的快速显著性检测算法。通过引入新的标识样本提取方式和快速分类训练方法,以近似分类概率作为初始显著性值,并经过优化得到最终显著性检测结果。此方法取得了与其他算法相近甚至更好的检测效果,同时实现了更快速的显著性检测。

1 Laplacian SVM算法

拉普拉斯支持向量机(LapSVM)算法[12-13]是一种基于流形正则的半监督分类算法,由Belkin等人2006年提出,主要研究的是如何同时利用少量的有标识样本和大量的未标识样本进行训练和分类,是对传统SVM的延伸。

1.1 经典LapSVM算法

由于引入了样本流形正则项,LapSVM算法的学习模型中将包含样本的固有几何结构信息。如图 2(a)所示为二分类的钟表数据集。其中一类是图形的钟表边缘,另一类是指针。黑色块表示大量的未标识样本,本图例中每类只有一个标识样本(红色和蓝色)。图 2(b)是传统SVM分类结果,图 2(c)是用LapSVM分类的结果。很显然,LapSVM由于加入了未标识样本的流形结构信息,并将这一信息以Laplacian流形正则项的方式加入SVM,所以得到了更准确的分类结果。

图 2 不同分类方法的结果
Fig. 2 The results of different classification methods ((a) clock data; (b) SVM; (c) LapSVM)

假设样本集合$ \mathit{\boldsymbol{S = }}\left\{ {{x_i}, i = 1, \cdots, n} \right\}$$ {{x_i}} $代表第$i$个样本,$n$表示样本的数量。集合$ \mathit{\boldsymbol{\mathcal{L}}} = \left\{ {{x_i}, i = 1, \cdots, m} \right\} $表示标识样本,$m$表示标识样本的数量,$ \mathbf{\mathcal{U}} = \left\{ {{x_i}, i = 1, \cdots, u} \right\} $表示无标识样本的集合,$u$表示未标识样本的数量。用$ {y_i} $表示第$i$个样本所属类别,$ {y_i} $∈{-1,1}。LapSVM模型定义为

$ \begin{array}{l} {\mathit{\boldsymbol{f}}^ * } = \mathop {\min }\limits_{f \in {\mathit{\boldsymbol{H}}_k}} \sum\limits_{i = 1}^m {\max \left( {1 - {y_i}f\left( {{x_i}} \right), 0} \right)} + \\ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;{\gamma _A}\left\| \mathit{\boldsymbol{f}} \right\|_A^2 + {\gamma _I}\left\| \mathit{\boldsymbol{f}} \right\|_I^2 \end{array} $ (1)

式中,$ \mathit{\boldsymbol{f}} $=[$ {f\left( {{x_i}} \right)} $$ {{x_i}} $S]T,在训练数据集合上应为$n$维列向量。$ \left\| {\; \cdot \;} \right\|_A^2 $是在再生核希尔伯特空间(RKHS)中定义的环境范数(Ambient Norm),$ {{\mathit{\boldsymbol{H}}_k}} $是与核函数相关的RKHS。参数$ {\gamma _A} $是权重,它可以控制$ \left\| \mathit{\boldsymbol{f}} \right\|_A^2 $在RKHS中的复杂性;$ \left\| \mathit{\boldsymbol{f}} \right\|_I^2 $是流形正则项(intrinsic regularizer),用来保持样本分布的内在流形结构,参数$ {\gamma _I} $是低维流形中函数的权重,它控制着内在几何结构函数的复杂性。

通过计算拉格朗日乘子,得到分类器为

$ {\mathit{\boldsymbol{f}}^ * } = \sum\limits_{i = 1}^n {\mathit{\boldsymbol{\alpha }}_i^ * } \mathit{\boldsymbol{K}}\left( {{x_i}, x} \right) $ (2)

式中,$ {\mathit{\boldsymbol{\alpha }}_i^ * } $是拉格朗日乘子,$ \mathit{\boldsymbol{K}} $是核矩阵。求解拉格朗日乘子

$ {\mathit{\boldsymbol{a}}^ * } = {\left( {2{\gamma _A}\mathit{\boldsymbol{I}} + 2{\gamma _I}\mathit{\boldsymbol{KL}}} \right)^{ - 1}}\mathit{\boldsymbol{J}}_\mathcal{L}^{\rm{T}}\mathit{\boldsymbol{Y}}{\mathit{\boldsymbol{\beta }}^ * } $ (3)

式中,$ \mathit{\boldsymbol{I}} $是单位矩阵,$ \mathit{\boldsymbol{L}} $是Laplacian矩阵,$ \mathit{\boldsymbol{Y}} \in {\mathbb{R}^{m \times m}} $是由标识样本$ {{y_i}} $$i$=1,…,$m$组成的对角矩阵。$ {\mathit{\boldsymbol{J}}_\mathcal{L}} \in {\mathbb{R}^{m \times n}} $是由标识样本与未标识样本形成的分块矩阵$ \left[{\mathit{\boldsymbol{I}}\;\mathit{\boldsymbol{0}}} \right] $$ \mathit{\boldsymbol{\beta }} $是Lagrange乘子,即

$ {\mathit{\boldsymbol{\beta }}^ * } = \mathop {\max }\limits_{\beta \in {{\bf{R}}^m}} \sum {{\mathit{\boldsymbol{\beta }}_i} - \frac{1}{2}} {\mathit{\boldsymbol{\beta }}^{\rm{T}}}\mathit{\boldsymbol{Q\beta }} $ (4)

$ \mathit{\boldsymbol{Q}} = \mathit{\boldsymbol{Y}}{\mathit{\boldsymbol{J}}_{\mathcal{L}}}\mathit{\boldsymbol{K}}{\left( {2{\gamma _A}\mathit{\boldsymbol{I}} + 2{\gamma _I}\mathit{\boldsymbol{KL}}} \right)^{ - 1}}\mathit{\boldsymbol{J}}_{\mathcal{L}}^{\rm{T}}\mathit{\boldsymbol{Y}} $ (5)

$ {\rm{s}}.\;{\rm{t}}.\;\;\;\sum\limits_{i = 1}^m {{\mathit{\boldsymbol{\beta }}_i}{y_i} = 0;0 \le } {\beta _i} \le 1, i = 1, \cdots, m $

从上面的定义可以看出,LapSVM算法中涉及许多矩阵的运算和转换,这需要耗费大量的时间成本。例如,利用标准SVM二次规划的方法求解时,需要求解$ n $个线性系统方程和式(3) 中的$ n $个变量才可以得到系数$ {\mathit{\boldsymbol{\alpha }}^ * } $去定义目标函数$ {\mathit{\boldsymbol{f}}^ * } $。这使得应用LapSVM算法受到时间的限制。

1.2 LapSVM的快速训练

近年来,为了同时提高LapSVM算法的速度和有效性,研究者们提出了一些新的方法对样本集合进行训练[14-16]。文献[15]发现SVM的原始优化与二次优化方法具有很强的相似性,它们可以被看做是解决同一问题的两种不同方法,但是与二次优化相比,原始优化还有一些突出的特点,比如:它可以有效地解决主要问题;可以非常快地计算出一个较好的近似结果;可以直接控制函数$ {\mathit{\boldsymbol{f}}^ * } $的参数$ {\mathit{\boldsymbol{\alpha }}^ * } $,而不需要通过计算一系列的$ \mathit{\boldsymbol{\beta }} $。因此,这种方法被用来加速训练过程。

利用上述思想可以将LapSVM的模型式(1) 重新定义为

$ \begin{array}{l} \mathop {\min }\limits_{\alpha \in {{\bf{R}}^n}, b \in {\bf{R}}} \frac{1}{2}\left( {{{\sum\limits_{i = 1}^m {\left[{\max \left( {1-{y_i}\left( {\mathit{\boldsymbol{K}}_i^{\rm{T}}\mathit{\boldsymbol{\alpha }} + b} \right), 0} \right)} \right]} }^2}} \right. + \\ \;\;\;\;\;\;{\gamma _A}{\mathit{\boldsymbol{\alpha }}^{\rm{T}}}\mathit{\boldsymbol{K\alpha }} + {\gamma _1}\left( {{\mathit{\boldsymbol{\alpha }}^{\rm{T}}}\mathit{\boldsymbol{K}} + {\mathit{\boldsymbol{I}}^{\rm{T}}}b\mathit{\boldsymbol{L}}\left( {\mathit{\boldsymbol{K\alpha }} + b} \right)} \right) \end{array} $ (6)

式中,$ b $为SVM定义中的阈值。

在文献[13]中,作者使用条件预优共轭梯度(PCG)方法,在对标识样本和未标识样本的预测基础之上通过引入提前停止机制来加速LapSVM的训练,快速计算出近似结果。文献[12]中证明了这个近似结果,与原始LapSVM相比可以得到大体上相近的分类精确度。本文尝试采用引入了加速训练技术的分类算法LapSVM进行显著性检测。

2 标识样本选择

在利用LapSVM算法进行分类的过程中,标识样本数量越少,则分类结果误差可能越大。因此,如何选择准确与合适数量的标识样本是半监督型分类算法鲁棒性的保证之一。

2.1 初始标识样本的选择

近几年有许多基于背景检测的理论涌现出来,本文选择使用文献[8]中关于“边缘连接”的概念来确定初始背景样本。这个概念源于观察,从定义上来看,“边缘连接”是取区域在图像边界上的长度与区域的周长的比值,即

$ C\left( {{r_i}} \right) = \frac{{l\left( {{r_i}} \right)}}{{p\left( {{r_i}} \right)}} $ (7)

式中,$ {l\left( {{r_i}} \right)} $为区域$ {{r_i}} $在图像边界上的长度,$ {{p\left( {{r_i}} \right)}} $为区域$ {{r_i}} $的周长,$ C\left( {{r_i}} \right) $为区域$ {{r_i}} $的边缘连接值。

根据式(7),背景区域计算得到的边缘连接值$ C $应该较大,反之,目标区域则较小。但是在实际检测过程中,这种规律也会出现问题,如图 1(d)中人物的身体部分被误认为是显著性区域。因此,当边缘连接值较小甚至为0时,所定义的区域不一定是目标区域,也包括一些图像内部的干扰区域。同样地,当边缘连接值较大时,也不一定为背景区域,还包括一些边缘目标。所以,通过边缘连接值对背景的定义在一些复杂背景下不一定正确。但是在实验中BD方法仍然取得了不错的检测结果,除了它的优化过程外,关键是边缘连接值所定义的背景中有相当一部分是可靠的。因此本文采用这一思想,不同的是本文只将由式(7) 所定义的图像背景中的一部分通过阈值方法定义为初始背景样本,即

$ g = \left\{ \begin{array}{l} 1\;\;C \ge t\\ 0\;\;{\rm{其他}} \end{array} \right. $ (8)

$ t = \delta \times \left( {\max \left( C \right) - \min \left( C \right)} \right) $

式中,$ t $为阈值,$ \delta $为系数。如图 3所示,当阈值越小,获得的背景样本越多,但样本错分的概率也越大。阈值越大,则获得的背景样本越少,相对而言样本错分的概率也越小。本文在实验中选取$ \delta $=0.8。也就是说,本文只在原来边缘连接值所检测得到的背景图像中定义最可能为背景的那部分为初始背景样本。将定义的初始背景样本作为标识样本输入到分类算法LapSVM中,得到初始的分类结果。

图 3 不同阈值产生的显著性图
Fig. 3 Saliency maps form different thresholds((a) input image; (b)BdCon; (c)original background 1;(d)saliency map1;(e)original background 2;(f)saliency map 2)

2.2 标识样本的修正

分类算法中标识样本选择的正确与否直接影响分类结果的准确性,为了避开干扰区域对分类的不良影响,本文将从上述的分类结果中提取更准确的标识样本。将分类结果向量利用特定阈值进行二值化,得到目标估计区域。然后,定义目标估计区域与图像边缘区域之间的交集为$ \mathit{\boldsymbol{T}} $

提取过程是基于这样的假设:图像边缘的大部分区域应为背景。如图 4所示,本文对MSRA数据库内10 000幅图像的显著性目标占图像边缘的比例进行统计。可以看出,显著性目标在图像中的边缘占比低于10 %的超9成。因此,本文采用以下方法修正标识样本的选择:

图 4 MSRA上显著性目标边缘占比统计图
Fig. 4 Statistics of the marginal ratio of the salient object on MSRA

1) 若交集$ \mathit{\boldsymbol{T}} $为空,则表示显著性目标不在图像边缘,即取背景样本为图像边缘,目标样本不变。

2) 若交集$ \mathit{\boldsymbol{T}} $不为空,则表示显著性目标有可能位于图像边缘。这时,首先需要比较两个集合$ \mathit{\boldsymbol{T}} $和图像边缘$ \mathit{\boldsymbol{B}} $的长度。

(1) 若$ l $($ \mathit{\boldsymbol{T}} $)≥$ l $($ \mathit{\boldsymbol{B}} $)表示前面的分类结果将背景表示成了目标,原因是图像的边缘不可能全为目标。这时取背景样本集合为$ \mathit{\boldsymbol{B}} $

(2) 若$ l $($ \mathit{\boldsymbol{T}} $) < $ l $($ \mathit{\boldsymbol{B}} $)表示目标区域只与图像边缘的一部分重合,此时取$ \mathit{\boldsymbol{B}} $除去$ \mathit{\boldsymbol{T}} $的区域为背景样本集合,目标样本不变。利用新提取的标识样本与所有剩下的未标识样本一起建立图来逼近数据内在的流形结构。

3 显著性检测

3.1 图像表示

本文对于给定的自然图像首先进行超像素分割,用分割得到的所有的超像素来构建图$ \mathit{\boldsymbol{G}} $=($ \mathit{\boldsymbol{V}} $$ \mathit{\boldsymbol{U}} $),$ \mathit{\boldsymbol{V}} $为图中的所有节点,对应所有超像素,即分类算法中所有的样本。$ \mathit{\boldsymbol{U}} $表示相邻节点之间的连接关系。如$ \left( {i, j} \right) \in \mathit{\boldsymbol{U}} $表示是节点$ {V_i} $$ {V_j} $之间的边,它们之间的相似度为

$ {W_{i, j}} = \frac{1}{{{{\left\| {{c_i} - {c_j}} \right\|}^2} + \delta }} $ (9)

式中,$ {c_i} $$ {c_j} $分别表示图中节点(即超像素)的平均特征,$ \left( {i, j} \right) \in \mathit{\boldsymbol{V}} $$ \delta $是一个很小的常数,其作用是为了避免式(9) 出现无限大值的情况。根据式(9),图中的每条边$ \left( {i, j} \right) \in \mathit{\boldsymbol{U}} $都可以取得一个正的权重$ {W_{i, j}} $。若$ {W_{i, j}} $值很大,表示节点之间越相似,反之,则越不相似。

分类算法LapSVM中通常是通过热核函数来构建图的,即图中节点的连接关系由热核函数的大小决定。而热核函数的参数在不同的数据集上是不确定的,本文采用基于样本局部邻域性质的方法来构建图,使得图中两样本之间的相似度随局部统计量的改变而自适应的改变。而且从计算量上看,计算热核函数时需要计算指数函数,显然式(9) 的计算量要小的多。

3.2 显著性估计

图 5所示,本文提出的基于LapSVM的显著性检测算法分以下3步进行:

图 5 提出算法的图解
Fig. 5 Diagram of the proposed algorithm

1) 在超像素分割的基础上,利用边缘连接特性定义初始背景样本作为标识样本进行分类;

2) 对分类结果进行分析,提取修正的背景和目标样本作为新的标识样本再次进行分类;

3) 利用能量函数对分类结果进行优化,得到显著性结果。

假设分类算法的结果为$ n $维向量$ \mathit{\boldsymbol{o}} $($ n $是图像中所有超像素的数量,即所建图中所有节点的数量)。向量中每个元素表示其所代表区域属于目标或者属于背景的概率。本文希望得到的显著性图近可能的逼近图像的流形结构,因此,用流形能量函数对得到的分类结果进行优化[17],即

$ \mathit{\boldsymbol{sal}} = {\mathit{\boldsymbol{f}}_m} \cdot \left( {\mathit{\boldsymbol{o}} >, \mathit{mean}} \right) $ (10)

式中,$ \mathit{\boldsymbol{sal}} $为得到的显著性图,$ \mathit{mean} $为分类结果的均值,$ {\mathit{\boldsymbol{f}}_m} $为图像的流形函数。如图 6所示,本文算法成功地将重要区域集中到了显著性目标附近。MAE[8](mean absolute error)表示的是在像素级上显著性图与真实结果图之间的差异。这项指标的值越小,说明检测图与真实图之间的差异越小。显然本文的检测结果优于MR和BD方法。

图 6 提出算法的分类优化结果
Fig. 6 The classification and optimization of the proposed algorithm((a)input image; (b)class 1;(c)class 2;(d)ours; (e)MR; (f)BD)

4 仿真实验结果与分析

为了验证方法的有效性和先进性,本文使用ASD[19]数据库进行仿真实验。其中ASD是MSRA数据库的子库,含有1 000幅图片,被广泛使用到算法的显著性实验中。

实验中,将本文算法与7种在显著性检测研究领域比较成功的算法进行比较,包括:基于频域分析的FT(frequency-tunned)[19],基于全局对比度的RC(region contrast)[18],层次显著性检测HS(hierarchical saliency)[20],还有测地距离显著性检测GS[6],显著性滤波方法SF(saliency filter)[5],基于图的流形排序方法MR[7]和基于边缘连接的方法BD[8]等。

本文采用PR曲线,F-beta、MAE和运时间等4种指标对结果进行分析。这几种评价方式可以从多个角度对算法的性能进行评估,避免评价片面和失误。例如,PR曲线虽然可以对算法的准确率和召回率进行评价,但对于数据库的结果只能体现平均意义上的效果。而且在计算显著性区域时,精度和召回率往往相互影响,一种检测方法的精度提升时,召回率可能会有所下降。F-beta[19]是将精确度与召回率利用加权的方式进行合并,用单一指标综合评估算法的性能。MAE[8]说明的是检测图与真实图之间的差异。这3种评价方法相互补充,可以对一种方法进行更全面的、更准确地评价。

4.1 结果评估

图 7所示为本文算法在ASD数据库取得的各项指标图,从PR(准确率与召回率)曲线上看,本文算法与HS,GS,MR和BD这4个算法非常接近。F-beta值是准确率与召回率的综合评估,可以看出本文算法的F-beta值与BD和MR接近。另外,本文算法的MAE值最小,也就是说本文的检测结果与真实标注结果图最为接近。表 1为几种对比算法在F-beta和MAE这两个综合指标上的定量分析数据,显然本文算法在总体上优于其他算法。为了更直观地说明检测结果的优劣,实验中还选取了一些有代表性的图像的显著性检测结果进行对比,如图 8所示。第1行和第4行图像中的显著性目标内部都包含多种不同颜色特征,第2行属于边缘显著性目标检测,第5行属于显著性目标与背景对比度不大的情况,第3行属于复杂背景下的显著性检测例子。在这5组对比实验中,本文算法都可以较好完成显著性检测的任务,即成功地将目标从背景中分离开来,而且检测目标内部也比较均匀、高亮。

图 7 不同算法的指标图
Fig. 7 Index from different saliency methods ((a)PR curve; (b) MAE; (c) indexes)

表 1 不同算法的定量对比
Table 1 Quantitative comparison of different algorithms

下载CSV
指标 FT RC SF GS RES MR BD 本文
F-beta 0.551 0.688 0.486 0.824 0.852 0.881 0.891 0.912
MAE 0.203 0.228 0.172 0.098 0.097 0.071 0.058 0.040
图 8 不同算法产生的显著性图
Fig. 8 Saliency maps from different saliency methods((a)input images; (b)FT; (c)RC; (d)SF; (e)GS; (f)RES; (g)MR; (h)BD; (i)ours; (j)GT)

4.2 运行时间

实验还重点比较了几种性能较好的显著性检测算法在数据库ASD上的平均运行时间,如表 2所示。实验在配置为Inter(R)Core(TM) id-2410M CPU,2 GB内存的笔记本电脑上完成。其中SF和HS使用的是C++代码,其他算法使用的是Matlab代码,忽略代码工具的差异,从表 2中可以明显地看出,本文算法能够最快地对图像进行有效的显著性检测。众所周知,以往基于LapSVM的图像处理算法以及各种改进算法所需的运行时间都较长。在一些实时性要求较高的场合,这种分类算法的应用就会受到限制。本文通过利用如文献[12]所示的近似方法,使LapSVM的训练时间大幅缩短,成功得将LapSVM方法应用到显著性检测中,并且使处理变得快速、高效。

表 2 平均运行时间对比
Table 2 Comparison of average run time

下载CSV
GS HS MR BD 本文
时间/s 0.21 0.59 0.26 0.25 0.03

5 结论

本文提出一种基于LapSVM显著性检测算法。LapSVM是一种强大而有效的分类工具,本文将它用于显著性检测,准确地将背景和目标分离开来,得到了较高的准确率与召回率。另外,对于LapSVM中标识样本的确定,本文采用了分层的方式,首先利用边缘连接值确定一部分初始背景样本,然后利用对分类结果的分析对背景样本的选择进行修正。从显著性结果的对比实验中可以看出,本文算法得到了与MR和BD方法相近甚至更好的检测结果,而且耗时最短。但不足的是,本文算法在一些复杂背景场合的检测结果并不稳定。在今后的研究中,将尝试使用更多的特征对样本状态进行描述。

参考文献

  • [1] Li W T, Chang H S, Lien K C, et al. Exploring visual and motion saliency for automatic video object extraction[J]. IEEE Transactions on Image Processing, 2013, 22(7): 2600–2610. [DOI:10.1109/TIP.2013.2253483]
  • [2] Zhang L B, Zhang Y Y. Airport detection and aircraft recognition based on two-layer saliency model in high spatial resolution remote-sensing images[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2017, 10(4): 1511–1524. [DOI:10.1109/JSTARS.2016.2620900]
  • [3] Guo C L, Zhang L M. A novel multiresolution spatiotemporal saliency detection model and its applications in image and video compression[J]. IEEE Transactions on Image Processing, 2010, 19(1): 185–198. [DOI:10.1109/TIP.2009.2030969]
  • [4] Yang X Y, Qian X M, Xue Y. Scalable mobile image retrieval by exploring contextual saliency[J]. IEEE Transactions on Image Processing, 2015, 24(6): 1709–1721. [DOI:10.1109/TIP.2015.2411433]
  • [5] Perazzi F, Krähenbuhl P, Pritch Y, et al.Saliency filters:contrast based filtering for salient region detection[C]//Proceedings of 2012 IEEE Conference on Computer Vision and Pattern Recognition.Providence, USA:IEEE, 2012:733-740.[DOI:10.1109/CVPR.2012.6247743]
  • [6] Wei Y C, Wen F, Zhu W J, et al.Geodesic saliency using background priors[C]//Proceedings of the 12th European Conference on Computer Vision.Firenze Italy:ACM, 2012:29-42.[DOI:10.1007/978-3-642-33712-3_3]
  • [7] Yang C, Zhang L H, Lu H C, et al.Saliency detection via graph-based manifold ranking[C]//Proceedings of 2013 IEEE Conference on Computer Vision and Pattern Recognition.Portland, USA:IEEE, 2013:3166-3173.[DOI:10.1109/CVPR.2013.407]
  • [8] Zhu W J, Liang S, Wei Y C, et al.Saliency optimization from robust background detection[C]//Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition.Columbus, OH, USA:IEEE, 2014:2814-2821.[DOI:10.1109/CVPR.2014.360]
  • [9] Liu T, Yuan Z J, Sun J, et al. Learning to detect a salient object[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2011, 33(2): 353–367. [DOI:10.1109/TPAMI.2010.70]
  • [10] Yang J M, Yang M H. Top-down visual saliency via joint CRF and dictionary learning[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(3): 576–588. [DOI:10.1109/TPAMI.2016.2547384]
  • [11] Gopalakrishnan V, Hu Y Q, Rajan D. Random walks on graphs for salient object detection in images[J]. IEEE Transactions on Image Processing, 2011, 19(12): 3232–3242. [DOI:10.1109/TIP.2010.2053940]
  • [12] Melacci S, Belkin M. Laplacian support vector machines trained in the primal[J]. The Journal of Machine Learning Research, 2011, 12(5): 1149–1184.
  • [13] Belkin M, Niyogi P, Sindhwani V. Manifold regularization:a geometric framework for learning from labeled and unlabeled examples[J]. The Journal of Machine Learning Research, 2006, 7: 2399–2434.
  • [14] Liu R C, Zou H S, Zhang L, et al. An improved Laplacian SVM algorithm for SAR image segmentation[J]. Journal of Infrared and Millimeter Waves, 2011, 30(3): 250–254, 259. [刘若辰, 邹海双, 张莉, 等. 一种改进的Laplacian SVM的SAR图像分割算法[J]. 红外与毫米波学报, 2011, 30(3): 250–254, 259. ]
  • [15] Chapelle O. Training a support vector machine in the primal[J]. Neural Computation, 2007, 19(5): 1155–1178. [DOI:10.1162/neco.2007.19.5.1155]
  • [16] Shalev-Shwartz S, Singer Y, Srebro N, et al.Pegasos:primal estimated sub-gradient solver for SVM[C]//Proceedings of the 24th International Conference on Machine Learning.Corvalis, USA:Machine Learning, 2007:3-30.[DOI:10.1145/1273496.1273598]
  • [17] Zhou X Y, Belkin M, Srebro N.An iterated graph laplacian approach for ranking on manifolds[C]//Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.San Diego, California, USA:ACM, 2011:877-885.[DOI:10.1145/2020408.2020556]
  • [18] Cheng M M, Zhang G X, Mitra N J, et al.Global contrast based salient region detection[C]//Proceedings of 2011 IEEE Conference on Computer Vision and Pattern Recognition.Providence, RI:IEEE, 2011:409-416.[DOI:10.1109/CVPR.2011.5995344]
  • [19] Achanta R, Hemami S, Estrada F, et al.Frequency-tuned salient region detection[C]//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition.Miami, USA:IEEE, 2009:1597-1604.[DOI:10.1109/CVPR.2009.5206596]
  • [20] Yan Q, Xu L, Shi J P, et al.Hierarchical saliency detection[C]//Proceedings of 2013 IEEE Conference on Computer Vision and Pattern Recognition.Portland, OR, USA:IEEE, 2013:1155-1162.[DOI:10.1109/CVPR.2013.153]