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

18 lines (17 loc) 864 B
import type * as ort from "onnxruntime-react-native"; import { BaseDetectionService } from "../core/base-detection.service.js"; import type { DebuggingOptions, DetectionOptions } from "../interface.js"; /** * Service for detecting text regions in images using the React Native implementation. * Mobile always uses the canvas-native engine (no OpenCV available on RN). */ export declare class DetectionService extends BaseDetectionService { /** * Creates a mobile detection service bound to a loaded ONNX session. * * @param session - Loaded ONNX detection model session (`onnxruntime-react-native`). * @param options - Detection tuning options. * @param debugging - Logging and image-dump options. */ constructor(session: ort.InferenceSession, options?: Partial<DetectionOptions>, debugging?: Partial<DebuggingOptions>); }