pub fn decode_modelpack_det<BOX: PrimInt + AsPrimitive<f32> + Send + Sync, SCORE: PrimInt + AsPrimitive<f32> + Send + Sync>(
boxes_tensor: (ArrayView2<'_, BOX>, Quantization),
scores_tensor: (ArrayView2<'_, SCORE>, Quantization),
score_threshold: f32,
iou_threshold: f32,
output_boxes: &mut Vec<DetectBox>,
)where
f32: AsPrimitive<SCORE>,Expand description
Decodes ModelPack detection outputs from quantized 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.