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) • 890 B
TypeScript
import type * as ort from "onnxruntime-node";
import { BaseDetectionService } from "../core/base-detection.service.js";
import type { DebuggingOptions, DetectionOptions, ProcessingEngine } from "../interface.js";
/**
* Service for detecting text regions in images using Node.js implementation
*/
export declare class DetectionService extends BaseDetectionService {
/**
* Creates a Node detection service bound to a loaded ONNX session.
*
* @param session - Loaded ONNX detection model session.
* @param options - Detection tuning options.
* @param debugging - Logging and image-dump options.
* @param engine - Image processing engine; falls back to `canvas-native` when OpenCV is unavailable.
*/
constructor(session: ort.InferenceSession, options?: Partial<DetectionOptions>, debugging?: Partial<DebuggingOptions>, engine?: ProcessingEngine);
}