pub fn postprocess_output(
model_output: &[f32],
n: usize,
max_plate_slots: usize,
alphabet: &str,
pad_char: char,
remove_pad_char: bool,
return_confidence: bool,
region_output: Option<&[f32]>,
region_labels: Option<&[String]>,
) -> Result<Vec<PlatePrediction>>Expand description
Decode the raw plate-head output tensor into PlatePrediction values.
§Parameters
model_output– flat f32 slice of shape(N * max_plate_slots * vocab_size).n– batch size.max_plate_slots– number of character positions.alphabet– the model’s character set.pad_char– padding character to strip from the right.remove_pad_char– whether to strip trailingpad_char.return_confidence– include per-character probabilities.region_output– optional flat f32 slice(N * num_regions)(already softmaxed).region_labels– label list for the region head.