Skip to main content
. 2021 Mar 1;21(5):1672. doi: 10.3390/s21051672
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 i[1,L] do

  • 5:

        ground-truth g is assigned to this level if the size of g is in Si:

  • 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 = wleft;    top = h*t_ratio;    bottom = htop;

  • 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.