Up nextNext guide
BYOL and Non-Contrastive Self-Supervision
Technical
Visual AI GUIDE
Non-Maximum Suppression (NMS) is the cleanup step that turns a messy pile of overlapping detection boxes into one tidy box per object.
Listen to this guideAI-narrated · ~2 min
Without it, detectors would report the same car five or ten times.
Object detectors typically predict many candidate boxes around each real object, each with a confidence score. NMS prunes this redundancy. The classic greedy algorithm sorts all boxes by score, keeps the highest-scoring one, then removes any remaining box whose overlap with it (measured by Intersection over Union, IoU) exceeds a threshold such as 0.5. It repeats this on the surviving boxes until none remain. The result is one representative box per object. NMS is simple, fast, and parameter-light, but it has weaknesses: a fixed IoU threshold can wrongly suppress a genuine nearby object in crowded scenes, and it treats overlap as binary. Variants like Soft-NMS decay scores instead of deleting boxes outright to address this.
Collapsing dozens of overlapping face boxes into one per face in camera and photo-tagging apps
Producing clean, single bounding boxes per vehicle and pedestrian in autonomous-driving detectors
De-duplicating overlapping text-region boxes in document and license-plate OCR pipelines
Cleaning up redundant object proposals in retail shelf-monitoring and inventory-counting systems
NMS remains the default post-processor, but the field is moving toward removing it. Soft-NMS, DIoU-NMS, and learned variants improve crowded-scene handling, while end-to-end detectors like DETR use set-based bipartite matching to predict unique boxes directly, eliminating NMS entirely. Expect hand-tuned thresholds to give way to learned or NMS-free designs, especially as transformer detectors mature and real-time systems demand deterministic, branch-free post-processing.
Free newsletter
One short email each weekday with the three AI stories that actually matter. Free forever, no ads.
One email each weekday. Unsubscribe in one click. We never sell or share your address.
Test yourself
Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.
Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation
Non-Maximum Suppression (NMS) is the cleanup step that turns a messy pile of overlapping detection boxes into one tidy box per object. Without it, detectors would report the same car five or ten times.
NMS eliminates the many overlapping candidate boxes a detector produces, leaving a single representative box per object.
NMS measures overlap with IoU: intersection area divided by union area of the two boxes.
Greedy NMS sorts boxes by confidence and keeps the highest-scoring one, then suppresses overlapping lower-scoring boxes.
Because it deletes any box above the IoU threshold, NMS can wrongly remove a true detection of a different object that happens to overlap.
Soft-NMS lowers (decays) the confidence of overlapping boxes rather than discarding them, reducing false suppression in crowded scenes.
Keep learning
More guides picked for this topic
Up nextNext guide
BYOL and Non-Contrastive Self-Supervision
Technical