Fast, accurate OCR with correctness assessment.
docs: refresh bilingual examples and clarify local SDK privacy
caowanxia123171fe1c73e11
diff --git a/README.md b/README.mdindex 586482c..70785a0 100644--- a/README.md+++ b/README.md@@ -65,21 +65,23 @@ Left to right: original document, detected layout, and rendered Markdown.<p align="center"><a href="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif" alt="English document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>-#### Chinese Documents+<details>+<summary>More English Examples</summary>-<p align="center"><a href="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif" alt="Chinese document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>+Original documents and parsed results, side by side.+<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-english-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-english-cases.png" alt="English examples comparing inputs and results: handwriting, historical and scanned documents, newspapers, financial statements, and key information extraction." width="100%"></a></p>-<details>-<summary>More Examples</summary>+</details>-Original documents and parsed results, side by side.+#### Chinese Documents-**English Documents**+<p align="center"><a href="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif" alt="Chinese document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>-<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-english-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-english-cases.png" alt="English examples comparing inputs and results: handwriting, historical and scanned documents, newspapers, financial statements, and key information extraction." width="100%"></a></p>+<details>+<summary>More Chinese Examples</summary>-**Chinese Documents**+Original documents and parsed results, side by side.<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png" alt="Chinese examples comparing inputs and results: handwritten notes, complex formulas, newspapers, financial statements, stamped documents, illustrations, and key information extraction." width="100%"></a></p>diff --git a/README_en.md b/README_en.mdindex b1e3f30..dd5e4e0 100644--- a/README_en.md+++ b/README_en.md@@ -1,197 +1,3 @@-<div align="center">+# MiniCPM-OCR-<img src="./assets/minicpm-ocr/release-hero.svg" alt="MiniCPM-OCR: fast, accurate document parsing into text, tables, and formulas, with a lightning arrow connecting documents to structured results; a decision model helps identify regions that need review (illustration)." width="100%">--<p align="center"><strong>MiniCPM-OCR · Fast, accurate parsing for real-world documents.</strong></p>--<p align="center">- <a href="./docs/minicpm_ocr_1dot0_en.md"><strong>MiniCPM-OCR 1.0</strong></a> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0" title="Hugging Face"><img src="./assets/minicpm-ocr/huggingface_logo-noborder.svg" width="19" height="18" alt="Hugging Face"></a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0" title="ModelScope"><img src="./assets/minicpm-ocr/modelscope_logo_padded.svg" width="25" height="14" alt="ModelScope"></a>-  - <a href="./docs/minicpm_ocr_jev_en.md"><strong>MiniCPM-OCR Jev</strong></a> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev" title="Hugging Face"><img src="./assets/minicpm-ocr/huggingface_logo-noborder.svg" width="19" height="18" alt="Hugging Face"></a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev" title="ModelScope"><img src="./assets/minicpm-ocr/modelscope_logo_padded.svg" width="25" height="14" alt="ModelScope"></a>-</p>--<p align="center"><sub>- <a href="#quick-start">Get Started</a> · - <a href="#model-weights">Model Weights</a> · - <a href="https://platform.modelbest.cn/console/playground/document-parse">Online Demo (China)</a> · - <a href="https://platform.modelbest.ai/console/playground/document-parse">Online Demo (Global)</a>- | English · <a href="./README_zh.md">中文</a>-</sub></p>--</div>--<a id="overview"></a>--**MiniCPM-OCR** is a family of models for efficient document parsing and text recognition. **MiniCPM-OCR 1.0** parses Chinese and English documents and PDFs, balancing quality and efficiency across challenging inputs such as scans, photographs, curved pages, and recaptured documents. **MiniCPM-OCR Jev** evaluates OCR results at the region level, distinguishing problematic regions from reliable ones. It works with different parsing models to help users locate content that needs review.--## MiniCPM-OCR 1.0--**MiniCPM-OCR 1.0** (1.3B) is the first OCR-specific model in the [MiniCPM-V/o](https://github.com/openbmb/MiniCPM-V) family. It focuses on text-centric document understanding, covering text, tables, formulas, charts, seals, and structured information extraction. Its key features include:--- 🏆 **SOTA document parsing**: MiniCPM-OCR 1.0 achieves a **SOTA score of 93.68 on Real5-OmniDocBench**, a benchmark for real-world document parsing, and demonstrates leading parsing capabilities on OmniDocBench v1.6, Wild-OmniDocBench, and olmOCR-Bench. It supports Chinese and English documents and PDFs, handling both standard documents and challenging capture conditions, including scans, curved pages, photographs, skewed pages, and recaptured documents.-- ⚡ **Efficient inference.** With DSpark decoding acceleration ([**DSpark-BF16**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark), [**DSpark-GGUF**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf)), MiniCPM-OCR 1.0 improves **end-to-end processing efficiency by 55%**. Its throughput is approximately **1.49×** that of PaddleOCR-VL-1.6 and **3.62×** that of MinerU2.5 Pro, reducing the time needed for large-scale document parsing.-- 🔍 **General recognition and information extraction**: MiniCPM-OCR 1.0 achieves a **SOTA score of 54.7 on OCRBench v2**, demonstrating strong general OCR capabilities. It **also supports key information extraction (KIE)**, extracting relevant document content for downstream information management and automated processing.-- 🛠️ **Easy deployment and development**: MiniCPM-OCR 1.0 supports **vLLM, SGLang, llama.cpp, and Ollama from day one**, with multiple chip platforms and quantized versions available at release. It **supports further fine-tuning** and provides a **pip SDK, a full-featured API, and established agent workflows** for application integration and customization. Online demos are available for [China](https://platform.modelbest.cn/console/playground/document-parse) and [global](https://platform.modelbest.ai/console/playground/document-parse) users.--### SOTA Performance, Higher Throughput--Among the open-source OCR models shown below, MiniCPM-OCR 1.0 achieves a parsing throughput of 1.2 pages/s and the highest equally weighted average score across four document parsing benchmarks: OmniDocBench v1.6, Real5-OmniDocBench, Wild-OmniDocBench, and olmOCR-Bench.--<p align="center"><a href="./assets/minicpm-ocr/efficiency-performance-en.png"><img src="./assets/minicpm-ocr/efficiency-performance-en.png" alt="Throughput and parsing quality of open-source OCR models. The horizontal axis shows throughput in pages per second on a logarithmic scale; the vertical axis shows the equally weighted average score across four document parsing benchmarks." width="90%"></a></p>--<sub>The average score weights OmniDocBench v1.6, Real5-OmniDocBench, Wild-OmniDocBench, and olmOCR-Bench equally. The horizontal axis shows throughput in pages per second on a logarithmic scale. See the [reproduction guide](./docs/benchmark_reproduction_en.md) for test settings and reproduction details, and the [model guide throughput evaluation](./docs/minicpm_ocr_1dot0_en.md#throughput) for each model's throughput.</sub>--<a id="ocr-benchmark"></a>--### Benchmark Comparisons--<p align="center"><a href="./assets/minicpm-ocr/benchmark-radar.png"><img src="./assets/minicpm-ocr/benchmark-radar.png" alt="Radar chart comparing MiniCPM-OCR 1.0 with other OCR models across six benchmarks; some values remain to be confirmed." width="80%"></a></p>--<details>-<summary>View complete MiniCPM-OCR 1.0 evaluation results</summary>--<p align="center"><a href="./assets/minicpm-ocr/ocr-benchmarks.png"><img src="./assets/minicpm-ocr/ocr-benchmarks.png" alt="Detailed OCR model results on OmniDocBench v1.6, Real5, Wild, olmOCR-Bench, CHAOS-Bench, and OCRBench v2." width="100%"></a></p>--</details>--See the [OCR model guide](./docs/minicpm_ocr_1dot0_en.md#evaluation) for per-benchmark bar charts and throughput details.--### Examples--Left to right: original document, detected layout, and rendered Markdown.--#### English Documents--<p align="center"><a href="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif" alt="English document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>--#### Chinese Documents--<p align="center"><a href="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif" alt="Chinese document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>---<details>-<summary>More Examples</summary>--Original documents and parsed results, side by side.--**English Documents**--<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-english-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-english-cases.png" alt="English examples comparing inputs and results: handwriting, historical and scanned documents, newspapers, financial statements, and key information extraction." width="100%"></a></p>--**Chinese Documents**--<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png" alt="Chinese examples comparing inputs and results: handwritten notes, complex formulas, newspapers, financial statements, stamped documents, illustrations, and key information extraction." width="100%"></a></p>--</details>--## MiniCPM-OCR Jev--**MiniCPM-OCR Jev** is an **OCR quality decision model** for text, formulas, and tables. Given an image and its corresponding OCR result, it returns a **quality score from 0 to 1** to help select reliable results and locate content that needs review.--- 🛡️ **Strong performance in a small model**: With only 2B parameters, MiniCPM-OCR Jev achieves an AUROC (×100) of 93.6 on [JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench), **outperforming JEV-35B-A3B (90.1)** and approaching Qwen3.5-397B-A17B (93.8).-- 🧩 **Consistent generalization**: Across parsing results from MiniCPM-OCR 1.0, GLM-OCR, PaddleOCR-VL-1.6, and Xiaomi-OCR-0, its AUROC (×100) ranges from **91.9 to 93.4**.--<a id="jev-benchmark"></a>--<a id="评测表现"></a>--### Evaluation Results--The table below reports overall and per-category AUROC (×100) on JevOCRBench. Higher values indicate better discrimination between correct and incorrect parsing results.--<p align="center"><a href="./assets/minicpm-ocr/jev-benchmark-score-table.png"><img src="./assets/minicpm-ocr/jev-benchmark-score-table.png" alt="Overall, text, formula, and table AUROC results on JevOCRBench, highlighting MiniCPM-OCR Jev." width="100%"></a></p>--<a id="判别力跨ocr模型泛化"></a>-<a id="使用场景"></a>-<a id="用法一块级直通省掉大部分人工核验"></a>-<a id="用法二多专家聚合扩展-ocr-的能力边界"></a>--### Review-Free Accuracy--Accuracy at different review-free rates across three document types.--<p align="center"><a href="./assets/minicpm-ocr/review-free-en.png"><img src="./assets/minicpm-ocr/review-free-en.png" alt="Accuracy versus review-free rate for legal documents, financial receipts, and complex documents." width="100%"></a></p>--### Decision Examples--Jev scores for text, formula, and table recognition.--<p align="center"><a href="./assets/minicpm-ocr/jev-case-en.png"><img src="./assets/minicpm-ocr/jev-case-en.png" alt="Original images, two OCR candidates, and their Jev scores for text, formulas, and tables." width="100%"></a></p>--See the [model guide](./docs/minicpm_ocr_jev_en.md), [use cases](./docs/minicpm_ocr_jev_en.md#use-cases), [cross-model evaluation](./docs/minicpm_ocr_jev_en.md#validated-parsers), and [decision examples](./docs/minicpm_ocr_jev_en.md#examples).--<a id="quick-start"></a>--## Using MiniCPM-OCR--Choose how to integrate MiniCPM-OCR 1.0 and MiniCPM-OCR Jev:--<a id="使用-agent-skill-部署推荐"></a>--### Skill--Ask a coding agent to follow the MiniCPM-OCR 1.0 [skill](./docs/SKILL_en.md) to set up the environment, download models, and parse your first document. Send the following instruction to the agent:--```text-Read and execute https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/SKILL_en.md-```--If you have already cloned this repository, you can use `./docs/SKILL_en.md` directly.--### API--Use the API to access MiniCPM-OCR 1.0 recognition and MiniCPM-OCR Jev quality scoring.--[MiniCPM-OCR 1.0 API example](./docs/minicpm_ocr_api_en.md)  ·  [MiniCPM-OCR Jev API example](./docs/minicpm_ocr_jev_api_en.md) (coming soon)--<a id="手动部署"></a>--<a id="本地部署"></a>--### Local Deployment--Run the models on your own hardware: MiniCPM-OCR 1.0 parses PDFs and images into Markdown or JSON, while MiniCPM-OCR Jev scores the parsing results.--[MiniCPM-OCR 1.0 deployment tutorial](./docs/minicpmvocr_tutorial_en.md) · [MiniCPM-OCR Jev deployment tutorial](./docs/minicpm_ocr_jev_tutorial_en.md)--<a id="模型微调"></a>--### Fine-Tuning--| Model | Fine-tuning tutorial |-| :--- | :--- |-| MiniCPM-OCR 1.0 | [LLaMA-Factory](./docs/llamafactory_minicpm_ocr_french_en.md) · [Swift](./docs/swift_minicpm_ocr_french_en.md) |-| MiniCPM-OCR Jev | [Swift](./docs/finetune_jev_en.md) |--<a id="resources"></a>-<a id="model-weights"></a>--## Model Weights--<table border="1" cellspacing="0" cellpadding="8">-<tr>-<td nowrap>Model</td>-<td width="360">Description</td>-<td nowrap width="170">Main Model Weights</td>-<td nowrap width="150">DSpark Heads</td>-</tr>-<tr>-<td nowrap>MiniCPM‑OCR <strong>1.0</strong></td>-<td width="360">Efficient document parsing and text recognition for Chinese and English documents and PDFs, balancing quality and speed across scans, photographs, curved pages, and recaptured documents.</td>-<td nowrap><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-AWQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-AWQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>AWQ</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-GPTQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-GPTQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GPTQ</strong></td>-<td nowrap><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong></td>-</tr>-<tr>-<td nowrap>MiniCPM‑OCR <strong>Jev</strong></td>-<td width="360">An OCR quality decision model for text, formulas, and tables. Given an image and its OCR result, it returns a quality score from 0 to 1.</td>-<td align="center" valign="middle" colspan="2"><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-AWQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-AWQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>AWQ</strong> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-GPTQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-GPTQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GPTQ</strong></td>-</tr>-</table>--## 💡 FAQ and Troubleshooting--See the [FAQ](./docs/faq_en.md) for common questions about installation, model downloads, GPU memory, input formats, and unexpected outputs.--## 📄 License--The entire project is released under the [Apache License 2.0](./LICENSE), including code, documentation, and model weights for MiniCPM-OCR 1.0 and MiniCPM-OCR Jev.+The English documentation is now the [default README](./README.md). The complete Chinese version is available in [中文](./README_zh.md).diff --git a/README_zh.md b/README_zh.mdindex 4d237f5..f0a9b84 100644--- a/README_zh.md+++ b/README_zh.md@@ -61,24 +61,27 @@从左至右依次为原始文档、检测到的版面和渲染后的 Markdown。-#### 英文文档--<p align="center"><a href="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif" alt="英文文档解析动画:原始文档、检测到的版面和渲染后的 Markdown。" width="100%"></a></p>-#### 中文文档<p align="center"><a href="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif" alt="中文文档解析动画:原始文档、检测到的版面和渲染后的 Markdown。" width="100%"></a></p><details>-<summary>更多案例</summary>+<summary>更多中文案例</summary>原图与解析结果对照。-**中文文档**-<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png" alt="中文案例的原图与解析结果:手写笔记、复杂公式、报纸、财务报表、盖印文件、插图与关键信息抽取。" width="100%"></a></p>-**英文文档**+</details>++#### 英文文档++<p align="center"><a href="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif" alt="英文文档解析动画:原始文档、检测到的版面和渲染后的 Markdown。" width="100%"></a></p>++<details>+<summary>更多英文案例</summary>++原图与解析结果对照。<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-english-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-english-cases.png" alt="英文案例的原图与解析结果:手写笔记、历史文献、扫描文档、报纸、财务报表与关键信息抽取。" width="100%"></a></p>diff --git a/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif b/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gifindex 7b97530..91a59f8 100644Binary files a/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif and b/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif differdiff --git a/assets/minicpm-ocr/minicpm-english-examples-3-column.gif b/assets/minicpm-ocr/minicpm-english-examples-3-column.gifindex 452b225..d14bb22 100644Binary files a/assets/minicpm-ocr/minicpm-english-examples-3-column.gif and b/assets/minicpm-ocr/minicpm-english-examples-3-column.gif differdiff --git a/docs/benchmark_reproduction_en.md b/docs/benchmark_reproduction_en.mdindex 75e84ed..1999a5f 100644--- a/docs/benchmark_reproduction_en.md+++ b/docs/benchmark_reproduction_en.md@@ -1,10 +1,10 @@-# MiniCPM-OCR 1.0 Reproduction Guide+# Reproducing Performance and Efficiency Evaluation Results[← Back to README](../README.md) · [Model guide](./minicpm_ocr_1dot0_en.md)This document summarizes the inference settings, scoring methods, and official sources for evaluating MiniCPM-OCR 1.0, along with the test settings and deployment guides for the parsing-efficiency comparison. Complete evaluation scripts, exact versions, and timing boundaries remain to be added.-## Evaluation Reproduction+## Performance Reproduction### Evaluation Settingsdiff --git a/docs/benchmark_reproduction_zh.md b/docs/benchmark_reproduction_zh.mdindex 89daf9c..1094fc2 100644--- a/docs/benchmark_reproduction_zh.md+++ b/docs/benchmark_reproduction_zh.md@@ -1,10 +1,10 @@-# MiniCPM-OCR 1.0 复现文档+# 复现性能和效率评测结果-[← 返回 README](../README.md) · [模型指南](./minicpm_ocr_1dot0_zh.md)+[← 返回 README](../README_zh.md) · [模型指南](./minicpm_ocr_1dot0_zh.md)本文汇总 MiniCPM-OCR 1.0 的评测推理配置、评分方法与官方来源,以及解析效率对比的测试设置与部署入口。完整评测脚本、精确版本和计时范围待补充。-## 效果复现+## 性能复现### 评测配置六项评测中使用相同的采样参数:diff --git a/docs/minicpmvocr_tutorial.md b/docs/minicpmvocr_tutorial.mdindex 1f31512..a61ca1b 100644--- a/docs/minicpmvocr_tutorial.md+++ b/docs/minicpmvocr_tutorial.md@@ -6,6 +6,8 @@ MiniCPM-OCR 是一个文档解析模型:输入 PDF 或图片,输出 Markdown运行时分为两部分:SDK 负责版面检测、切块和结果拼接;推理服务(本文使用 vLLM)运行识别模型,并通过 DSpark 投机解码加速,需同时准备主模型和同版本的草稿模型。两者使用独立的 Python 环境,分别在两个终端中运行。+> **数据隐私**:按本教程在本地部署 SDK 和推理服务后,文档处理与模型推理均在本地完成,无需调用云端 OCR 服务,也无需将原始文档、图片或解析结果上传至云端,有助于保障数据隐私。安装依赖和首次下载模型时需要联网。+---## 环境要求diff --git a/docs/minicpmvocr_tutorial_en.md b/docs/minicpmvocr_tutorial_en.mdindex 54cf232..9c46d3a 100644--- a/docs/minicpmvocr_tutorial_en.md+++ b/docs/minicpmvocr_tutorial_en.md@@ -6,6 +6,8 @@ MiniCPM-OCR parses PDFs and images into Markdown, including body text, tables (HThe runtime has two parts: the SDK handles layout detection, cropping, and result assembly; the inference service (vLLM in this tutorial) runs the recognition model and accelerates inference through DSpark speculative decoding, which requires both the main model and a draft model from the same release. The two parts use separate Python environments and run in separate terminals.+> **Data privacy**: When you deploy the SDK and inference service locally as described in this tutorial, document processing and model inference take place locally. No cloud OCR service is required, and original documents, images, and parsing results do not need to be uploaded to the cloud, helping protect data privacy. Installing dependencies and downloading models for the first time require an internet connection.+---## Requirementsdiff --git a/sdk/README.pypi.md b/sdk/README.pypi.mdindex ce5c8a2..5ca4976 100644--- a/sdk/README.pypi.md+++ b/sdk/README.pypi.md@@ -12,14 +12,14 @@<a href="https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpm_ocr_jev_en.md"><strong>MiniCPM-OCR Jev</strong></a> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev" title="Hugging Face"><img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/huggingface_logo-noborder.svg" width="19" height="18" alt="Hugging Face"></a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev" title="ModelScope"><img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/modelscope_logo_padded.svg" width="25" height="14" alt="ModelScope"></a></p>-<p align="center"><sub>+<p align="center"><a href="https://github.com/OpenBMB/MiniCPM-OCR/blob/main/README.md#quick-start">Get Started</a> · <a href="https://github.com/OpenBMB/MiniCPM-OCR/blob/main/README.md#model-weights">Model Weights</a> · <a href="https://github.com/OpenBMB/MiniCPM-OCR/blob/main/README.md#api">API</a> · <a href="https://github.com/OpenBMB/MiniCPM-OCR/blob/main/README.md#skill">Skill</a> · Online Demo (<a href="https://platform.modelbest.cn/console/playground/document-parse">CN</a> / <a href="https://platform.modelbest.ai/console/playground/document-parse">Global</a>) | English · <a href="https://github.com/OpenBMB/MiniCPM-OCR/blob/main/README_zh.md">中文</a>-</sub></p>+</p></div>@@ -67,21 +67,23 @@ Left to right: original document, detected layout, and rendered Markdown.<p align="center"><a href="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-english-examples-3-column.gif"><img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-english-examples-3-column.gif" alt="English document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>-#### Chinese Documents+<details>+<summary>More English Examples</summary>-<p align="center"><a href="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif"><img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif" alt="Chinese document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>+Original documents and parsed results, side by side.+<p align="center"><a href="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-ocr-english-cases.png"><img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-ocr-english-cases.png" alt="English examples comparing inputs and results: handwriting, historical and scanned documents, newspapers, financial statements, and key information extraction." width="100%"></a></p>-<details>-<summary>More Examples</summary>+</details>-Original documents and parsed results, side by side.+#### Chinese Documents-**English Documents**+<p align="center"><a href="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif"><img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif" alt="Chinese document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>-<p align="center"><a href="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-ocr-english-cases.png"><img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-ocr-english-cases.png" alt="English examples comparing inputs and results: handwriting, historical and scanned documents, newspapers, financial statements, and key information extraction." width="100%"></a></p>+<details>+<summary>More Chinese Examples</summary>-**Chinese Documents**+Original documents and parsed results, side by side.<p align="center"><a href="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-ocr-chinese-cases.png"><img src="https://raw.githubusercontent.com/OpenBMB/MiniCPM-OCR/main/assets/minicpm-ocr/minicpm-ocr-chinese-cases.png" alt="Chinese examples comparing inputs and results: handwritten notes, complex formulas, newspapers, financial statements, stamped documents, illustrations, and key information extraction." width="100%"></a></p>