Repository navigation
Releases
MiniCPM-OCR SDK v1.0.5
Support parsing multiple files at once, with each file getting its own result.
-
The parse command line supports passing multiple files or a directory at the same time (top level only, no recursion), and with -o DIR outputs a separate Markdown and JSON for each.
-
--split-images makes each individual image its own separate document instead of pages of the same document; PDFs are always merged by file.
-
The pipeline.image_document_scope configuration option controls the same behavior (collection / file).
-
input.file_paths supports listing a set of input files in a specified order in YAML.
-
assemble_documents_json() returns results grouped by input file, with the overall batch status being Success / Partial / Failed.
-
Page results' metadata adds new source (original file path) and image_id fields.
MiniCPM-OCR SDK v1.0.4
Page output is aligned with the online document parsing API, and adaptive rotation is enabled by default.
-
Online isomorphic results: for each page, an additional pages_json/<image_id>.json is written, with a structure consistent with the single-page response of the online POST /v1/document-parse (metadata.page_index, choices[0].message.content, ocr.blocks, ocr.rotation, usage); minicpmvocr parse --json FILE and assemble_document_json() are added, producing the full result consistent with the online asynchronous task.
-
Unified block statuses: only ok, failed, skipped_no_vlm, and skipped_seal are used; recognition failures and missing crops are uniformly recorded as failed, with the specific reason retained in the run log; when seal recognition is disabled, seal blocks are recorded as skipped_seal.
-
Rotation logging: ocr.rotation is consistent with the online field, including skipping for small images (gated) and unavailable when paddleocr is missing.
-
Adaptive rotation is enabled by default: Quick Start automatically downloads the three Paddle orientation-correction models; when paddleocr is not installed, a warning is logged and orientation correction is skipped instead of raising an error. To disable it, use --set upright.enabled=false; disabling is recommended when reproducing OmniDocBench scores.
-
GIF input is supported.
MiniCPM-OCR SDK v1.0.3
修改BUG:保留识别到的图片块文本并在 Markdown 中关联裁剪后的图片。
MiniCPM-OCR SDK v1.0.2
MiniCPM-OCR SDK 首次发布到 PyPI,提供从 PDF、图片到 Markdown 的文档解析流程,支持正文、表格、公式、图表和印章识别。
- 文档解析:结合版面检测与视觉语言模型识别,按阅读顺序组织结果,支持多页 PDF 合并导出。表格以 HTML 表示,公式以 LaTeX 表示。
- 简化命令行:提供 minicpmvocr parse 命令,内置快速开始配置,支持通过命令行参数或 YAML 调整解析行为。
- 自动准备版面模型:默认检查当前目录下的 models/PP-DocLayoutV3_infer/,模型缺失或不完整时自动下载。
- 并发处理:快速开始配置默认使用 32 个识别请求并发,支持版面检测与识别重叠执行,以及多个识别服务实例。
- 公式后处理:支持行内公式与独立公式的 LaTeX 修复,处理部分括号不匹配、环境缺失等问题。
- 灵活集成:提供 Python API,支持 vLLM、OpenAI 兼容接口、llama.cpp 和 Ollama 后端,并按需加载可选依赖。