/** * Type definitions for PaddleOCR WebGPU engine. */ /** Model size variant for auto-resolving HuggingFace repos. */ export type ModelType = 'tiny' | 'small' | 'medium'; /** Maps a ModelType to its HuggingFace recognition model repo. */ export declare const REC_HF_REPO: Record; /** Maps a ModelType to its HuggingFace detection model repo. */ export declare const DET_HF_REPO: Record; export interface PaddleOcrOptions { /** * Model size variant: 'tiny', 'small', or 'medium'. * Auto-derives hfRepo, modelUrl and vocabUrl from the appropriate * HuggingFace repo when not explicitly set. */ modelType?: ModelType; /** * HuggingFace repo ID (e.g. "PaddlePaddle/PP-OCRv6_small_rec_onnx"). * When set, modelUrl and vocabUrl are auto-derived from the HF repo * (https://huggingface.co/{repo}/resolve/main/inference.onnx). */ hfRepo?: string; /** URL to the inference.onnx model file. Required unless hfRepo or modelType is set. */ modelUrl?: string; /** URL to the inference.yml file containing the character dictionary. Required unless hfRepo or modelType is set. */ vocabUrl?: string; /** Max input width after pre-processing. Default 3200. */ maxWidth?: number; /** Channel ordering for the input tensor. Default: 'bgr'. */ channelOrder?: 'rgb' | 'bgr'; /** Optional progress callback. `pct` is in [0,1] when known, may be omitted for indeterminate stages. */ onProgress?: (stage: string, pct?: number) => void; } export interface RecognizeResult { text: string; confidence: number; timeMs: number; shape: number[]; } /** Pre-processed batched image stored as Float32Array [1, 3, 48, W]. */ export interface PreprocessedImage { shape: number[]; data: Float32Array; } //# sourceMappingURL=types.d.ts.map