---
title: "ClikaRT::ops::nms"
sidebar_label: "nms"
description: "Batched, class-aware non-max suppression (argument order mirrors the ONNX operator)."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## nms() {#nms}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`nms`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `boxes`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `scores`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::optional<`[`ScalarOrTensor`](../ScalarOrTensor.md)`>` `max_output_boxes_per_class` `=` `std::nullopt`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::optional<`[`ScalarOrTensor`](../ScalarOrTensor.md)`>` `iou_threshold` `=` `std::nullopt`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::optional<`[`ScalarOrTensor`](../ScalarOrTensor.md)`>` `score_threshold` `=` `std::nullopt`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`bool` `center_point_box` `=` `false`<br />
)

</div>

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.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 2718

</div>
