Skip to main content
. 2022 Dec 30;10(1):47. doi: 10.3390/bioengineering10010047
Algorithm 1 The polygon-based PA-NMS algorithm
Input:B=[p1,pn],S=[s1,sn],D=[d1,dn],Nt
B is the list of initial polygon boxes
S is the list containing corresponding detection scores
D is the list of corresponding detection densities
Nt is the initial threshold
F=[]
while B!=[]:
       m argmax(S)
       M=B[m]
       NM = max (Nt,dM)
       F.append(M)
       B.remove(M)
       for p in B:
              if polygon_IoU (M,p)>=NM
                  B. remove(p)
                  S. remove(s)
return F,S