Skip to main content

decode_yolo_split_segdet_float

Function decode_yolo_split_segdet_float 

Source
pub fn decode_yolo_split_segdet_float<T>(
    boxes: ArrayView2<'_, T>,
    scores: ArrayView2<'_, T>,
    mask_coeff: ArrayView2<'_, T>,
    protos: ArrayView3<'_, T>,
    score_threshold: f32,
    iou_threshold: f32,
    nms: Option<Nms>,
    output_boxes: &mut Vec<DetectBox>,
    output_masks: &mut Vec<Segmentation>,
)
where T: Float + AsPrimitive<f32> + Send + Sync + 'static, f32: AsPrimitive<T>,
Expand description

Decodes YOLO split detection segmentation outputs from float tensors into detection boxes and segmentation masks.

Boxes are expected to be in XYWH format.

Expected shapes of inputs:

  • boxes_tensor: (4, num_boxes)
  • scores_tensor: (num_classes, num_boxes)
  • mask_tensor: (num_protos, num_boxes)
  • protos: (proto_height, proto_width, num_protos)

§Panics

Panics if shapes don’t match the expected dimensions.