目标检测:Edge Boxes: Locating Object Proposals from Edges
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
本节描述了找到目标对象的方法。目标对象是基于单一计算分数来进行等级划分的。首先,基于边缘重组来描述数据结构,然后定义基于边缘的评分函数,最后,使用滑动窗口的框架来寻找高等级的目标对象,按照粗到细的搜索细化进行跨位置、比例和高宽比的评估(这地方的理解可能有偏差)。
(1)给定一个图像,首先使用结构边缘检测器来计算每个像素的边缘响应,利用单一尺度变化和尖锐化增强来减少运行时间;然后,对边缘响应利用非极大值抑制正交方法去找到边缘峰值;接着使用简单的贪婪算法构成边缘的重组(结合8连接的边缘,直到方向差的总和超过π/2停止);然后,根据公式:

其中,θij是xi和xj之间的夹角,γ是用来调整在角度发生改变的情况下的亲和力的敏感程度的。
直观的来说,笔直的边界具有较高的affinity,而曲率较高的边界的affinity较低。给定一个bbox,根据bbox内部含有的edge的affinity的最大值来判断bbox的boundary。给定一个edges group的几个,计算两两相邻groups之间的affinity。如果两个groups之间均值夹角接近于groups的方向,则说明这两个edge groups有着较高的affinity。
(2)从上面得到了edges groups集合S和他们的affinity,可以计算每一个candidate bounding box的object proposal score。首先计算在group Si 中的所有edges p的mp值的和,为mi,在group Si中计算si是否完全包含在b中的连续值wb(xi) ,介于[0,1]。计算每对领域组的亲和力;接着,由边缘重组集合和亲和力,根据下式:


其中,T是指从框框的边缘开始到达si的edge group序列集合。(如果在某路径T上,一旦出现相似度为0(这很容易出现)的情况,那么这条路径T就废弃了,所以想找到那个合适的T很快。)
PS:上式还可以这么理解:给每一个edge group一个权值,换句话说,打个分数,然后把权值均为1的edge group归为框框内轮廓上的一部分,把权值为0的edge group归为框框外或者与框框边界重叠的轮廓的一部分。
(3)使用一种高效的算法,去计算每一个Sb。上面的公式可以求出edges group Si 与bounding box中含有最高的affinity的一些path。在上面的公式计算下,很多的pairwise都是0。接着计算候选边界框的目标检测分数,(为了解释边界框中间的边缘相对于边界框附近的边缘不重要这一观察,就用下面的公式来衡量:

);然后,分别在水平和垂直边界寻找交叉点构成数据结构,进而找到重叠边缘组的列表;最后通过IoU(交并比)度量通过滑动窗口搜索图中的每个位置得到结果。
(4)查找策略
使用sliding window search 在一个image上进行 position,scale和aspect ratio上的查找bbox,在可能含有一个object的区域,会产生更多的bounding boxes和更密集地聚集。利用IoU去筛选,refinement,去合并bounding box。最后是对得到的bounding boxes进行NMS,得到最终的sorted boxes。
具体的算法流程可以用下面的流程图来说明:

不同计算方式的展示:

图中,中间这幅图是没有移除与边界框重叠部分的轮廓得出的结果,右边的图反之。
4Results
本节将算法与其他算法进行比较。下图为算法的变体比较。
可以看出图c中的曲线变化挺大的,参数的移除对算法本身有一定的影响。
下面是算法的三个不同版本的准确度的衡量。

