---
title: "nms"
sidebar_label: "nms"
description: "Kotlin binding reference: nms."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[nms](nms.md)

# nms

[common]\
fun [nms](nms.md)(boxes: [Tensor](../Tensor/index.md), scores: [Tensor](../Tensor/index.md), maxOutputBoxesPerClass: [Tensor](../Tensor/index.md)? = null, iouThreshold: [Tensor](../Tensor/index.md)? = null, scoreThreshold: [Tensor](../Tensor/index.md)? = null, centerPointBox: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false): [Tensor](../Tensor/index.md)

`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.