【CornerNet】《CornerNet: Detecting Objects as Paired Keypoints》

在这里插入图片描述
ECCV-2018


code pytorch:https://github.com/princeton-vl/CornerNet
跑自己的 dataset:CornerNet训练不完全指南



1 Background and Motivation

anchor-based(原文中是 anchor box) method 的 drawback 如下:

  • 需要大量的框,this creates a huge imbalance between positive and negative anchor boxes and slows down training
  • introduces many hyper-parameters and design choices(numbers,ratio,scale)去设计 anchor

作者提出 anchor-free 的方法,通过预测 top-left corner 和 bottom-right corner heat-map,配合 embedding vector(点 group 成框,同一框框的左上右下embedding distance is small),确定 bounding box。
在这里插入图片描述

作者 hypothesize two reasons why detecting corners would work better than bounding box centers or proposals.

  • 定位 centers 依赖于 4 sides,而 corner only with 2 sides,且 corner pooling 还引入了 prior knowledge about the definition of corners.
  • just need O ( w h ) O(wh) O(wh) corners to represent O ( w 2 h 2 ) O(w^2h^2) O(w2h2) (两个点组合起来)possible anchor boxes.

其实关于作者说的这两点,感觉理解起来不是那么通顺!!!

2 Advantages / Contributions

  • first to formulate the task of object detection as a task of detecting and grouping corners simultaneously
  • corner pooling

3 Method

在这里插入图片描述在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
从 resnet 的 bottleneck 改变而来
在这里插入图片描述
核心部分

  • Heatmaps(binary mask):预测左上和右下两个点,H×W×C(categories),也就是 class-specifically
  • Embeddings(1 dimension):embedding vector,group 点成框
  • Offsets:refine the bounding box,让 location 更准确
  • Corner Pooling

3.1 Backbone

采用的是 Hourglass Network,depth,104,堆了两个 hourglass,输入 511×511,输出 128×128,channel 变化(256,384,384,384,512),大致如下所示
在这里插入图片描述
图片来源:https://blog.csdn.net/u013841196/article/details/81048237

3.2 Corner Pooling

在这里插入图片描述
这个图可以看出,点可不是那么好 location 的哈,因为并不在 object 上(是不是间接反应了 bounding box 的局限性,哈哈哈),作者提出 corner pooling 来处理这个!

具体如下:
在这里插入图片描述
朝着箭头的方向,取max,然后相加
在这里插入图片描述
公式化表示如下
在这里插入图片描述
在这里插入图片描述

  • f t f_t ft f l f_l fl be the feature maps that are inputs to the top-left corner pooling layer
  • f t i j f_{t_{ij}} ftij f l i j f_{l_{ij}} flij f t f_t ft f l f_l fl 上 location ( i , j ) (i,j) (i,j) 对应的 vectors
  • t i j t_{ij} tij f t f_t ft ( i , j ) (i,j) (i,j) ( H , j ) (H,j) (H,j) max pooling 后的结果
  • l i j l_{ij} lij f l f_l fl ( i , j ) (i,j) (i,j) ( i , W ) (i,W) (i,W) max pooling 后的结果

bottom-right 如下右所示
在这里插入图片描述
实话说,这么做为什么能很好的捕抓到 corner,不是特别理解!!!

3.3 Loss

在这里插入图片描述
α \alpha α β \beta β 设置为 0.1, γ \gamma γ 设置为 1

1) L d e t L_{det} Ldet

detection 的分类 loss 是改进版的 focal loss,我们先来回顾下 focal loss,参考【Focal Loss】《Focal Loss for Dense Object Detection》
在这里插入图片描述
画重点,well-classified examples is down-weighted,也就是削减了简单样本的权重!

这篇论文作者的分类 loss 改进如下:
在这里插入图片描述

  • p c i j p_{cij} pcij is the score at location ( i , j ) (i,j) (i,j) for class c c c in the predicted heatmaps
  • y c i j y_{cij} ycij is ground truth heatmap augmented with the unnormalized Gaussian,这是什么意思呢?看下面的说明:

heatmap 是 binary mask,按道理哈,gt 也就两个点,一个框,其它都是 negative,作者给 gt 加了个 2D 高斯半径, σ = 1 / 3 \sigma = 1/3 σ=1/3,叫做 penalty reduction,预测的点正好对应 gt 的话(圆中心),penalty reduction y c i j y_{cij} ycij 最大, 1 − y c i j 1-y_{cij} 1ycij 也就是 penalty 最小,离 gt 越远(离圆心越远),penalty reduction y c i j y_{cij} ycij 越小, 1 − y c i j 1-y_{cij} 1ycij 越大。

