UNPKG

ppu-paddle-ocr

Version:

Lightweight, probably the fastest PaddleOCR SDK in TypeScript. Runs anywhere JavaScript runs: Node.js, Bun, Deno, mobile react-native, web browsers, and browser extensions. Docker & CLI supported. The official SDK is browser-only. Accurate text detection

20 lines (19 loc) 967 B
import type * as ort from "onnxruntime-web"; import { BaseRecognitionService } from "../core/base-recognition.service.js"; import type { RecognitionResult } from "../core/base-recognition.service.js"; import type { DebuggingOptions, RecognitionOptions } from "../interface.js"; export type { RecognitionResult }; /** * Service for detecting and recognizing text in images using Web implementation. * Web always uses canvas-native engine (no OpenCV available in browser). */ export declare class RecognitionService extends BaseRecognitionService { /** * Creates a web recognition service bound to a loaded ONNX session. * * @param session - Loaded ONNX recognition model session (`onnxruntime-web`). * @param options - Recognition tuning options. * @param debugging - Logging and image-dump options. */ constructor(session: ort.InferenceSession, options?: Partial<RecognitionOptions>, debugging?: Partial<DebuggingOptions>); }