View full-text article in PMC Sensors (Basel). 2021 Feb 3;21(4):1033. doi: 10.3390/s21041033 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 Decode the output of the detection model Input: The output of dectection model, Tensor=t1,…,t200,ti∈R6; Output: All bounding boxes B=b1,…,b200,bi∈R4; And the corresponding score S=si,…,s200, si∈R1; 1: function Decode outputTensor 2: for i∈0,200 do 3: xa,ya,ha,wa are priori boxes attr*/ 4: xt,yt,wt,ht,bscore,pscore←ti; 5: xcp =xt×wai+xai; 6: ycp=yt×i+xai; 7: hp=hai×eht; 8: wp=wai×ewt; 9: xmin=xcp−wp/2; 10: xmax=xcp+wp/2; 11: ymin=ycp−hp/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