pub fn preprocess_image(
data_uri: &str,
vcfg: &VisionConfig,
) -> Result<(Vec<f32>, usize, usize)>Expand description
Preprocess a single base64-encoded image for the Qwen3-VL encoder.
Returns:
pixels: flatf32tensor shaped[P, C × T × H_p × W_p]where:P = (H/patch_size) × (W/patch_size)— number of patchesC = 3channels,T = temporal_patch_size(image duplicated),H_p = W_p = patch_size
grid_h: number of patches along heightgrid_w: number of patches along width