titile | Gradient Harmonized Single-stage Detector |
---|---|
url | https://arxiv.org/pdf/1811.05181.pdf |
动机 | single-stage相比于two-stage更优雅,但存在正负样本间数量差异和easy、hard examples之间的矛盾 |
内容 |
GHM: 从梯度的角度解决正负样本间数量差异和easy、hard examples之间的矛盾。 传统方法: 1、OHEM:直接放弃大量examples,训练效率较低。 2、Focal loss: 存在两个超参需要设置,不能随训练数据的变化动态调整。 (1) easy examples较多,可能淹没少数hard examples贡献,训练效率低。 (2) 非常大的梯度范数examples(非常困难)密度略大于medium examples。视为outliers,outliers在模型收敛时也稳定存在。可能影响模型的稳定性。 3、右图: (1) 受梯度分布启发提出GHM (2) GHM训练easy examples和outliers产生的累积梯度权重均会降低。 (3) exampls贡献平衡,训练有效且稳定。 贡献: 整个过程分为四步:rescaling, integrating, refining and strengthening,将多层语义信息进行整合。 1、提出single-stage样本失衡的原理:gradient norm分布,提出GHM。 2、分类和回归损失为GHM-C和GHM-R(根据分布动态调整),证明gradient contribution of examples with different attributes,对超参鲁棒。 3、加入GHM,得到state-of-the-art。 Gradient Harmonizing Mechanism: Problem Description: Gradient Density: GHM-C Loss: Unit Region Approximation: Complexity Analysis: 1、naive algorithm计算所有样本的gradient density复杂度:O(N2),并行计算,每个计算单元仍有N。 2、best algorithm先按梯度范数对样本排序,复杂度O(NlogN),然后队列扫描样本,O(N)得到密度。这种排序在并行计算中不能收益。 3、single-stage N较大,直接计算比较耗时。通过另一种方法近似L1 smooth通过拐点来区别outlier和inlier。 Unit Region: EMA: momentum:smooth,避免mini-batch中的极限值。 GHM-R Loss: 更改loss,如依赖|d|计算loss,由于可以取无限大,无法应用unit region原理。 新loss定义如下: 所以位置的梯度均存在且连续(L1 smooth 拐点处不存在) up-weighting the important part of easy examples and down-weighting the outliers |
实验 |
Implementation Details: RetinaNet:ResNet backbone with FPN。 Anchors:3 scales,3 aspect ratios。SGD 8 GPUs(2 images on each GPU),14 epochs initial learning rate 0.01,9th epoch和12th epoch学习率乘0.1, weight decay 0.0001,momentum 0.9, EMA α = 0.75。 GHM-C Loss: all adopt smooth L1 loss function with δ = 1/9 for the box regression branch Baseline:Average Precision (AP) of 28.6 Number of Unit Region: 实验均不采用EMA。 M太小,密度在不同梯度范数上不能很好的变化,性能不是很好。 GHM-R Loss: Comparison with Other Losses: Main Results: |
思考 |
GHM
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 准备:如果不太了解网络的朋友可以先看一下我之前写的文章 需要了解的网络协议 。 想必大家再做即时通讯业务或需要替代...