Quadrilateral bounding-box regression
It is very similar to axis align bounding box(AABB) regression, we only note about the different part.
Basics
input
{ P i , G i } i = 1 , 2 , … , N \{P^i, G^i\}_{i=1,2,\dots,N} {Pi,Gi}i=1,2,…,N
where
P
i
=
(
P
x
1
i
,
P
y
1
i
,
…
P
x
4
i
,
P
y
4
i
,
)
P^i=(P^i_{x1},P^i_{y1},\dots P^i_{x4},P^i_{y4},)
Pi=(Px1i,Py1i,…Px4i,Py4i,) specifies the 8 pixel coordinates of the 4 point of quadrilateral proposal
P
i
P^i
Pi’s bounding box.
Hence forth, we drop the superscript i unless it is needed.
Each ground-truth bounding box
G
G
G is specified in the same way:
G
=
(
G
x
1
,
G
y
1
,
…
G
x
4
,
G
x
4
)
G=(G_{x1},G_{y1},\dots G_{x4},G_{x4})
G=(Gx1,Gy1,…Gx4,Gx4)
model
G x j ^ = P w d x j ( P ) + P x j G y j ^ = P h d y j ( P ) + P y j \begin{aligned} \hat{G_{xj}} &= P_wd_{xj}(P) + P_{xj} \\ \hat{G_{yj}} &= P_hd_{yj}(P) + P_{yj} \\ \end{aligned} Gxj^Gyj^=Pwdxj(P)+Pxj=Phdyj(P)+Pyj
where $j \in {1, 2, 3, 4} $, P w , P h P_w, P_h Pw,Ph分别是 P P P的外接轴对齐矩形(AABB)的宽和高.
loss
L ∗ j i = L ( t ∗ j i − d ∗ j ( P i ) ) L^i_{*j} = L(t^i_{*j} - d_{*j}(P^i)) L∗ji=L(t∗ji−d∗j(Pi))
where
∗
∈
x
,
y
* \in {x, y}
∗∈x,y ,
t
x
j
=
(
G
x
j
−
P
x
j
)
/
P
w
t
y
j
=
(
G
y
j
−
P
y
j
)
/
P
h
d
x
j
=
(
G
x
j
^
−
P
x
j
)
/
P
w
d
y
j
=
(
G
y
j
^
−
P
y
j
)
/
P
h
\begin{aligned} t_{xj} &=(G_{xj}-P_{xj})/P_w \\ t_{yj} &=(G_{yj}-P_{yj})/P_h \\ d_{xj} &=(\hat{G_{xj}}-P_{xj})/P_w \\ d_{yj} &=(\hat{G_{yj}}-P_{yj})/P_h \\ \end{aligned}
txjtyjdxjdyj=(Gxj−Pxj)/Pw=(Gyj−Pyj)/Ph=(Gxj^−Pxj)/Pw=(Gyj^−Pyj)/Ph
定位点的有序性
定位点的有序性(以下简称有序性)是指G的四个点的顺序与P的四个点的顺序存在方位上的对应关系。
有序性从理论上是有利于回归的,因为对于我们的物体特点,P与G的点有明显的对应性,且回归的距离更近。否则的话,应该会影响回归模型收敛,而且可能使学习到的回归模型预测结果有很多不是四边形。
一般来说,P的点的顺序是程序确定的,我们只要保证G的点的顺序与P一致就行(比如左下,右下,右上,左上),这一点可以通过四边形标注时要求四个点的顺序来实现。
另外,DMPNet中提出了一种四边形点的排序算法。