soft-nms 与 nms 实现

soft-nms 与 nms


1. nms

nms流程:

  • 遍历所有的box
    • 找到置信度(score)最大的box
    • 遍历剩下的box
      • 如果其iou > 阈值 ——> 删除该框

2. soft-nms

soft-nms流程:

  • 遍历所有的box
    • 找到置信度(score)最大的box
    • 遍历剩下的box
      • 如果其iou > 阈值 ——> 降低置信度
  1. 降低置信度实现
    1. 线性:
      f ( x ) = { s i = s i , i o u ( B m a x , B i ) < t h r e s i = s i ∗ ( 1 − i o u ( B m a x , B i ) ) , i o u ( B m a x , B i ) ≥ t h r e f(x)=\left\{ \begin{aligned} s_i = s_i&, iou(B_{max},B_i) < thre \\ s_i = s_i*(1 - iou(B_{max},B_i))&, iou(B_{max},B_i) \ge thre \end{aligned} \right. f(x)={si=sisi=si(1iou(Bmax,Bi)),iou(Bmax,Bi)<thre,iou(Bmax,Bi)thre
    1. 高斯加权

s i = s i e − i o u ( B m a x , B i ) 2 σ s_i = s_i e ^{-\frac{iou(B_{max},B_i)^2}{\sigma}} si=sieσiou(Bmax,Bi)2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值