Parameters
- config: OcrModel<L>
Optionaloptions: ResourceOptions
Returns {
downloadProgress: number;
error: Error | undefined;
isReady: boolean;
resource: OcrModel<L> | undefined;
runOcr:
| (
(input: ImageBuffer, options?: RunOcrOptions) => Promise<OcrResult<L>>
)
| undefined;
runOcrWorklet:
| ((input: ImageBuffer, options?: RunOcrOptions) => OcrResult<L>)
| undefined;
}
Readiness flags, download progress, and the runOcr and
runOcrWorklet runners (undefined until the model is ready).
React hook for the OCR pipeline (EasyOCR or PaddleOCR). It downloads and loads the model, tracks progress and errors, instantiates the runner, and releases native memory on unmount or config change. Heavy work runs on a worklet thread;
runOcrresolves with the recognized regions.For imperative usage, see createOcr.