Non-Maximum Suppression (NMS)

Non-Maximum Suppression (NMS) is a post-processing step in object detection that eliminates duplicate bounding box predictions for the same object. Most detectors produce hundreds or thousands of candidate boxes per image, many of which overlap heavily on the same object. NMS keeps the best prediction and removes the rest.

The algorithm is straightforward: sort all predictions by confidence score, pick the top-scoring box, compute IoU (Intersection over Union) between it and every remaining box, discard any box with IoU above a threshold (typically 0.45-0.65), then repeat with the next highest-scoring box until the list is empty. Variants include Soft-NMS (which gradually decays scores instead of hard-discarding, improving recall for overlapping objects), DIoU-NMS (which factors in center-point distance alongside IoU), and class-aware NMS (which runs suppression independently per class so overlapping objects of different classes aren't suppressed).

A major trend in recent detection architectures is removing NMS entirely. DETR, RT-DETR, and YOLO26 use one-to-one label assignment during training (Hungarian matching or similar), producing exactly one prediction per object by design. This NMS-free approach eliminates a hand-tuned threshold, reduces inference latency, and produces more consistent results. But NMS remains the standard post-processing step for most YOLO variants and anchor-based detectors in production today.

Get Started Now

Get Started using Datature’s platform now for free.