saliency detection(显著度检测)用于Background Subtraction(背景扣除)和Segmenting objects(分割物体)

背景知识

1. 介绍

1.1 什么是显著性物体检测

一般认为,良好的显著性检测模型应至少满足以下三个标准:

  1. 良好的检测:丢失实际显著区域的可能性以及将背景错误地标记为显著区域的概率应该是低的;
  2. 高分辨率:显著图应该具有高分辨率或全分辨率以准确定位突出物体并保留原始图像信息;
  3. 计算效率:作为其他复杂过程的前端,这些模型应该快速检测显著区域。
1.2 显著物体检测的发展历史
  1. Itti等人提出的最早、经典的显著模型。例如“Modeling the influence of task on attention”一文掀起了跨认知心理学、神经科学和计算机视觉等多个学科的第一波热潮。这篇文章基本奠定了显著度研究的基本思路,即:特征提取—>归一化—>特征综合/显著度计算—>显著性区域划分/兴趣点标定
    在最初的文章中主要采取启发式的方法提取特征,依据生物学研究,主要提取亮度、色彩、旋转一致性三种特征,得到三种feature map。随后这些feature map被归一化以便综合,综合方法是简单的相加。从综合后的saliency map 上提取前N个峰值即为寻求的 interest point

  2. 第二波热潮由刘等人,和Achanta等人掀起,他们将显著性检测定义为二元分割问题,自此出现了大量的显著性检测模型。(马尔可夫随机场)

  3. 最近出现了第三波热潮,卷积神经网络(CNN),特别是引入完全卷积神经网络。CNN所能实现前所未有的性能使其逐渐成为显著性物体检测的主流方向。

在这里插入图片描述

================================================================================

Segmenting salient objects from images and videos

摘要

In this paper we introduce a new salient object segmentation method, which is based on combining a saliency measure with a conditional random field (CRF) model. The proposed saliency measure is formulated using a statistical framework and local feature contrast in illumination, color, and motion information. The resulting saliency map is then used in a CRF model to define an energy minimization based segmentation approach, which aims to recover well-defined salient objects. The method is efficiently implemented by using the integral histogram approach and graph cut solvers. Compared to previous approaches the introduced method is among the few which are applicable to both still images and videos including motion cues. The experiments show that our approach outperforms the current state-of-the-art methods in both qualitative and quantitative terms.

待更。。。。

================================================================================

A simple and efficient saliency detector for background sub- traction

摘要

In this paper we present a simple and computationally efficient method for detecting visually salient areas. The proposed method is based on searching image segments whose intensity values are more accurately described by the intensity distribution of the object compared to the distribution of the surrounding area. The practical implementation applies a sliding window approach, where the distributions of the objects and surroundings are estimated using semilocal intensity histograms(半局部强度直方图) that are efficiently evaluated using integral histogram(积分直方图) approach. The introduced approach requires no training and no additional segmentation algorithms.
Saliency detection can be used in background subtraction and we show that the proposed method is especially effective in the case where the scene is highly dynamic or the camera is not still. Furthermore using our approach we are able to detect also targets that are not moving. Comparisons with state-of-the-art saliency detectors and background subtraction techniques indicate that the introduced approach results in high performance and accuracy, outperforming the reference methods.

1. Introduction

显著性检测器(saliency detectors)提供了一种背景扣除方法。 这种方法源于人类视觉系统的注意力机制,使我们能够快速集中于显著物体而无需事先进行培训。 大多数方法[6,7,8]都是根据图像强度,颜色和渐变方向等特征来测量图像区域与周围环境的局部对比度,但是高计算需求和可变参数限制了它们的使用。

另一种类型的显著性检测器是使用图像的傅立叶变换的相位谱构造的[9,10]。 这些方法仅需设置很少的参数,它们的实现相对简单,对于小分辨率图像,它们的计算性能很好。 但是,这些方法的准确性相当有限。

作者方法的优势: 该方法的新颖性依赖于对半局部区域的显著性估计,而不是像素级别。这样就可以使用直方图来估计条件分布。 其简单的构造使该算法可以被非常高效地评估性能。

2. Proposed Approach

2.1 Saliency measure

让我们有一个矩形窗口 W W W ,如图1所示,该窗口分为内核 K K K 和外部边界 B B B 。将 W W W K K K 的宽度和高度分别表示为 w W w_W wW h W h_W hW w K w_K wK h K h_K hK

