CornerNet

作者: 小松qxs | 来源:发表于2018-12-09 21:03 被阅读0次
    titile CornerNet: Detecting Objects as Paired Keypoints
    url https://arxiv.org/pdf/1808.01244.pdf
    动机 当前one-stage和two-stage的目标检测state-of-the-art方法都是基于anchor,弊端:(1)大量的anchor框,正负样本不均衡,减慢训练速度。(2)需要超参和设计(多少anchor,尺寸,比例)
    内容 CornerNet: 受人姿估计启发,one-stage方法,通过检测一对keypoints时间检测框

    特点:(1)一个卷积神经网路预测top-left corner,一个预测bottom-right corner,称为heatmap
    (2)embedding,负责检测哪个top-left corner和哪个bottom-right corner是一对,组成一个box,同一个box的corner距离短。
    (3)offset:为了获得tighter bounding box,调整corner位置。
    (4)corner pooling:更好的定位corner(一个corner定位不能只依靠局部信息),检测top-left,有两组feature map,相同像素点,pooling值一个是该像素水平向右的最大值,一个是垂直向下的最大值,之后两组feature map求和。
    (5)hourglass结构+Focal loss 更好训练 优势:(1)更易实现:corner定位需要两个边,box中心的确定需要四个边。
    (2)表示box空间更efficient:O(wh)顶点表示 O(w2h2)anchor box。
    比DeNet优势:(1)DeNet不判断两个corner是不是一个box,而是枚举所有可能产生ROI,通过子检测网络拒绝poor ROI,two-stage过程;CornerNet one-stage
    (2)DeNet selects features at manually determined locations relative to a region for classification;CornerNet没有feature selection的步骤。
    (3)ConerNet:corner pooling。
    Detecting Corner:
    两组heatmap,一组预测top-left corner,一组bottom-right corner,每个heatmap C channel代表C类(无背景),尺寸是W*H,每个channel是一个binary mask。
    每个corner只有ground-truth处为positive,其他为negtive,因为在ground-truth附近的负样本也可以得到overlap较大的box,满足要求。因此,权重不是相等的,而是在以ground-truth为中心圆内呈非归一化高斯分布。 圆半径确定:在圆内的点形成的box与ground-truth的IoU不小于t(t=0.7) focal loss: offset:
    从heatmap层回到input image会有精度损失(不一定整除存在取整),对小目标影响大,因此预测location offset,调整corner位置。(channel=2) Grouping Corner:
    参考Associative Emdedding method,top-left和bottom-right corner各预测一个embedding vector,距离小的corner构成一个box(一个图多个目标,多对点,因此确定group是必要的,channel=1) Corner Pooling:
    corner pooling通过编码明确的先验知识更好定位corner。 corner pooling层用来预测heatmap,embedding,offset。
    预测模块结构如下图(修改版的残差模块):
    backbone输出经过3*3卷积,128channel,经过corner pooling和residual模块,经过3*3的Conv-BN 256channel,shortcut模块,经过3*3卷积,256channel,在经过3 Conv-RELU-Conv。 Hourglass Network:
    CornerNet的backbone是Hourglass Network,由一个或多个Hourglass模块组成。
    Hourglass模块:
    (1)卷积+max pooling进行下采样
    (2)上采样+卷积恢复到原尺度,max pooling有信息丢失,将之前相同尺度的feature与现在相加,residual。
    (3)模块有全局和局部特征
    多个模块连接可以得到更高维信息。
    CornerNet使用的Hourglass Network(两个hourglass,修改如下):

    (1) Instead of using max pooling, we simply use stride 2 to reduce feature resolution.
    (2)减小feature 5 次,channel增大(256, 384, 384, 384, 512)。
    (3)上采用feature, 2 residual modules followed by a nearest neighbor upsampling.
    (4) Every skip connection also consists of 2 residual modules.
    (5) There are 4 residual modules with 512 channels in the middle of an hourglass module.
    (6) hourglass模块之前,reduce the image resolution by 4 times using a 7 × 7 convolution module with stride 2 and 128 channels followed by a residual block with stride 2 and 256 channels.
    (7) add intermediate supervision in training,预测是没有,因为效果不好。
    (8) apply a 3 × 3 Conv-BN module to both the input and output of the first hourglass module. then merge them by element-wise addition followed by a ReLU and a residual block with 256 channels, which is then used as the input to the second hourglass module.
    (9) hourglass network一共104层。仅用最后一层预测。

    训练:
    网络采用随机初始化,输入尺寸511*511,输出128*128。传统的数据增广方式(random horizontal flipping, random scaling, random cropping and random color jittering, which includes adjusting the brightness, saturation and contrast of an image.)。
    使用focal loss,set the biases in the convolution layers that predict the corner heatmaps. 测试:(1)
    在heatmap层后接3*3的max pooling层进行非极大值抑制(NMS)。
    (2)取top 100的top-left和bottom-right corner。
    (3) corner位置根据offset调整。
    (4) embedding L1距离,距离大于0.5或非同类别被剔除。
    (5) top-left和bottom-right corner的平均score作为检测的score。
    (6) 输入图不resize,保持原始分辨率,pad it with 0
    (7)原始图像和fliped图像均测试,结合两个的结果,通过soft-nms抑制冗余检测,最多检测100个目标。
    (8)平均测试速度单张图片244ms, Titan X (PASCAL) GPU。
    实验 MS COCO:
    Corner Pooling: Reducing penalty to negative locations: Error Analysis:
    瓶颈:detecting corner
    heatmap:漏检corner,则检测不出box。
    embeding:匹配错corner则box错。
    offset:tight box。 Comparisons with state-of-the-art detectors:
    思考 一种新的检测方法,速度244ms仍比较慢,受限于Hourglass网络特征提取
    扩展 soft-nms:(http://cn.arxiv.org/pdf/1704.04503v2)
    NMS贪心式方法存在问题:
    (1)当两个目标框接近时,分数更低的框就会因为与之重叠面积过大而被删掉。
    (2)NMS的阈值也不容易确定,设小了漏检,设置过高容易增大误检。
    思路:
    不直接删除所有IOU大于阈值的框,而是降低其置信度。 两种减置信度方法:(1)线性加权: (2)高斯加权:
    Focal loss:(https://arxiv.org/pdf/1708.02002.pdf)
    Focal loss主要是为了解决one-stage目标检测中正负样本比例严重失衡的问题。该损失函数降低了大量简单负样本在训练中所占的权重 参考

    相关文章

      网友评论

          本文标题:CornerNet

          本文链接:https://www.haomeiwen.com/subject/wdqiqqtx.html