pub fn nms_float(
iou: f32,
max_det: Option<usize>,
boxes: Vec<DetectBox>,
) -> Vec<DetectBox>Expand description
Uses NMS to filter boxes based on the score and iou. Sorts boxes by score, then greedily selects a subset of boxes in descending order of score.
If max_det is Some(n), the greedy loop stops as soon as n survivors
have been confirmed. Because the input is sorted descending, the first n
survivors are the highest-scoring n, so the post-NMS top-n is preserved
without iterating the full O(N²) suppression loop.