进一步令 x ∈ R 2 x∈R_2 xR2 W W W 内的一个点,令 F ( x ) F(x) F(x) 为在 x x x 处计算出的某个特征值。 在本文中,使用图像强度值(image intensity values)或RGB通道值作为特征 F F F ,但是也可以使用其他选择,例如渐变或纹理。

image intensity 表示单通道图像像素的强度(值的大小)。在灰度图像中,它是图像的灰度。在RGB颜色空间中,可以理解把它为是R通道的像素灰度值,G通道的像素灰度值,或是B通道的像素灰度值,也就是RGB中含三个image intensity。其他颜色空间类似,也就是每个通道的图像的像素灰度值。

在这里插入图片描述

定义两个假设: H 0 H_0 H0 x x x 不是显著点, H 1 H_1 H1 x x x 是显著点,并将相应的先验概率表示为 P ( H 0 ) P(H_0) P(H0) P ( H 1 ) P(H_1) P(H1)

现在,我们进行以下假设:假设 H 1 H_1 H1 K K K 内的点有效,而 H 0 H_0 H0 B B B 内的点有效。使用此假设,我们从 K K K B B B 中的特征值开始估计条件特征分布 p ( F ( x ) ∣ H 1 ) p(F(x)|H_1) p(F(x)H1) p ( F ( x ) ∣ H 0 ) p(F(x) |H_0) p(F(x)H0)
P ( H 1 ∣ F ( x ) ) = p ( F ( x ) ∣ H 1 ) P ( H 1 ) P ( F ( x ) ) P\left(H_{1} | F(x)\right)=\frac{p\left(F(x) | H_{1}\right) P\left(H_{1}\right)}{P(F(x))} P(H1F(x))=P(F(x))p(F(x)H1)P(H1)
利用全概率公式:
P ( F ( x ) ) = p ( F ( x ) ∣ H 0 ) P ( H 0 ) + p ( F ( x ) ∣ H 1 ) P ( H 1 ) P(F(x)) = p\left(F(x) | H_{0}\right) P\left(H_{0}\right) + p\left(F(x) | H_{1}\right) P\left(H_{1}\right) P(F(x))=p(F(x)H0)P(H0)+p(F(x)H1)P(H1)
所以:
P ( H 1 ∣ F ( x ) ) = p ( F ( x ) ∣ H 1 ) P ( H 1 ) p ( F ( x ) ∣ H 0 ) P ( H 0 ) + p ( F ( x ) ∣ H 1 ) P ( H 1 ) P\left(H_{1} | F(x)\right)=\frac{p\left(F(x) | H_{1}\right) P\left(H_{1}\right)}{p\left(F(x) | H_{0}\right) P\left(H_{0}\right) + p\left(F(x) | H_{1}\right) P\left(H_{1}\right)} P(H1F(x))=p(F(x)H0)P(H0)+p(F(x)H1)P(H1)p(F(x)H1)P(H1)
现在,使用估计的 P ( H 1 ∣ F ( x ) ) P\left(H_{1} | F(x)\right) P(H1F(x)) ,我们可以为 K K K 中每个点计算 H 1 H_1 H1 的概率,从而改善 H 1 H_1 H1 的初始有效性。

我们将定义显著性 S ( x ) S(x) S(x) :
S ( x ) = P ( H 1 ∣ F ( x ) ) S(x) = P\left(H_{1} | F(x)\right) S(x)=P(H1F(x))

在这里插入图片描述

注:在RGB值作为特征 F ( x ) F(x) F(x) 的情况下,我们为每个通道独立计算 S S S,并将最大值作为最终显著性值。

2.2 Saliency detector

我们将应用上一节中定义的 S ( x ) S(x) S(x) 来构造 Saliency detector 。 设 I ( x ) I(x) I(x) 为高度为 h I h_I hI 且宽度为 w I w_I wI 的数字图像,设 W ( i ) W(i) W(i) 为上节中以像素位置 i i i 为中心的窗口。我们将以步长 s W s_W sW 在图像 I ( x ) I(x) I(x) 上滑动窗口 W ( i ) W(i) W(i) ,并在每个窗口位置 i i i 上计算 S i ( x ) S_i(x) Si(x) 。 选择采样步长 s W s_W sW 以便窗口确实重叠,我们将像素的显著性值定义为最大的 S ( x ) S(x) S(x)
S ( x ) = max ⁡ j { S j ( x ) ∣ x ∈ W ( j ) } S(x)=\max _{j}\left\{S_{j}(x) | x \in W(j)\right\} S(x)=jmax{Sj(x)xW(j)}

