The detector's float32 output of shape
[heatHeight, heatWidth, 2] (a leading batch dimension of 1 is accepted),
region and affinity scores interleaved.
Decode thresholds and the heatmap-to-input scale.
One box per surviving component, in no particular order.
Decodes a CRAFT region and affinity heatmap into text component boxes: thresholds the two score maps, links (or, with
charLevel, separates) glyphs into connected components and fits a rotated rectangle to each.Line grouping and reading order are computed in TypeScript on the returned boxes.