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

13 lines (12 loc) 716 B
import * as ort from "onnxruntime-node"; import type { CanvasOps, CoreCanvas, ImageProcessorProvider, PlatformProvider } from "../core/platform.js"; export declare class NodePlatformProvider implements PlatformProvider<CoreCanvas> { readonly pathSeparator: string; readonly ort: typeof ort; createCanvas(width: number, height: number): CoreCanvas; isCanvas(image: unknown): image is CoreCanvas; loadResource(source: string | ArrayBuffer | undefined, defaultUrl: string): Promise<ArrayBuffer>; saveDebugImage(canvas: CoreCanvas, filename: string, outputDir: string): Promise<void>; readonly canvas: CanvasOps<CoreCanvas>; readonly imageProcessor: ImageProcessorProvider<CoreCanvas>; }