Skip to main content

preprocess_for_det

Function preprocess_for_det 

Source
pub fn preprocess_for_det(
    img: &DynamicImage,
    params: &NormalizeParams,
) -> ArrayBase<OwnedRepr<f32>, Dim<[usize; 4]>>
Expand description

Convert image to detection model input tensor

Output format: [1, 3, H, W] (NCHW)