在这里插入图片描述

在所有实验中将 P ( H 1 ) P(H_1) P(H1) 设置为0.25, P ( H 0 ) P(H_0 ) P(H0) 设置为0.75。

阈值 t t t (相对于 S ( x ) S(x) S(x) )对应于假设 H 1 H_1 H1 允许显著性像素具有的最低概率,我们根据经验将其设置:静止图像 t = 0.7 t = 0.7 t=0.7 ,视频序列: t = 0.65 t = 0.65 t=0.65 。最后做一次闭运算。

在这里插入图片描述

显著性检测方法的性能由窗口W的大小来决定,该窗口 W W W 决定了检测器 recover 的显著性物体的大小。

在这里插入图片描述

2.3 Implementational issues

为了计算度量 S ( x ) S(x) S(x) ,将通过计算内核 K K K 和边界 B B B 中的归一化特征直方图(normalized feature histograms)来估计条件概率密度函数 p ( F ( x ) ∣ H 0 ) p\left(F(x) | H_{0}\right) p(F(x)H0) p ( F ( x ) ∣ H 1 ) p\left(F(x) | H_{1}\right) p(F(x)H1) 。为了提高鲁棒性,使用高斯核进一步平滑直方图。

h K ( F ) h_K(F) hK(F) h B ( F ) h_B(F) hB(F) 分别表示从内核 K K K 和边界 B B B 计算出的直方图,令 g ( F ) g(F) g(F) 为高斯平滑函数。
p ^ ( F ( x ) ∣ H 0 ) = N ( g ( F ) ∗ h B ( F ) ) p ^ ( F ( x ) ∣ H 1 ) = N ( g ( F ) ∗ h K ( F ) ) \begin{array}{l}{\hat{p}\left(F(x) | H_{0}\right)=\mathcal{N}\left(g(F) * h_{B}(F)\right)} \\ {\hat{p}\left(F(x) | H_{1}\right)=\mathcal{N}\left(g(F) * h_{K}(F)\right)}\end{array} p^(F(x)H0)=N(g(F)hB(F))p^(F(x)H1)=N(g(F)hK(F))
N \mathcal{N} N 是归一化操作
N ( f ( x ) ) = 1 ∑ x f ( x ) f ( x ) \mathcal{N}(f(x))=\frac{1}{\sum_{x} f(x)} f(x) N(f(x))=xf(x)1f(x)
使用积分直方图(integral histogram )可以有效地计算 h K ( F ) h_K(F) hK(F) h B ( F ) h_B(F) hB(F) [11]。 这样,我们只需要遍历(traverse over)像素一次即可获得每个窗口的直方图。

当将这种检测器应用于视频序列时,一种直接的方法是分别处理每帧。

因为少量连续帧中的变化很小。我们可以用衰落存储器(fading memory,实在不知道怎么翻译)递归最小二乘估计器(recursive least square estimator)来过滤分布 p ^ ( F ( x ) ∣ H 0 ) \hat{p}\left(F(x) | H_{0}\right) p^(F(x)H0) p ^ ( F ( x ) ∣ H 1 ) \hat{p}\left(F(x) | H_{1}\right) p^(F(x)H1)
p ˉ k ( F ( x ) ∣ H i ) = λ p ˉ k − 1 ( F ( x ) ∣ H i ) + ( 1 − λ ) p ^ k ( F ( x ) ∣ H i ) \bar{p}_{k}\left(F(x) | H_{i}\right)=\lambda \bar{p}_{k-1}\left(F(x) | H_{i}\right)+(1-\lambda) \hat{p}_{k}\left(F(x) | H_{i}\right) pˉk(F(x)Hi)=λpˉk1(F(x)Hi)+(1λ)p^k(F(x)Hi)
其中 p ^ k ( F ( x ) ∣ H i ) \hat{p}_{k}\left(F(x) | H_{i}\right) p^k(F(x)Hi) 是仅使用帧 k k k 计算的估计值, p ˉ k ( F ( x ) ∣ H i ) \bar{p}_{k}\left(F(x) | H_{i}\right) pˉk(F(x)Hi) 是对帧 k k k 的滤波后的密度估计值, 0 ≤ λ < 1 0≤λ<1 0λ<1 是 衡量上一帧指数衰减(exponentially decaying)造成的影响的系数。所提出的递归估计器仅需要将先前的估计值保留在内存中,并且在 computational load 上仅引入了 marginal addition。

