# Non-Maximum Suppression

[**https://www.coursera.org/lecture/convolutional-neural-networks/non-max-suppression-dvrjH**](https://www.coursera.org/lecture/convolutional-neural-networks/non-max-suppression-dvrjH) **- this is enough to understand NMS.**

When multiple proposals may correspond to a single object, which renders all but one proposal to be false-positive. Non-maximum suppression (NMS) solves this problem by clustering proposals by spatial closeness measured with IoU and keeping only the most confident proposals among each cluster.

Two of NMS:&#x20;

* Greedy
* Optimal

### Greedy

![Greedy NMS algo](https://1877261540-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LFDuA0A2VRqmT31Blrq%2F-LkjyVhA5UNJHM3evZnO%2F-LkjzFXO-kj_UgcVPf2a%2Fimage.png?alt=media\&token=52446a01-20eb-4650-a668-df9ea3c51a9c)

### Optimal

![](https://1877261540-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LFDuA0A2VRqmT31Blrq%2F-LkjyVhA5UNJHM3evZnO%2F-Lkjza4w2iaW89w_tUeU%2Fimage.png?alt=media\&token=003b1bda-d925-4c68-a9b2-e703e12fc86d)

### Hyper-parameters

**Score Threshold**

Any proposals with confidence less than the score threshold are rejected.

**Overlap Threshold**

Two proposals are considered to be in the same cluster when their IoU is larger than the overlap threshold
