OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

趁热打铁,把OverFeat总结了。

一、简介

这个文章中提出了一种较为通用的结构,并将其应用在了识别(classification)、定位(localization,只有一个物体,要给出位置)、检测(detection,可能有0到多个物体)。并且将其使用的特征提取器命名为了OverFeat(仅仅是一个名字,文中也没有给出解释)。这篇论文或许是很早一批将CNN利用到多种不同任务上的一种尝试,因此感觉上新鲜的结构并不多。下面通过介绍三种应用来阐释它的思想。

二、基础框架

基础架构如下:

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

这个是fast版本,还有另一个accurate版本在文章最后给出了:

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

两者的区别在于一二层使用的卷积核大小,还有第五层的通道大小,全连接层也有变化。

下面来说三个任务:

三、分类任务

主要是用到了多尺度分类,这与multi-view voting不同,multi-view voting指的是放大图片,在多个位置裁剪,得到多个view。多尺度体现在能够对不同大小的图片进行检测,实现多尺度,这也就需要网络能够适应不同尺寸的输入。文中使用了6个尺度的输入。输入尺度改变,最终的特征图的尺寸也会改变,文中通过在特征图上使用滑窗,并进行投票的方法解决了这个问题如下图:

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

(a)是特征图,(b)是三个滑窗(delta改变)取得的特征图,(c)中三个特征图分别得出类别概率,进行整合,之后使用平均或者投票的方式得到类别的最终概率。

四、定位任务

它是采用了一种滑窗的方法来定位的,下面用图来说明:

1.多尺度+滑窗

多尺度的做法和上面一样,对于每个尺度,在上面取不同个数的滑窗(但是大小一致的),如下图:

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

有些框在最后一个尺度没有被标出,不知道为啥。

2.对于每个滑窗,如果我们又使用了分类中的方法,那么对于一个滑窗,我们相当于又有了几个子窗,反映在原图中就是这样子,每个窗都有了3*3个的密集版本。

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

3.对网络对每个子窗都可以得到四个回归值,对框进行回归,表现在原图中,就是框框都往中心靠拢了,同时,我们还可以使用分类的网络对于每一个子窗进行分类。

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

 4.我们使用以下算法对框框进行融合,

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

 大致的思想就是:每一次取出IOU最差的两个box进行融合,如果结果不算很差,进行融合。得到了最终的结果:

OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks总结

五、检测任务

与之前类似,就是要引入背景类别,表示没有object的概率。对于负样本的选择则是通过选取一些有意义的区域作为负样本,原文如下:

Detection training is similar to classification training but in a spatial manner. Multiple location of
an image may be trained simultaneously. Since the model is convolutional, all weights are shared
among all locations. The main difference with the localization task, is the necessity to predict a
background class when no object is present. Traditionally, negative examples are initially taken at
random for training. Then the most offending negative errors are added to the training set in boot-
strapping passes. Independent bootstrapping passes render training complicated and risk potential
mismatches between the negative examples collection and training times. Additionally, the size of
bootstrapping passes needs to be tuned to make sure training does not overfit on a small set. To cir-
cumvent all these problems, we perform negative training on the fly, by selecting a few interesting
negative examples per image such as random ones or most offending ones. This approach is more
computationally expensive, but renders the procedure much simpler. And since the feature extraction
is initially trained with the classification task, the detection fine-tuning is not as long anyway.

其余与定位任务一致。

六、总结

总而言之,最关键的就是一种对于不同尺寸输入自适应的技术,与SPP不同,它是在feature map上面使用滑窗,最后用投票的方法来获得结果,这导致对于分类任务,它不能够进行反向传播,因为要进行投票,如果改成平均的话,那倒是可以进行反向传播,但是由于滑窗之间有重叠,这势必会对训练产生影响。对于检测任务,它好像也是一个固定的输入,只是在feature map上进行了一次滑窗,减少了计算量?不太灵活。