参考资料

[1] Borji A , Cheng M M , Hou Q , et al. Salient object detection: A survey[J]. 计算可视媒体(英文), 2019.

[2] 显著性对象检测综述

[3] 【显著性目标检测CVPR2018】 显著性检测领域论文整理解读(Salient Object Detection)

[4] Rahtu E , Heikkila J . A Simple and efficient saliency detector for background subtraction[C]// Computer Vision Workshops (ICCV Workshops), 2009 IEEE 12th International Conference on. IEEE, 2009.

[5] Rahtu E , Kannala J , Salo M , et al. Segmenting Salient Objects from Images and Videos[J]. 2010.

[6] Hu Y , Xie X , Ma W Y , et al. Salient Region Detection Using Weighted Feature Maps Based on the Human Visual Attention Model[C]// Advances in Multimedia Information Processing - PCM 2004, 5th Pacific Rim Conference on Multimedia, Tokyo, Japan, November 30 - December 3, 2004, Proceedings, Part II. 2004.

[7] Itti L , Koch C , Niebur E . A Model of Saliency-based Visual Attention for Rapid Scene Analysis[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1998, 20(11):1254-1259.

[8] Ma Y F , Zhang H J . Contrast-based image attention analysis by using fuzzy growing[C]// Proceedings of the Eleventh ACM International Conference on Multimedia, Berkeley, CA, USA, November 2-8, 2003. ACM, 2003.

[9] Guo C , Ma Q , Zhang L . Spatio-temporal Saliency detection using phase spectrum of quaternion fourier transform[C]// 2008 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2008), 24-26 June 2008, Anchorage, Alaska, USA. IEEE, 2008.

[10] Hou X , Zhang L . Saliency Detection: A Spectral Residual Approach[C]// 2007 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2007), 18-23 June 2007, Minneapolis, Minnesota, USA. IEEE, 2007.

pproach[C]// 2007 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2007), 18-23 June 2007, Minneapolis, Minnesota, USA. IEEE, 2007.

[11] Porikli F . Integral histogram: a fast way to extract histograms in Cartesian spaces[C]// 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05). IEEE, 2005.

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
以下是sAUC的Matlab代码实现: ```matlab function [score, shuffled_map] = sAUC(saliency_map, fixation_map, num_shuffles) % saliency_map: 输入的显著图像 % fixation_map: 目标图像 % num_shuffles: 随机置换数量 saliency_map = im2double(saliency_map); fixation_map = im2double(fixation_map); % 将显著图像和目标图像转换为向量形式 saliency_vec = saliency_map(:); fixation_vec = fixation_map(:); % 计算AUC值 score = computeAUC(saliency_vec, fixation_vec); % 生成随机置换 shuffled_map = zeros(size(saliency_map,1), size(saliency_map,2), num_shuffles); for i=1:num_shuffles shuffled_fixation_vec = fixation_vec(randperm(length(fixation_vec))); [~,shuffled_map(:,:,i)] = computeAUC(saliency_vec, shuffled_fixation_vec); end % 计算shuffled AUC值 shuffled_score = zeros(num_shuffles, 1); for i=1:num_shuffles shuffled_score(i) = computeAUC(saliency_vec, shuffled_fixation_vec); end % 计算sAUC值 score = (score - mean(shuffled_score)) / std(shuffled_score); end function [score, thresholded_map] = computeAUC(saliency_vec, fixation_vec) % 计算ROC曲线 [~, ~, info] = vl_roc(fixation_vec, saliency_vec); % 计算AUC值 score = info.auc; % 将显著图像转换为二值图像 thresholded_map = zeros(size(saliency_vec)); thresholded_map(saliency_vec > info.eer) = 1; end ``` 使用方法: 1. 将以上代码保存为`sAUC.m`文件; 2. 在Matlab中加载显著图像和目标图像; 3. 调用`sAUC`函数计算sAUC值和随机置换的显著图像。 示例代码: ```matlab % 加载显著图像和目标图像 saliency_map = imread('saliency.jpg'); fixation_map = imread('fixation.jpg'); % 计算sAUC值和随机置换的显著图像 [num_shuffles, score, shuffled_map] = sAUC(saliency_map, fixation_map, 100); ``` 其中,`num_shuffles`是随机置换的数量,`score`是sAUC值,`shuffled_map`是随机置换的显著图像。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值