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

6 lines (5 loc) 3.31 kB
/** * Usage text for the `ppu-paddle-ocr` CLI. Printed to stdout for `help` / * `--help`, and to stderr (followed by a non-zero exit) on usage errors. */ export declare const USAGE = "ppu-paddle-ocr \u2014 PaddleOCR on the command line\n\nUsage:\n ppu-paddle-ocr <command> [args] [flags]\n\nCommands:\n recognize <image> OCR one image (file path or http(s) URL)\n batch <pattern...> OCR many images (globs or a list of paths/URLs)\n stream <pattern...> OCR many images, printing each result as it finishes\n download-models Pre-warm the model cache (~/.cache/ppu-paddle-ocr)\n clear-cache Delete the cached model files\n models Print the active models, defaults, and providers\n help Show this help\n version Show the installed version\n\nRecognition flags (recognize / batch / stream):\n --strategy <s> per-box | per-line | cross-line (default per-box)\n --cross-line-width-factor <n> bin-pack width multiplier for cross-line (default 1.0)\n --engine <e> opencv | canvas-native (default opencv)\n --image-height <n> recognition input height in px (default 48)\n --flatten flat results in reading order instead of grouped lines\n --no-cache bypass the in-memory result cache\n\nModel overrides:\n --model <preset> catalogue preset, e.g. v6-small (default), v6-tiny,\n v5-en-mobile, v5-thai-mobile (see 'models --json')\n --model-detection <path|url> override the preset's detection model\n --model-recognition <path|url> override the preset's recognition model\n --model-dict <path|url> override the preset's dictionary\n\nDetection tuning:\n --max-side-length <n> longest side before downscale (default 640)\n --padding-vertical <n> box padding, fraction of height (default 0.4)\n --padding-horizontal <n> box padding, fraction of height (default 0.6)\n --min-area <n> drop boxes smaller than this area in px (default 50)\n --mean <r,g,b> normalization mean (default 0.485,0.456,0.406)\n --std <r,g,b> normalization std dev (default 0.229,0.224,0.225)\n\nSession:\n --execution-providers <list> comma-separated, e.g. cpu or cuda,cpu (default cpu)\n\nBatch / stream:\n --concurrency <n|auto> images in flight at once (default auto)\n --settle keep going past a failed image (default on for batch/stream)\n\nOutput:\n -o, --output <file> write to a file instead of stdout\n --json emit structured JSON (NDJSON for stream)\n --pretty indent JSON output\n -q, --quiet suppress progress/logs on stderr\n --verbose log each processing step to stderr\n --debug dump intermediate frames to disk\n --debug-folder <dir> where --debug writes (default out)\n\nExamples:\n ppu-paddle-ocr recognize receipt.jpg\n ppu-paddle-ocr recognize https://example.com/invoice.png --json --pretty\n ppu-paddle-ocr batch \"scans/*.png\" --strategy cross-line -o results.json --json\n ppu-paddle-ocr download-models --verbose\n";