在这里插入图片描述 在这里插入图片描述
为什么这么设计呢?请看下图
在这里插入图片描述
gt bounding box 是红色的框框,可以看出,gt corner 的一定范围内(橘色圆圈)group 的 bounding box 也和 gt bounding box 有很高的 IoU,所以作者才这么设计 loss!像是 cross entropy + focal loss,然后乘了个 penalty 系数 ( 1 − y c i j ) β (1-y_{cij})^{\beta} (1ycij)β.

注意这里的 y c i j = 1 y_{cij} = 1 ycij=1 不是一个点,而是上面的橘色圆圈内!作者圈圈大小的设计是保证与 GT 的 IoU at least 0.7

2) L p u l l L_{pull} Lpull and L p u s h L_{push} Lpush
拉近同一目标两个点的距离,拉远不同目标两个点的距离,类似于类内最小,类间最大(参考目标检测论文阅读:CornerNet 的解释)!!!
在这里插入图片描述

  • pull loss L p u l l L_{pull} Lpull to group the corner in the same object
  • push loss L p u s h L_{push} Lpush to separate the corner in the different object
  • N 是 corner 的数量
  • e t k e_{t_{k}} etk 是第 k k k 个 top-left corner 的 embedding(1 dimension)
  • e b k e_{b_{k}} ebk 是第 k k k 个 bottom-right corner 的 embedding(1 dimension)
  • e k e_k ek 是 the average of e t k e_{t_{k}} etk and e b k e_{b_{k}} ebk
  • Δ = 1 \Delta = 1 Δ=1

L p u s h L_{push} Lpush 采用的是 hinge loss,也即, e k e_k ek e j e_j ej 越接近,损失越大,越大越小(最小是0)
在这里插入图片描述

3) L o f f L_{off} Loff

这个 loss 是更加精确的定位的,gt 的 offset 如下,显然 x k n \frac{x_k}{n} nxk 才是更准确的,而 ⌊ x k n ⌋ \left \lfloor \frac{x_k}{n} \right \rfloor nxk 则是从原图 mapping 到 feature map 上的结果!
在这里插入图片描述
采用的是 smooth L1 loss,来学 offset
在这里插入图片描述
x k x_k xk and y k y_k yk are the x x x and y y y coordinate for corner k k k

4 Experiments

4.1 Datasets

MS COCO

  • train+val:135k
  • mini-val:5k
  • test-dev:20k

4.2 Ablation Study

1)Corner Pooling
with 和 without corner pooling
在这里插入图片描述
可以看出,中等目标和大目标的提升比较明显。
This is expected because the topmost, bottommost, leftmost, rightmost boundaries of medium and large objects are likely to be further away from the corner locations.

2)Reducing penalty to negative locations
在这里插入图片描述
we see that the penalty reduction especially benefits medium and large objects.

3)Error Analysis

这个实验好骚
在这里插入图片描述
把 heatmaps 替换成 gt,把 heatmaps 和 offsets 都替换成 gt!效果太……恐怖!!!说明 heatmaps 和 offsets 还有很大的提升空间!

4.3 Comparisons with state-of-the-art detectors

在这里插入图片描述
Cascade RCNN 挺猛的哈,还有 SNIP

在这里插入图片描述
demo,top-left,bottom-right

5 Conclusion(owns)

  • backbone 有缘的话画个草图出来,看下 hourglass 的论文
  • 可以研究下 embedding,以及学习下人体姿态检测那里边的 group 点的现状
  • corner pooling 如何理解呢?

下面节选一些看到不错的博客!

作者:Makalo.W
来源:CSDN
原文:https://blog.csdn.net/weixin_43688730/article/details/84034604
版权声明:本文为博主原创文章,转载请附上博文链接!

Corner Pooling 的作用:作者在论文里面说,由于预测的那两个点,并不是在‘’内容‘’上面,而是在‘’内容‘’旁边,例如下图,橘色的点并不是打在人物身上,而是打在了人物旁边,但是这个地方所提供的信息并没有作用,而真正有作用的是人物,所以需要通过corner pool的方式将人物上的信息,转移到旁边来,以便模型在预测点的时候能更准确。
在这里插入图片描述


ECCV-2018最佼佼者的目标检测算法
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值