Non-Maximum Suppression
非极大值抑制NMSAdvancedA post-processing step that keeps only the highest-scoring box among a cluster of overlapping detection boxes.
Object detectors often output several overlapping candidate boxes for the same object. Non-maximum suppression (NMS) sorts these by confidence score, keeps the highest-scoring box, and removes every other box whose IoU (intersection over union — the overlap area divided by the union area) with it exceeds a threshold; this repeats until no boxes remain unprocessed. It is the standard post-processing step in detectors such as YOLO and Faster R-CNN, and is also used in grasp-pose detection to remove duplicate grasp candidates. Setting the threshold too high leaves duplicate boxes behind; setting it too low can wrongly delete real objects that happen to sit close together. End-to-end detectors such as DETR are designed not to need NMS at all.
ExampleA detector outputs five overlapping boxes for the same cup; NMS keeps the highest-scoring one and discards every other box whose IoU with it exceeds 0.5.
- Also called
- NMS, NMS Post-Processing
- Related
- Object Detection · Bounding Box · Intersection over Union · YOLO · DETR · Grasp Pose Detection
- Sources
- torchvision.ops.nms - PyTorch Documentation