Skip to main content

decode_yolo_end_to_end_det_float

Function decode_yolo_end_to_end_det_float 

Source
pub fn decode_yolo_end_to_end_det_float<T>(
    output: ArrayView2<'_, T>,
    score_threshold: f32,
    output_boxes: &mut Vec<DetectBox>,
) -> Result<(), DecoderError>
where T: Float + AsPrimitive<f32> + Send + Sync + 'static, f32: AsPrimitive<T>,
Expand description

Decodes end-to-end YOLO detection outputs (post-NMS from model). Expects an array of shape (6, N), where the first dimension (rows) corresponds to the 6 per-detection features [x1, y1, x2, y2, conf, class] and the second dimension (columns) indexes the N detections. Boxes are output directly without NMS (the model already applied NMS).

Coordinates may be normalized [0, 1] or absolute pixel values depending on the model configuration. The caller should check decoder.normalized_boxes() to determine which.

ยงErrors

Returns DecoderError::InvalidShape if output has fewer than 6 rows.