React Native OCR - v0.11.0
    Preparing search index...

    Type Alias OcrModelOptions

    Model-specific OCR options. The pipeline validates the detect/recognize contract and resolves legal input sizes from the model metadata itself; these cover everything it cannot infer.

    type OcrModelOptions = {
        charset: string | readonly string[];
        decode?: (
            probs: Tensor,
            charset: readonly string[],
        ) => { confidence: number; text: string };
        detectorNorm?: NormalizeOptions;
        extractBoxes: TextBoxExtractor;
        minConfidence?: number;
        recognizerNorm?: NormalizeOptions;
        recognizerPadMode?: "constant" | "cornerMean";
        recognizerPadValue?: number;
    }
    Index
    charset: string | readonly string[]

    Recognizer charset (string = one codepoint per index; array = taken verbatim).

    decode?: (
        probs: Tensor,
        charset: readonly string[],
    ) => { confidence: number; text: string }

    Custom decode replacing greedy CTC; receives softmaxed [1, T, V] probs. Must be a worklet. The probs tensor is pre-allocated from the recognizer's width-to-timesteps relation, so T always matches the run's input width.

    detectorNorm?: NormalizeOptions

    Detector norm on uint8 RGB. Default ImageNet; must match the model's training norm.

    extractBoxes: TextBoxExtractor

    Maps raw detect outputs to quads: craftExtractBoxes or dbnetExtractBoxes.

    minConfidence?: number

    Drop detections below this recognition confidence. Default 0. Confidence is the mean per-timestep max probability, so this requires the recognizer to export a softmaxed head (values in [0, 1]); on raw logits it is meaningless.

    recognizerNorm?: NormalizeOptions

    Recognizer norm applied after the warp. Default (x / 255 - 0.5) / 0.5, into [-1, 1].

    recognizerPadMode?: "constant" | "cornerMean"

    Strip padding fill: 'constant' (default) or 'cornerMean' (background-matched).

    recognizerPadValue?: number

    Recognizer canvas padding fill. Default 128 (neutral gray).