Skip to main content
. 2023 Nov 2;23(21):8913. doi: 10.3390/s23218913
Algorithm 1 Soft-NMS method.
 Input: B={b1,⋯,bN},C={c1,⋯,cN},Tnms
B is a list of the initial detection boxes
C contains a list of corresponding detection scores
Tnms relates to is the NMS threshold
 Output: Final detection Bounding box list S
  • 1:

    function SOFT_NMS

  • 2:

    while B≠empty do

  • 3:

       m←argmaxC

  • 4:

       S←S∪bm;B←B∪bm;C←C∪cm

  • 5:

       si←sif(IoU(M,bi))

  • 6:

       for bi∈B do

  • 7:

         if IoU(M,bi)≥Tnms then

  • 8:

            B←B∪bm;C←C∪cm

  • 9:

         else

  • 10:

            si←sif(IoU(M,bi))

  • 11:

         end if

  • 12:

       end for

  • 13:

    end while

  • 14:

    return result