Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Tencent Ncnn Non Maximum Suppression

From Leeroopedia
Revision as of 17:57, 16 February 2026 by Admin (talk | contribs) (Auto-imported from principles/Tencent_Ncnn_Non_Maximum_Suppression.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Knowledge Sources
Domains Computer_Vision, Object_Detection
Last Updated 2026-02-09 00:00 GMT

Overview

Algorithm for eliminating redundant overlapping detections by iteratively selecting the highest-confidence prediction and removing all other predictions with high spatial overlap.

Description

Non-Maximum Suppression (NMS) is a critical post-processing step in object detection pipelines. Detection networks produce many candidate bounding boxes with varying confidence scores, often with multiple detections for the same object. NMS filters these redundant detections by: (1) sorting candidates by confidence score in descending order, (2) selecting the highest-scoring detection, (3) computing Intersection over Union (IoU) between it and all remaining candidates, and (4) removing candidates whose IoU exceeds a threshold. This process repeats until no candidates remain.

NMS can be applied class-agnostically (all classes together) or per-class (separate suppression for each class category).

Usage

Use NMS as the final filtering step after bounding box decoding in any object detection pipeline. The IoU threshold (typically 0.45) controls how aggressively overlapping detections are suppressed.

Theoretical Basis

IoU (Intersection over Union): IoU(A,B)=|AB||AB|=|AB||A|+|B||AB|

NMS algorithm:

// Abstract NMS algorithm
sort(detections, by=confidence, descending)
picked = []
while detections not empty:
    best = detections.pop_front()
    picked.append(best)
    detections.remove_if(iou(det, best) > nms_threshold)
return picked

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment