当前位置:网站首页>目标检测中的损失函数与正负样本分配:RetinaNet与Focal loss
目标检测中的损失函数与正负样本分配:RetinaNet与Focal loss
2022-07-07 00:26:00 【cartes1us】
RetinaNet
在目标检测领域,单阶段算法精度第一次超过双阶段,就是RetinaNet。
网络结构:
作者设计的网络结构没有太大创新,文中是这样说的:
The design of our RetinaNet detector shares many similarities with
previous dense detectors, in particular the concept of ‘anchors’
introduced by RPN [3] and use of features pyramids as in SSD [9] and
FPN [4]. We emphasize that our simple detector achieves top results
not based on innovations in network design but due to our novel loss.
检测头是分类与BBox回归解耦的,并且是基于锚框的,经过FPN后输出五层不同尺度的特征图,每层分别对应32~512尺度的锚框,并且每层根据scale和ratios的不同组合有9种锚框,最终整个网络的锚框尺寸是32 ~ 813之间。使用网络预测的相对锚框的偏移量来计算BBox的方法与Faster R-CNN相同。下图是霹雳吧啦的图。
论文中的结构图如下,只示意了由FPN引出的三种尺度的特征图,W,H,K,A分别代表特征图宽,高,分类数量(不包含背景类),锚框数量(9)。 
正负样本匹配
正样本:预测的BBox 与gt IoU>=0.5,
负样本:预测的BBox 与gt IoU<0.4,
其他样本舍弃
前景,背景数量不平衡问题
CE损失的变种
本作的最大创新:Focal loss,改写经典的交叉熵损失,应用在class subnet分支,使易分类样本的损失的权重极大降低,形式很优美。论文中 γ \gamma γ推荐取2,若 γ \gamma γ取0,则FL就退化为了CE。
损失:

第一项分类损失中是计算所有样本(包括正负)的Focal loss,然后除去正样本数量 N p o s N_{pos} Npos。BBox回归损失是Fast R-CNN中提出的smooth L1 loss。
未完待续
边栏推荐
- Wechat applet Bluetooth connects hardware devices and communicates. Applet Bluetooth automatically reconnects due to abnormal distance. JS realizes CRC check bit
- In memory, I moved from CSDN to blog park!
- Sidecar mode
- MySQL-CentOS7通过YUM安装MySQL
- 产业金融3.0:“疏通血管”的金融科技
- Explication contextuelle du langage Go
- bat 批示处理详解
- Go language context explanation
- Five core elements of architecture design
- SAP webservice 测试出现404 Not found Service cannot be reached
猜你喜欢

Lombok plug-in

How digitalization affects workflow automation

Web architecture design process

Randomly generate session_ id

分布式事务解决方案之TCC

SAP ABAP BDC (batch data communication) -018

Pinduoduo product details interface, pinduoduo product basic information, pinduoduo product attribute interface

Digital innovation driven guide

分布式事务解决方案之2PC

JVM the truth you need to know
随机推荐
线性回归
ForkJoin最全详解(从原理设计到使用图解)
Unity keeps the camera behind and above the player
Explication contextuelle du langage Go
2pc of distributed transaction solution
Taobao Commodity details page API interface, Taobao Commodity List API interface, Taobao Commodity sales API interface, Taobao app details API interface, Taobao details API interface
Wechat applet Bluetooth connects hardware devices and communicates. Applet Bluetooth automatically reconnects due to abnormal distance. JS realizes CRC check bit
Simple case of SSM framework
[PM products] what is cognitive load? How to adjust cognitive load reasonably?
Introduction to distributed transactions
SQLSTATE[HY000][1130] Host ‘host. docker. internal‘ is not allowed to connect to this MySQL server
make makefile cmake qmake都是什么,有什么区别?
力扣102题:二叉树的层序遍历
High voltage leakage relay bld-20
Cve-2021-3156 vulnerability recurrence notes
The 2022 China low / no code Market Research and model selection evaluation report was released
产业金融3.0:“疏通血管”的金融科技
[论文阅读] A Multi-branch Hybrid Transformer Network for Corneal Endothelial Cell Segmentation
得物客服一站式工作台卡顿优化之路
Go 語言的 Context 詳解