从表中可知,曲线下方的区域(AUC:Area Under the Curve),AUC的值在IoU设置不同而不同。上图的其他算法在上文有相应的提到,如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
本文的实验效果:作者和几个当前流行的proposal提取算法进行了比较,得到了比较不错的效果,主要是基于经典的PASCAL VOC数据集,但是不得不说,他把BING弄得太差了。另外,这个算法存在一个较大的缺陷。
本文算法的不足:一句话,通过demo测试,发现,其评分较高的proposals均为近乎整幅图像,比如说,图像中有8个人,那么该算法评分最高的proposal肯定是同时包含了这8个人的,这一点不足,使得这个算法的含金量大大缩水,因为,在实际应用中,我想要的效果往往是,最高评分的几个proposal最好是单独的人,而不是8个人一起。至于原因,不难理解,上面已经说过了,本文不是基于“学习”的算法,没有训练过程,不可能像BING那样,训练了单独人体,那么最高评分的proposal肯定就是单独的人体,训练了汽车,那么最高评分的proposal肯定就是单独的汽车等等。
References
- Viola, P.A., Jones, M.J.: Robust real-time face detection. IJCV 57(2) (2004) 137–154
- Dalal, N., Triggs, B.: Histograms of oriented gradients for human detection. In: CVPR. (2005)
- Felzenszwalb, P., Girshick, R., McAllester, D., Ramanan, D.: Object detection with discriminatively trained part based models. PAMI 32(9) (2010) 1627–1645
- Alexe, B., Deselaers, T., Ferrari, V.: Measuring the objectness of image windows. PAMI 34(11) (2012)
- Uijlings, J.R.R., van de Sande, K.E.A., Gevers, T., Smeulders, A.W.M.: Selective search for object recognition. IJCV (2013)
- Carreira, J., Sminchisescu, C.: Cpmc: Automatic object segmentation using constrained parametric min-cuts. PAMI 34(7) (2012)
- 7. Rahtu, E., Kannala, J., Blaschko, M.: Learning a category independent object detection cascade. In: ICCV. (2011)
- 8. Manen, S., Guillaumin, M., Van Gool, L., Leuven, K.: Prime object proposals with randomized prims algorithm. In: ICCV. (2013)
- 9. Endres, I., Hoiem, D.: Category-independent object proposals with diverse ranking. PAMI (2014)
- Rantalankila, P., Kannala, J., Rahtu, E.: Generating object segmentation proposals using global and local search. In: CVPR. (2014)
- Cheng, M.M., Zhang, Z., Lin, W.Y., Torr, P.: BING: Binarized normed gradients for objectness estimation at 300fps. In: CVPR. (2014)
- Wang, X., Yang, M., Zhu, S., Lin, Y.: Regionlets for generic object detection. In: ICCV. (2013)
13. Girshick, R.B., Donahue, J., Darrell, T., Malik, J.: Rich feature hierarchies for accurate object detection and semantic segmentation. In: CVPR. (2014)
14. Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In: CVPR. (2009)
15. Everingham, M., Van Gool, L., Williams, C.K.I., Winn, J., Zisserman, A.: The pascal visual object classes (voc) challenge. IJCV 88(2) (2010) 303–338
16. Doll´ar, P., Zitnick, C.L.: Structured forests for fast edge detection. In: ICCV. (2013)
17. Marr, D.: Vision: A computational investigation into the human representation and processing of visual information. Inc., New York, NY (1982)
18. Eitz, M., Hays, J., Alexa, M.: How do humans sketch objects? ACM Transactions Graphics 31(4) (2012)
19. Doll´ar, P., Zitnick, C.L.: Fast edge detection using structured forests. CoRR abs/1406.5549 (2014)
20. Deselaers, T., Alexe, B., Ferrari, V.: Localizing objects while learning their appearance. In: ECCV. (2010)
21. Siva, P., Xiang, T.: Weakly supervised object detector learning with model drift detection. In: ICCV. (2011)
22. Gu, C., Lim, J.J., Arbel´aez, P., Malik, J.: Recognition using regions. In: CVPR. (2009)
23. Hoiem, D., Efros, A.A., Hebert, M.: Geometric context from a single image. In: ICCV. (2005)
24. Russell, B.C., Freeman, W.T., Efros, A.A., Sivic, J., Zisserman, A.: Using multiple segmentations to discover objects and their extent in image collections. In: CVPR. (2006)
25. Malisiewicz, T., Efros, A.A.: Improving spatial support for objects via multiple segmentations. In: BMVC. (2007)
26. Hosang, J., Benenson, R., Schiele, B.: How good are detection proposals, really? In: BMVC. (2014)
27. Felzenszwalb, P.F., Huttenlocher, D.P.: Efficient graph-based image segmentation. IJCV 59(2) (2004) 28. Canny, J.: A computational approach to edge detection. PAMI (6) (1986) 679–698

浙公网安备 33010602011771号