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) 828 B
import type * as ort from "onnxruntime-web"; import { BaseDetectionService } from "../core/base-detection.service.js"; import type { DebuggingOptions, DetectionOptions } from "../interface.js"; /** * Service for detecting text regions in images using Web implementation. * Web always uses canvas-native engine (no OpenCV available in browser). */ export declare class DetectionService extends BaseDetectionService { /** * Creates a web detection service bound to a loaded ONNX session. * * @param session - Loaded ONNX detection model session (`onnxruntime-web`). * @param options - Detection tuning options. * @param debugging - Logging and image-dump options. */ constructor(session: ort.InferenceSession, options?: Partial<DetectionOptions>, debugging?: Partial<DebuggingOptions>); }