light-ocr is a fast, offline OCR library for Node.js and C++ that extracts text from PDFs, images, and raw pixel data with confidence scores and quadrilateral coordinates, bundling models, PDFium, and hardware acceleration into a single npm package.

Stars

442

7-day growth

No data

Forks

38

Open issues

1

License

Apache-2.0

Last updated

2026-07-28

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It delivers a complete offline OCR solution for Node.js and C++ in one package, with zero secondary downloads, automatic hardware acceleration (Core ML on macOS, WebGPU on Linux/Windows), built-in PDF support, and multiple model tiers ranging from ~6 MB to ~139 MB, plus an Agent Skill for AI agent integration.

Who it is for

  • Node.js developers who need local OCR without external dependencies
  • C++ developers integrating text recognition into native applications
  • AI agent creators who want deterministic OCR as a tool skill
  • Document processing teams seeking offline PDF and image text extraction

Use cases

  • Extracting text from scanned PDFs or images on a user's machine to preserve privacy
  • Batch processing large volumes of documents using the CLI or programmatic API
  • Validating or supplementing multimodal model output with precise, coordinate-aware OCR
  • Building real-time OCR functionality in desktop or server applications with hardware acceleration

Strengths

  • Single npm package install includes OCR runtime, model, and PDF renderer with no postinstall downloads
  • Hardware acceleration automatically enabled (Core ML, WebGPU via Vulkan/D3D12) providing significant speedups (up to 5.7× on tested hardware)
  • Output includes text, confidence scores, and quadrilateral bounding boxes in reading order with versioned schema
  • Cross‑platform support (macOS, Linux, Windows, x64 and arm64) and multiple model tiers for size/quality trade-offs

Considerations

  • Tiny and Medium model tiers are in preview status and may change; Tiny does not support Japanese text
  • Hardware acceleration benefits vary by device and workload, and fallback to CPU may be less performant
  • C++ integration requires building the static library from source, which adds a compile step

README quick start

Quick start

Description

C++17 PP-OCRv6 small OCR core with an asynchronous Node-API adapter

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482