ReadonlydetectThe allowed spec of the detect outputs this strategy decodes, used to
validate the model at load. Dimensions that track the detector input size
must be built with the supplied dim factory: the pipeline passes
schema.DynamicDim when validating a size-varying detector and
schema.StaticDim when validating a fixed-size one, so one declaration
covers both.
Symbol factory for every input-size-dependent dimension.
One param spec per detect output, in order.
ReadonlyextractTurns the model's detect output tensors into oriented quads in
detector-input pixel space.
The model's detect output tensors, in order.
The detector input size the image was letterboxed to.
Emit one box per glyph instead of grouped lines; strategies without a char-level mode ignore it.
Oriented quads (TL, TR, BR, BL) in detector-input pixel space.
Optional ReadonlyinputThe detector input dims (W and H) must be a multiple of this; the pipeline
snaps the letterbox size up to it before allocating, so outputShapes
never receives a size it must reject. Default 1 (no alignment). CRAFT
needs 2 (its heatmap is half-resolution).
ReadonlyoutputThe float32 output tensor shapes the detect method produces for a
given detector input size, so the caller can pre-allocate them. One shape
per detect output, in order.
The detector input size the image was letterboxed to.
One shape per detect output tensor.
Optional ReadonlysupportsWhether extract(.., charLevel = true) yields per-glyph boxes. When false
the stacked-text (vertical) pass skips its char-level re-detection split
and reads those boxes horizontally instead. Default false.
A detector's box-extraction strategy. Plug a new detector architecture into the OCR pipeline by supplying an object of this type (a built-in below, or your own).
outputShapesandextractMUST be worklets.