non-maximum suppression
In plain wordsA clean-up step in object detection: when the system draws several overlapping boxes around the same object, it keeps the most confident one and throws away the near-duplicates.
- 1
Object detection
A post-processing algorithm that removes duplicate detections. Candidate boxesbounding box, n.: The rectangle a vision system draws around an object it has found, stored as a handful of numbers giving the rectangle's position and size. are sorted by confidence; the highest-scoring box is kept, every remaining box of the same class whose intersection over unionintersection over union, n.: A score from 0 to 1 for how well two shapes overlap, such as a predicted box and the true box around an object: the shared area divided by the combined area. with it exceeds a threshold (typically between 0.3 and 0.7) is discarded, and the process repeats on what is left. Greedy NMS is simple but flawed: it can delete correct detections of objects that genuinely overlap, such as people in a crowd; its threshold needs tuning; and its sequential, data-dependent loop adds latencylatency, n.: How long you wait between asking an AI system for something and getting the answer. Lower latency means a snappier, more responsive system. and complicates export to accelerators. Variants include soft-NMS (2017), which lowers the scores of overlapping boxes instead of deleting them, and learned or matrix forms. 'NMS-free' detectors avoid the step by training exactly one prediction per object: DETRDETR, prop. n.: An object detector built on the transformer, the design behind modern chatbots, that outputs a short list of objects in one go instead of sorting through thousands of guessed boxes. (2020) through set matching, and YOLOv10YOLO, prop. n.: A family of fast object-detection models that look at an image once and immediately output boxes and labels for everything they recognize, quick enough for live video. (2024) through one-to-one label assignment. Ultralytics YOLO26 (released January 2026) offers such a one-to-one head as an option, though as of October 2026 its default prediction mode still applies NMS.
Raising the NMS threshold recovered people standing shoulder to shoulder but let a few duplicate boxes through.
- 2
Edge detection
The thinning step in edge detection that keeps a pixel only if its gradient magnitude is a local maximum along the gradient direction, turning blurred ridges of strong gradient into one-pixel-wide edges; it is a core stage of the Canny edge detector and of many corner and keypoint detectors.
Origin
The term comes from low-level vision, where suppressing non-maximal filter responses thins edges; John Canny's influential 1986 edge detector made the step standard. Greedy suppression of overlapping detection windows was in use by the mid-1990s, for example in face detection, became the usual final stage of sliding-window detectors and was retained by R-CNN, SSD and YOLO.
Usage note
Usually applied separately for each class; 'class-agnostic' NMS suppresses across classes. Because NMS runs outside the network, speed figures that exclude it can understate end-to-end latency.
Related
- object detectionobject detection, n.: Finding every object of interest in a picture or video frame, saying what each one is and drawing a box around it, for example all the cars, cyclists and pedestrians in a street scene.
- intersection over unionintersection over union, n.: A score from 0 to 1 for how well two shapes overlap, such as a predicted box and the true box around an object: the shared area divided by the combined area.
- bounding boxbounding box, n.: The rectangle a vision system draws around an object it has found, stored as a handful of numbers giving the rectangle's position and size.
- DETRDETR, prop. n.: An object detector built on the transformer, the design behind modern chatbots, that outputs a short list of objects in one go instead of sorting through thousands of guessed boxes.
- YOLOYOLO, prop. n.: A family of fast object-detection models that look at an image once and immediately output boxes and labels for everything they recognize, quick enough for live video.
- anchor boxanchor box, n.: A ready-made box shape, placed at many spots across an image, that an object detector stretches and shifts to fit real objects instead of drawing boxes from scratch.
Sources
- Canny, J. (1986). A Computational Approach to Edge Detection. IEEE Transactions on Pattern Analysis and Machine Intelligence 8(6), 679–698.
- Bodla, N., Singh, B., Chellappa, R. & Davis, L. S. (2017). Soft-NMS: Improving Object Detection With One Line of Code. ICCV 2017.
- Hosang, J., Benenson, R. & Schiele, B. (2017). Learning Non-Maximum Suppression. CVPR 2017. arxiv.org/abs/1705.02950
Mentioned in
object detectionobject detection, n.: Finding every object of interest in a picture or video frame, saying what each one is and drawing a box around it, for example all the cars, cyclists and pedestrians in a street scene., bounding boxbounding box, n.: The rectangle a vision system draws around an object it has found, stored as a handful of numbers giving the rectangle's position and size., intersection over unionintersection over union, n.: A score from 0 to 1 for how well two shapes overlap, such as a predicted box and the true box around an object: the shared area divided by the combined area., R-CNNR-CNN, prop. n.: A family of object detectors that first pick out image regions likely to contain objects, then use a neural network to label each region and tighten its box., YOLOYOLO, prop. n.: A family of fast object-detection models that look at an image once and immediately output boxes and labels for everything they recognize, quick enough for live video., DETRDETR, prop. n.: An object detector built on the transformer, the design behind modern chatbots, that outputs a short list of objects in one go instead of sorting through thousands of guessed boxes.