当前位置 博文首页 > 不要Q晓航好嘛的博客:目标检测(2020-9-3)
Edge Boxes: Locating Object Proposals from Edges
C. Lawrence Zitnick and Piotr Doll′ar
Microsoft Research
Abstract:提出了一种利用边界框来检测物体的算法,并且通过框住的轮廓,可以计算包含物体的概率来定量的分析性能,当轮廓与边界框重合概率达到0.7时,物体的召回率超过75%,除此之外,算法的计算速度很快,约在0.25秒,并且还可以进行微小精度损失的实时的变化。
1Introduction:
目标检测的目标就是要确定一幅图像当中是否存在要检测的物体。对于这个问题,十几年前的算法是利用滑动窗口的范例,在每个方向,每个尺度,进行的物体对象分类。最近,另外一种框架被提出,该框架替代掉了尺度和方向的采取方法,进而利用边界框的目标检测方法,这类方法可以与对象无关的精确的检测出对象(可以不用依靠周围物体来检测物体),在2013图像网络检测挑战和PASCAL VOC数据集上,该类方法就是获胜者。
在这篇论文中,提出了一种根据边缘来检测目标的算法,与分割相似,也需要得到图像的边缘映射,之后再从映射中检测目标。具体来说就是:通过边界框包含目标的可能性概率(边界框的分数)来作为目标检测的一个指标,如果所有的边缘像素都属于边界框内部的轮廓线的话,那么就可以得出:该轮廓被边界框涵盖了。在进行目标检测之前,本文利用结构边缘检测器( Structured forests for fast edge detection/Fast edge detection using structured forests)进行边缘映射的获取,在这个过程中,为了减少计算,还将领域内的相似方向的像素进行聚类构成新重组。本文利用传统的方法在每一个潜在的对象位置、比例和高宽比上,生成一个分数,来表示一个对象出现的可能性,以进一步优化边界框。
在这里大胆想象一个课题方向:图像的边缘加宽处理和可视化提高
方法?原理?(待研究补充)
2Related work
最常用的目标检测方法可以大致的分为两类:1.使用复杂且昂贵的分类器和检测器;2.弱监督学习,通过限制候选区域的数量,在较少的监督下学习。
在这里给出三个目标检测的案例:
1.算法分数:
通过在一个分类框架中结合大量的线索来候选排序,并给每个对象分配一个结果的“不客观性”分数,来找到代表对象的候选边界框
2.种子分割:
从种子的多个区域开始,为每一个种子生成前景-背景的分割(方法的主要优点是生成高质量的分割掩模,缺点是计算成本高(每幅图像的分钟数。)
3.超像素融合:
选择性搜索是基于计算多层次的超像素分层分割,它一直是广泛使用的高层次检测方法。
本文的方法是第一个直接从边缘中产生目标边界框的方法,不像其他的先前的方法,本文并没有使用分割或超像素,也不需要学习分数函数,而是用边界框封闭整个轮廓。
3Approach
本节描述了找到目标对象的方法。目标对象是基于单一计算分数来进行等级划分的。首先,基于边缘重组来描述数据结构,然后定义基于边缘的评分函数,最后,使用滑动窗口的框架来寻找高等级的目标对象,按照粗到细的搜索细化进行跨位置、比例和高宽比的评估(这地方的理解可能有偏差)。
给定一个图像,首先使用结构边缘检测器来计算每个像素的边缘响应,利用单一尺度变化和尖锐化增强来减少运行时间;然后,对边缘响应利用非极大值抑制正交方法去找到边缘峰值;接着使用简单的贪婪算法构成边缘的重组(结合8连接的边缘,直到方向差的总和超过π/2停止);然后,根据公式:
计算每对领域组的亲和力;接着,由边缘重组集合和亲和力,根据下式:
计算候选边界框的目标检测分数,(为了解释边界框中间的边缘相对于边界框附近的边缘不重要这一观察,就用下面的公式来衡量:
);然后,分别在水平和垂直边界寻找交叉点构成数据结构,进而找到重叠边缘组的列表;最后通过IoU(交并比)度量通过滑动窗口搜索图中的每个位置得到结果。
4Results
本节将算法与其他算法进行比较。下图为算法的变体比较。
可以看出图c中的曲线变化挺大的,参数的移除对算法本身有一定的影响。
下面是算法的三个不同版本的准确度的衡量。
从图中可以看出,根据参数设置的Edge boxes50在IoU为0.5时的AUC(Area Under the Curve)和Recall最高。
下图是不同度量情况下,算法的比较。
上图的其他算法在上文有相应的提到,如Objectness , Selective Search。
下图是不同算法的性能定量的比较。
5Discussion
在本文中,提出了一种有效的方法来寻找图像中的目标建议,它依赖于一个简单的观察:完全被一个边界框包围的边缘的数量表明了该边界框包含一个目标的可能性。描述了一个直接的评分函数,它计算一个框内的边缘强度减去横跨该框边界的轮廓部分的强度的加权和。利用有效的数据结构和智能搜索策略,可以快速找到目标建议。结果表明,在目前的技术水平上提高了准确性和效率。
未来的工作是,使用边缘来帮助生成分割建议,除了边界框建议的对象。在对一个候选边界框进行打分时,去除许多边;这些被抑制边缘的位置可以为分割的生成提供有用的信息。
训练的图。
Part Code 代码
.
在这里插入代码片
% EDGES
% See also readme.txt
%
% Fast edge detector code is based on the paper:
% P. Doll�r and C. Zitnick
% "Structured Forests for Fast Edge Detection", ICCV 2013.
% Please cite the above paper if you end up using the edge detector.
%
% Edge Boxes object proposal generation is based on the paper:
% C. Zitnick and P. Doll�r
% "Edge Boxes: Locating Object Proposals from Edges", ECCV 2014.
% Please cite the above paper if you end up using the object proposals.
%
% Structured Edge detector code:
% edgesChns - Compute features for structured edge detection.
% edgesDemo - Demo for Structured Edge Detector (please see readme.txt first).
% edgesDemoRgbd - Demo for RGBD Structured Edge Detector (please see readme.txt first).
% edgesDetect - Detect edges in image.
% edgesSweeps - Parameter sweeps for structured edge detector.
% edgesTrain - Train structured edge detector.
%
% Edge detection evaluation code:
% edgesEval - Run and evaluate structured edge detector on BSDS500.
% edgesEvalDir - Calculate edge precision/recall results for directory of edge images.
% edgesEvalImg - Calculate edge precision/recall results for single edge image.
% edgesEvalPlot - Plot edge precision/recall results for directory of edge images.
%
% Edge Boxes object proposal generation code:
% edgeBoxes - Generate Edge Boxes object proposals in given image(s).
% edgeBoxesDemo - Demo for Edge Boxes (please see readme.txt first).
% edgeBoxesSweeps - Parameter sweeps for Edges Boxes object proposals.
%
% Object proposal evaluation code:
% boxesData - Get ground truth data for object proposal bounding box evaluation.
% boxesEval - Perform object proposal bounding box evaluation and plot results.
%
% Sticky Edge Adhesive Superpixel code:
% spDemo - Demo for Sticky Superpixels (please see readme.txt first).
% spDetect - Detect Sticky Superpixels in image.
% spAffinities - Compute superpixel affinities and optionally corresponding edge map.
% Demo for Structured Edge Detector (please see readme.txt first).
%% set opts for training (see edgesTrain.m)
opts=edgesTrain(); % default options (good settings)
opts.modelDir='models/'; % model will be in models/forest
opts.modelFnm='modelBsds'; % model name
opts.nPos=5e5; opts.nNeg=5e5; % decrease to speedup training
opts.useParfor=0; % parallelize if sufficient memory
%% train edge detector (~20m/8Gb per tree, proportional to nPos/nNeg)
tic, model=edgesTrain(opts); toc; % will load model if already trained
%% set detection parameters (can set after training)
model.opts.multiscale=0; % for top accuracy set multiscale=1
model.opts.sharpen=2; % for top speed set sharpen=0
model.opts.nTreesEval=4; % for top speed set nTreesEval=1
model.opts.nThreads=4; % max number threads for evaluation
model.opts.nms=0; % set to true to enable nms
%% evaluate edge detector on BSDS500 (see edgesEval.m)
if(0), edgesEval( model, 'show',1, 'name','' ); end
References