今天和大家分享一篇ECCV2020中的目标检测论文。

在这里插入图片描述

论文名称:Corner Proposal Network for Anchor-free,Two-stage Object Detection

论文下载地址:https://arxiv.org/abs/2007.13816

源码下载地址:https://github.com/Duankaiwen/CPNDet

动机

作者通过实验表明,Anchor-free的目标检测器对于尺寸变化大、长宽比变化大的目标有很好的检测效果,但是Anchor-free的检测器有缺陷:由于keypoint的分组问题而出现很多false positive结果,从而降低检测器性能。因此,作者借鉴二阶段检测器的方法,意图在Anchor-free检测器后面增加分类器,滤除false positive结果。

Corner Proposal Network(CPN)

作者提出了Corner Proposal Network(CPN),利用Anchor-free的优势,并借鉴了二阶段检测器的方法滤除false positive。

CPN的结构如下图所示:

在这里插入图片描述

CPN包括两部分,其一为Anchor-free Proposals with Corner Keypoints,其二为Two-step Classification for Filtering Proposals。下面分别介绍:

(1)Anchor-free Proposals with Corner Keypoints

参考CornetNet中的方法,使用左上角点和右下角点这2个keypoint定位一个目标。在设计网络时,为每个类别分配2个heatmap,分别用来检测当前类别目标的左上角和右下角,heatmap的值为对应位置存在角点的置信度。相比原图,heatmap的分辨率为 4 × 4 \times 4×reduced。

接下来对keypoint中的proposal进行粗筛选:左上角点和右下角点必须属于同一类别,左上角点的坐标要小于右下角点的坐标。

经过筛选后的proposal仍然存在大量的false positive,需经过后面的步骤进行进一步筛选和分类。

(2)Two-step Classification for Filtering Proposals

使用“light-weighted binary classifier+fine-level classifier”2个步骤完成proposal的筛选和分类工作,以减少计算量。

light-weighted binary classifier

训练一个二分类器来判断proposal是否存在目标。在这个过程中,使用尺寸为 7 × 7 7 \times 7 7×7的RoIAlign从上图中的box feature map中抽取特征,然后构造分类器完成该proposal的二分类任务。

损失函数为:

L prop = − 1 N ∑ m = 1 M { ( 1 − p m ) α log ⁡ ( p m ) ,  if  I o U m ⩾ τ p m α log ⁡ ( 1 − p m ) ,  otherwise  \mathcal{L}_{\text {prop}}=-\frac{1}{N} \sum_{m=1}^{M}\left\{\begin{array}{ll} \left(1-p_{m}\right)^{\alpha} \log \left(p_{m}\right), & \text { if } {IoU}_{m} \geqslant \tau \\ p_{m}^{\alpha} \log \left(1-p_{m}\right), & \text { otherwise } \end{array}\right. Lprop=N1m=1M{(1pm)αlog(pm),pmαlog(1pm), if IoUmτ otherwise 

上式中的 p m p_m pm表示第m个proposal的得分, p m ∈ [ 0 , 1 ] p_{m} \in[0,1] pm[0,1] I O U m IOU_m IOUm表示第m个proposal和所有ground truth框的最大IoU, τ \tau τ取0.7, α \alpha α取2, N N N是正样本数量, M M M是proposal总数。

fine-level classifier

尽管在得到keypoint时已经得到了proposal的类别,为了保证精度,对于上一步筛选得到的proposal进行再一次分类。使用RoiAlign从上图中的Category feature map中提取 7 × 7 7 \times 7 7×7的特征用于分类,损失函数为:

L class  = − 1 N ^ ∑ m = 1 M ^ ∑ c = 1 C { ( 1 − q m , c ) β log ⁡ ( q m , c ) ,  if  IoU ⁡ m , c ⩾ τ q m , c β log ⁡ ( 1 − q m , c ) ,  otherwise  \mathcal{L}_{\text {class }}=-\frac{1}{\hat{N}} \sum_{m=1}^{\hat{M}} \sum_{c=1}^{C}\left\{\begin{array}{ll} \left(1-q_{m, c}\right)^{\beta} \log \left(q_{m, c}\right), & \text { if } \operatorname{IoU}_{m, c} \geqslant \tau \\ q_{m, c}^{\beta} \log \left(1-q_{m, c}\right), & \text { otherwise } \end{array}\right. Lclass =N^1m=1M^c=1C{(1qm,c)βlog(qm,c),qm,cβlog(1qm,c), if IoUm,cτ otherwise 

上式中的 M ^ \hat{M} M^表示筛选后的proposal总数, N ^ \hat{N} N^表示正样本数量, C C C为类别总数, I o U m , c IoU_{m,c} IoUm,c表示第 m m m个proposal和第 c c c类中所有ground truth的最大IoU, τ = 0.7 \tau=0.7 τ=0.7 β = 2 \beta=2 β=2 q m , c q_{m, c} qm,c是第 m m m个proposal为第 c c c类的得分。

总的损失函数为:

L = L d e t corner  + L offset  corner  + L prop  + L class  \mathcal{L}=\mathcal{L}_{\mathrm{det}}^{\text {corner }}+\mathcal{L}_{\text {offset }}^{\text {corner }}+\mathcal{L}_{\text {prop }}+\mathcal{L}_{\text {class }} L=Ldetcorner +Loffset corner +Lprop +Lclass 

实验结果

CPN的结果如下图所示:

在这里插入图片描述

虽然CPN为二阶段检测器,得益于高效的第二阶段,仍然有着比较高的FPS,如下图所示:

在这里插入图片描述
如果你对计算机视觉中的目标检测、跟踪、分割和轻量化神经网络感兴趣,欢迎关注公众号一起学习~
在这里插入图片描述

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