Trait Nms
pub trait Nms {
// Required method
fn nms(self, scores: Tensor<1>, opts: NmsOptions) -> Tensor<1, Int>;
}Expand description
Non-maximum suppression tensor operations
Required Methods§
fn nms(self, scores: Tensor<1>, opts: NmsOptions) -> Tensor<1, Int>
fn nms(self, scores: Tensor<1>, opts: NmsOptions) -> Tensor<1, Int>
Perform Non-Maximum Suppression on this tensor of bounding boxes.
Returns indices of kept boxes after suppressing overlapping detections. Boxes are processed in descending score order; a box suppresses all lower-scoring boxes with IoU > threshold.
§Arguments
self- Bounding boxes as [N, 4] tensor in (x1, y1, x2, y2) formatscores- Confidence scores as [N] tensoroptions- NMS options (IoU threshold, score threshold, max boxes)
§Returns
Indices of kept boxes as [M] tensor where M <= N
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".