論文基本資訊
- 標題: Libra R-CNN: Towards Balanced Learning for Object Detection
- 作者: JiangmiaoPang, Kai Chen, Jianping Shi, Huajun Feng, Wanli Ouyang, Dahua Lin
- 機構: Zhejiang University, The Chinese University of Hong Kong, SenseTime Research, The
University of Sydney - 來源: CVPR2019
- 時間: 2019/04/04
- 鏈接: https://arxiv.org/abs/1904.02701
- 代碼: https://github.com/open-mmlab/mmdetection(official code) https://github.com/OceanPang/Libra_R-CNN
背景/問題
當前多數detector(one-stage和two-stage)的training 模式:
- sampling regions
- extracting features from regions
- 基于multi-task objective function同時識別category和細化location
training paradigm中的3個key aspect
- selected region samples是否representative
- extracted visual features是否被充分利?
- designed objective function是否最優

如上圖所?,訓練程序中存在3種影響性能的imbalance,(分別對應3個key aspect) - sample level
motivation:hard example可以有效提?detector的性能,但隨機采樣得到的example通常以
easy example為主,
--------已有方法及其問題:
OHEM:通過置信度(confidence)選擇hard sample,但其對noise label很敏感,并會產
?較?的記憶體占?和計算成本
Focal loss:解決One-stage演算法中的foreground-background class imbalance,僅適?于
One-stage detector,對RCNN作?不?,因為?量easy negative都被two-stage procedure
過濾掉了 - feature level
motivation:高解析度的低層特征圖回歸精度會很高但是很難做分類,高層的語意資訊分類精度很高但只適合檢測大目標,同時利??絡淺/深層的descriptive information和semantic information有助于
OD,那最優的integrate這2種information的?式是什么呢?
--------已有方法及其問題:
FPN、PANet,兩者采取的sequential manner使得integrated features更多地關注于相鄰層,?較少關注其它層,每次fusion時?相鄰層中的semantic information就會稀釋1次, - objective level
motivation:
①訓練程序中,easy sample產?的small gradient可能會被hard example產?的large
gradient壓倒,進?影響模型性能
②detection包括classification和localization這2個任務,如果沒有得到適當的平衡,則其中1
個任務可能會受到影響,進?影響整體性能
方法/研究內容
提出3個component分別減少上述3種level的imbalance
- IoU-balanced sampling:根據sample與其被分配到的GT的IoU,來挖掘hard example
- balanced feature pyramid:一個特征金字塔的變種,同時將所有level(?不僅是相鄰level)的feature聚合,并?其增強各個level
- balanced L1 loss:outlier梯度較??inlier梯度較?,因此對outlier(回歸error?于等于1的
sample)產?的large gradient進?clip(使gradient最?為1),對inlier(回歸error?于1的
sample,accurate sample)的gradient進?加強,使得classification、overall localization和
accurate localization得到平衡
性能/效果
- COCO上,AP?FPN Faster RCNN?2.5個point,?RetinaNet?2個point
- 基于FPN Faster RCNN、detectron中的1× schedule,backbone使?ResNet-50、ResNeXt-101-
64x4d時,AP分別為38.7和43.0
演算法細分

IoU-balanced Sampling
- hard negative:?標檢測中,我們已知GT BBox,演算法會?成?系列proposal,其中有些proposal和GT BBox重合程度?、有些和GT BBox重合程度低,與GT BBox重合程度(IoU)超過?定閾值(通常0.5)的proposal則被認定為positive eaxmple,重合程度低于該閾值的則是negative example,然后將
positive example和negative example扔進?絡中訓練,然?,?個問題是positive example的數量遠遠少于negative example,這樣訓練出來的分類器的效果總是有限的,會出現許多false positive,其中得分較?的false positive就是所謂的hard negative example,比如置信度為0.9的誤檢, - 目的:hard negative example是主要的problem,我們希望能多采樣?些hard negative,

- 隨機采樣:

①觀察橙柱可以看出,在hard negative example中,有60%多的example與其對應GT BBox的
overlap超過0.05
②觀察藍柱可以看出,隨機采樣得到的training sample中,僅有30%多的example與其對應GT
BBox的overlap超過0.05,
③隨機采樣得到的training sample的分布和hard negative example的真實分布是不同的,使得上千
個easy example才有1個hard example, - IoU-balanced sampling:

如圖3綠柱所?,IoU-balanced sampling使得training sample的分布較接近于hard negative example的真實分布,K默認為3,同時實驗證明,只要IoU更?的negative sample更易被選擇,則性能對K值的變化并不敏感 - 如何處理positive example:
IoU-balanced sampling其實也適?于hard positive example,但現實中往往沒有?夠的sampling
candidate能將IoU-balanced sampling擴展到hard positive example,因此本?為每個GT BBox采樣
等量的positive sample,來作為1種替代?法, - Balanced Feature Pyramid 核心思路:同時將所有level的feature聚合并?其增強各個level

①Integrate:

1 ?先通過interpolation和max pooling將各個level的feature縮放?C4的size
2 然后將各level的feature的平均值作為integrated feature
②refine:
1 使?Non-local neural networks??中的embedded Gaussian non-local attention對integrated feature進?refine
2 然后使?interpolation和max pooling將integrated feature逆向變換?各level的scale得到與FPN
相同的輸出
3 Balanced Feature Pyramid可以和FPN、PAFPN(PANet)是兼容的
- Balanced L1 Loss:
smooth L1 loss:smoth L1 loss是1個location loss,來?于Fast RCNN:

問題在于:outlier(可視為hard example)的gradient較?,?inlier(可視為easy example)的
gradient較?,
具體分析如下:
error?于等于1的sample稱為outlier,error?于1的sample稱為inlier
由于unbounded regression targets,直接提?localization loss的權重會使模型對outlier更加敏感
這些outlier,可以看作是hard example,會產?過?的梯度,對訓練程序有害
與outlier相?,inlier可以看作是easy example,對整體梯度的貢獻很?
更具體地說,與outlier相?,inlier平均對每個sample僅貢獻30%的梯度
balanced L1 loss的效果:

balanced L1 loss的核?思路:
outlier梯度較??inlier梯度較?,因此對outlier(error?于等于1的sample)產?的large gradient
進?clip(使gradient最?為1,如圖5(a)虛線),對inlier(error?于1的sample,accurate
sample)的gradient進?加強,使得classification、overall localization和accurate localization得
到平衡,
使?balanced L1 loss的location loss:

x、y、w、h的balanced L1 loss之和,即x的balanced L1 loss+y的balanced L1 loss+······
由上式5可知,location loss關于模型引數的梯度正?于balanced L1 loss關于x(或y、w、h)的梯
度,即:

balanced L1 loss的梯度設計:

引數 α 控制inlier的gradient, α 越?則inlier的gradient就越?;
引數 γ 控制regression error的上界,可以使得classification和localization這2個task達到平衡;
引數 b ?來處理 x = 1 的情況,
balanced L1 loss的定義:

實驗:




轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/304547.html
標籤:區塊鏈
