--- title: MiniCPM-OCR 1.0 emoji: 🔍 colorFrom: purple colorTo: green sdk: gradio sdk_version: 6.30.0 app_file: app.py short_description: Document image OCR — text, tables, formulas, seals, charts python_version: "3.12" startup_duration_timeout: 30m --- # MiniCPM-OCR 1.0 Demo of **[openbmb/MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0)** — a 1.3B OCR-specialist vision-language model (SigLIP vision encoder + Qwen3.5 language model) built by OpenBMB for text-centric document understanding: text, tables, formulas, seals, charts, and key information extraction, in Chinese and English. Upload a document crop, scan, or photo and pick a task: | Task | Model prompt | Output | | :--- | :--- | :--- | | Text | `Text Recognition:` | plain text | | Table | `Table Recognition:` | OTSL → HTML table | | Formula | `Formula Recognition:` | LaTeX | | Seal | `Seal Recognition:` | seal text | | Chart | `Chart to Table:` | table | | Custom | free-form (e.g. key info extraction) | model text | Notes: - Runs the `MiniCPMOcrForConditionalGeneration` implementation natively in transformers (no remote code executed from the checkpoint repo). - Tables are emitted in [OTSL](https://github.com/UniModal4Reasoning/OTSL) and converted to HTML with the official SDK converter (ported to `otsl_to_html.py`). - The full document-parsing pipeline in the official SDK also uses a PP-DocLayoutV3 layout model to detect regions and reading order; this demo calls the recognition model directly on the image you provide (whole page or crop). ## Example images The bundled example crops come from the [MiniCPM-OCR repo](https://github.com/OpenBMB/MiniCPM-OCR) (Apache-2.0), sourced from [OmniDocBench v1.6](https://huggingface.co/datasets/opendatalab/OmniDocBench): a Putnam 2009 text block, a Putnam 1999 display formula, and a table from Chinese national standard GB 14536.1-1998.