Skip to main content

ClikaRT::ops::nms

function

nms()

Tensor nms(
    Tensor boxes,
    Tensor scores,
    std::optional<ScalarOrTensor> max_output_boxes_per_class = std::nullopt,
    std::optional<ScalarOrTensor> iou_threshold = std::nullopt,
    std::optional<ScalarOrTensor> score_threshold = std::nullopt,
    bool center_point_box = false
)

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.

Declared in ClikaRT/compute/ops.h, line 2631