|
Algorithm 1 An overiew of the algorithm in pseudocode |
Input:
-
1:
L is the number of feature pyramid levels;
-
2:
S is the size interval for different feature pyramid levels;
-
3:
t is the threshold for classification;
Output:
-
4:
for each level
do
-
5:
ground-truth
g is assigned to this level if the size of g is in S:
-
6:
positive samples: the locations in g;
-
7:
negative samples: the locations beyond g;
-
8:
the output classification and ratio-center multiply corresponding positions:
-
9:
class score = classification * ratio-center;
-
10:
the output w-h regression and ratio regression (l_ratio, t_ratio) generate the box b:
-
11:
left = w *l_ratio; right = w – left; top = h*t_ratio; bottom = h – top;
-
12:
end for
-
13:
If train:
-
14:
compute the IoU loss and classification loss to update the weights of the network;
-
15:
If test:
-
16:
choose boxes with class score > t for the output.
|