pub fn decode_modelpack_float<BOX: Float + AsPrimitive<f32> + Send + Sync, SCORE: Float + AsPrimitive<f32> + Send + Sync>(
boxes_tensor: ArrayView2<'_, BOX>,
scores_tensor: ArrayView2<'_, SCORE>,
score_threshold: f32,
iou_threshold: f32,
output_boxes: &mut Vec<DetectBox>,
)where
f32: AsPrimitive<SCORE>,Expand description
Decodes ModelPack detection outputs from float tensors. The boxes are expected to be in XYXY format.
Expected shapes of inputs:
- boxes: (num_boxes, 4)
- scores: (num_boxes, num_classes)
§Panics
Panics if shapes don’t match the expected dimensions.