目录
一、focal loss:
p t = { p if y=1 1 − p o t h e r w i s e , α t = { α y = 1 1 − α y = − 1 p_t=\begin{cases} p & \text{if y=1} \\ 1-p & otherwise, \end{cases}\\ \alpha_t=\begin{cases} \alpha & y=1 \\ 1-\alpha & y=-1 \end{cases}\\ pt={
p1−pif y=1otherwise,αt={
α1−αy=1y=−1
平衡正负例:
C E ( p t ) = − α t log p t CE(p_t)=-\alpha_t\log{p_t} CE(pt)=−αtlogpt
平衡难易例:
F L ( p t ) = − ( 1 − p t ) γ log p t FL(p_t)=-(1-p_t)^\gamma \log{p_t} FL(pt)=−(1−pt)γlogpt
总体公式:
F L ( p t ) = − α t ( 1 − p t ) γ log p t FL(p_t)=-\alpha_t(1-p_t)^\gamma \log{p_t} FL(pt)=−αt(1−pt)γlogpt
(论文中 γ = 2 , α = 0.25 \gamma=2, \alpha=0.25 γ=2,α=0.25效果最好)
二、bounding box regression
b x = σ ( t x ) + c x b y = σ ( t y ) + c y b w = p w e t w b h = p h e t h b_x=\sigma(t_x)+c_x \\ b_y=\sigma(t_y)+c_y \\ b_w=p_w e^{t_w} \\ b_h=p_h e^{t_h} bx=σ(tx)+cxby=σ(ty)+cybw=pwetwbh