Skip to main content

score_tensor_to_binary_mask

Function score_tensor_to_binary_mask 

pub fn score_tensor_to_binary_mask(
    tensor: &TensorBuffer,
    threshold: f32,
) -> Result<BinaryMask, VisionError>
Expand description

Converts a host score tensor into a binary mask via threshold.

Accepted shapes: [H,W], [1,H,W], or [1,1,H,W].