Skip to main content

//clika-runtime/io.clika.runtime/Ops/nms

nms

[common]
fun nms(boxes: Tensor, scores: Tensor, maxOutputBoxesPerClass: Tensor? = null, iouThreshold: Tensor? = null, scoreThreshold: Tensor? = null, centerPointBox: Boolean = false): Tensor

nms(boxes: Tensor, scores: Tensor, maxOutputBoxesPerClass: Tensor? = null, iouThreshold: Tensor? = null, scoreThreshold: Tensor? = null, centerPointBox: Boolean = false): the nms operator. Batched, class-aware non-max suppression (argument order mirrors the ONNX operator). boxes is [batch, num_boxes, 4]; scores is [batch, classes, num_boxes]; returns the selected indices as an Int64 [num_selected, 3] of (batch, class, box) rows. Every threshold takes a literal OR a 0-D tensor (a tensor traces symbolically). An absent max_output_boxes_per_class selects NOTHING (the reference default); a negative cap clamps to 0. A literal iou_threshold outside 0, 1 raises. center_point_box picks the [cx, cy, w, h] box encoding over the corners form.