Viet-Anh on Software Logo

What is: Matrix Non-Maximum Suppression?

SourceSOLOv2: Dynamic and Fast Instance Segmentation
Year2000
Data SourceCC BY-SA - https://paperswithcode.com

Matrix NMS, or Matrix Non-Maximum Suppression, performs non-maximum suppression with parallel matrix operations in one shot. It is motivated by Soft-NMS. Soft-NMS decays the other detection scores as a monotonic decreasing function f(iou)f(iou) of their overlaps. By decaying the scores according to IoUs recursively, higher IoU detections will be eliminated with a minimum score threshold. However, such process is sequential like traditional Greedy NMS and can not be implemented in parallel.

Matrix NMS views this process from another perspective by considering how a predicted mask m_jm\_{j} being suppressed. For m_jm\_{j}, its decay factor is affected by: (a) The penalty of each prediction m_im\_{i} on m_jm\_{j} (s_i>s_j)\left(s\_{i}>s\_{j}\right), where s_is\_{i} and s_js\_{j} are the confidence scores; and (b) the probability of m_im\_{i} being suppressed. For (a), the penalty of each prediction m_im\_{i} on m_jm\_{j} could be easily computed by f(f\left(\right. iou _i,j)\left.\_{i, j}\right). For (b), the probability of m_im\_{i} being suppressed is not so elegant to be computed. However, the probability usually has positive correlation with the IoUs. So here we directly approximate the probability by the most overlapped prediction on m_im\_{i} as

f( iou. _,i)=min_s_k>s_if( iou _k,i)f\left(\text { iou. }\_{, i}\right)=\min\_{\forall s\_{k}>s\_{i}} f\left(\text { iou }\_{k, i}\right)

To this end, the final decay factor becomes

decay_j=min_s_i>s_jf( iou _i,j)f( iou _,i)\operatorname{decay}\_{j}=\min\_{\forall s\_{i}>s\_{j}} \frac{f\left(\text { iou }\_{i, j}\right)}{f\left(\text { iou }\_{\cdot, i}\right)}

and the updated score is computed by s_j=s_js\_{j}=s\_{j} \cdot decay _j.\_{j} . The authors consider the two most simple decremented functions, denoted as linear f(f\left(\right. iou _i,j)=1\left.\_{i, j}\right)=1- iou _i,j\_{i, j}, and Gaussian f(f\left(\right. iou _i,j)=exp(iou_i,j2σ)\left.\_{i, j}\right)=\exp \left(-\frac{i o u\_{i, j}^{2}}{\sigma}\right).