Baidu Releases Unlimited-OCR for One-Shot Long-Horizon Document Parsing
Baidu has open-sourced Unlimited-OCR, a Python-based project designed for one-shot, long-horizon document parsing and optical character recognition (OCR). The tool is capable of parsing entire multi-page documents or even whole books in a single pass while maintaining structural context. Traditional OCR tools often struggle with long-context documents, requiring page-by-page processing that loses structural continuity. Unlimited-OCR addresses this by treating the entire document as a single sequence, which could significantly improve workflows in Document AI and automated document analysis. The project builds upon the DeepSeek-OCR baseline, outperforming it by utilizing ngram-based repetition suppression techniques to prevent repetitive text generation. It supports multi-page PDF parsing by converting pages to images and processing them sequentially using parameters like `no_repeat_ngram_size` and `ngram_window`.
## BACKGROUND
Document AI involves using machine learning and natural language processing to automatically read, understand, and extract information from semi-structured documents like forms, tables, and reports. Long-horizon document parsing extends this by maintaining context and relationships across many pages, rather than treating each page as an isolated image.