Skip to main content
Log in

Mojo function

non_max_suppression

non_max_suppression[type: DType](boxes: NDBuffer[type, 3, origin], scores: NDBuffer[type, 3, origin], output: NDBuffer[int64, 2, origin], max_output_boxes_per_class: Int, iou_threshold: SIMD[float32, 1], score_threshold: SIMD[float32, 1])

Buffer semantic overload.

non_max_suppression[: origin.set, //, type: DType, func: fn(SIMD[int64, 1], SIMD[int64, 1], SIMD[int64, 1]) capturing -> None](boxes: NDBuffer[type, 3, origin], scores: NDBuffer[type, 3, origin], max_output_boxes_per_class: Int, iou_threshold: SIMD[float32, 1], score_threshold: SIMD[float32, 1])

Implements the NonMaxSuppression operator from the ONNX spec https://github.com/onnx/onnx/blob/main/docs/Operators.md#nonmaxsuppression.

Was this page helpful?