Nms
nmsRemove duplicate detections of the same object. PREMIUM (license).
Greedy non-maximum suppression: keep the highest-scoring box, drop everything overlapping it above the threshold, repeat. Ties break on the earlier index, so the result is deterministic rather than dependent on sort stability. Typical input {"boxes": [[0,0,10,10],[1,1,11,11],[50,50,60,60]], "scores": [0.9, 0.8, 0.7]} returns {"keep": [0, 2], "suppressed": [{"index": 1, "by": 0, "iou": 0.6807}], "kept": 2}.
Use after a detector that emits overlapping boxes. Not for scoring against ground truth (detection_metrics) and not for format changes (bbox_convert). Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "boxes and scores must be the same length"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boxes | Yes | Candidate boxes in box_format, e.g. [[0, 0, 10, 10]]. | |
| scores | Yes | One confidence per box, same order and same length as boxes. | |
| box_format | No | "voc", "coco" or "yolo". Default "voc". | voc |
| image_width | No | Pixel width; required for yolo boxes. | |
| image_height | No | Pixel height; required for yolo boxes. | |
| iou_threshold | No | Overlap above which the lower-scoring box is dropped. Default 0.5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||