ToolQuestor Logo

An OCR model enabling one-shot long-horizon parsing of complex documents

Unlimited OCR is an optical character recognition and document parsing model released by Baidu, designed to push beyond the capabilities of prior systems like Deepseek-OCR. It targets what the project calls one-shot long-horizon parsing, allowing a single pass to accurately extract and structure content from complex documents, including multi-page PDFs and image sets, without needing repeated re-processing.

Under the hood, the model is built on Hugging Face Transformers and can be loaded directly via AutoModel and AutoTokenizer. It supports both single-image inference, using configurable gundam or base modes that control image resolution and cropping, and multi-page inference for scanned documents or PDFs converted into image sequences with PyMuPDF. Outputs include detection markers that can be parsed and cleaned into structured text blocks, useful for benchmarks like OmniDocBench.

For production-scale deployment, Unlimited OCR integrates with vLLM and SGLang, offering Docker images tuned for different GPU platforms and an OpenAI-compatible streaming API. A bundled inference script automates batch processing across image directories or PDFs with configurable concurrency. The project has drawn support from the open-source ecosystem, including the ms-swift, ModelScope, and vLLM communities, plus availability on Hugging Face, Baidu Cloud, and Hugging Face Spaces for live demos.

Key features include:

  • One-shot long-horizon parsing — accurate document understanding without iterative reprocessing
  • Multi-backend inference — supports Transformers, vLLM, and SGLang runtimes
  • PDF and multi-page support — converts and parses whole documents via PyMuPDF
  • Flexible image modes — gundam and base configurations for resolution and cropping control
  • Community integrations — available on Hugging Face, ModelScope, and Baidu Cloud

Released under the MIT License, Unlimited OCR is documented in an accompanying arXiv paper and provides code, model weights, and inference tooling openly for researchers and developers working on document AI.

Repository

Stars
21,911
Forks
2,207
Watchers
21,911
License
MIT
Last Commit
1 month ago
Created
2 months ago