Skip to main content
. 2021 Feb 3;21(4):1033. doi: 10.3390/s21041033
Algorithm 1 Decode the output of the detection model
Input:
The output of dectection model,
Tensor=t1,,t200,tiR6;
Output:
   All bounding boxes B=b1,,b200,biR4;
   And the corresponding score S=si,,s200, siR1;
1:  function Decode outputTensor
2:  for i0,200 do
3:    xa,ya,ha,wa are priori boxes attr*/
4:    xt,yt,wt,ht,bscore,pscoreti;
5:    xcp =xt×wai+xai;
6:    ycp=yt×i+xai;
7:    hp=hai×eht;
8:    wp=wai×ewt;
9:    xmin=xcpwp/2; 
10:    xmax=xcp+wp/2;
11:    ymin=ycphp/2;
12:    ymax=ycp+hp/2;
13:    bi=xmin,ymin,xmax,ymax:
14:    si=pscore
15:    end for
16:  return B,S
17:  end function