欢迎光临
我们一直在努力

小红书开源 dots.mocr:3B 参数多语言文档版面解析 VLM,图表→SVG 代码,网页/场景文字全搞定,olmOCR-Bench 同级第一,vLLM 一键部署

小红书开源 dots.mocr:3B 参数多语言文档版面解析 VLM,图表→SVG 代码,网页/场景文字全搞定,olmOCR-Bench 同级第一,vLLM 一键部署

💡 文档 OCR 还在用 PaddleOCR + 专用表格模型 + 公式模型拼拼凑凑?小红书 HiLab 说:一个 3B VLM 全搞定。dots.mocr(原 dots.ocr)—— 多语言文档版面解析视觉语言模型,单模型完成版面检测+文字识别+结构化输出;图表/图形直接转 SVG 代码;网页截图解析;场景文字识别;11种版面元素分类;olmOCR-Bench 平均 83.9 分同级 SOTA;OmniDocBench Edit Distance 0.031 全场最低;2篇 arXiv 论文;vLLM 0.11.0 官方集成;HuggingFace 模型开源;在线 Demo 可试。

在这里插入图片描述

📌 目录

  • 1. dots.mocr 是什么?
  • 2. 版本演进
  • 3. 核心能力
  • 4. 性能基准
  • 5. 安装部署
  • 6. 推理使用
  • 7. SVG 图表解析
  • 8. 多场景展示
  • 9. 竞品对比
  • 10. 优缺点与使用建议
  • 11. 总结

1. dots.mocr 是什么?

dots.mocr(原 dots.ocr)是小红书 HiLab 出品的多语言文档版面解析视觉语言模型,基于 3B 参数 LLM,用单一 VLM 完成文档理解的全流程。

  • 🔗 项目地址:https://github.com/rednote-hilab/dots.ocr(已更名 dots.mocr)
  • 🤗 模型:dots.mocr · dots.mocr-svg
  • 📄 论文:arXiv:2512.02498 · arXiv:2603.13032
  • 🏢 出品:小红书 HiLab(rednote-hilab)
  • 🎮 在线 Demo:https://dotsocr.xiaohongshu.com
  • 📦 参数量:3B
  • 📜 许可证:开源

一句话总结

dots.mocr = 小红书开源多语言文档版面解析 VLM
= 3B 参数,单模型搞定一切
= 版面检测 + 文字识别 + 结构化输出
= 图表→SVG 代码(dots.mocr-svg)
= 网页截图解析
= 场景文字识别
= 11种版面元素分类
= olmOCR-Bench 同级 SOTA
= OmniDocBench Edit Distance 0.031 全场最低
= vLLM 0.11.0 官方集成
= 2篇 arXiv 论文


2. 版本演进

版本时间里程碑
dots.ocr 2025.07.30 首发发布,1.7B LLM 多语言文档解析,SOTA 性能
dots.ocr.base 2025.10.31 基础 VLM,专注 OCR 任务,dots.ocr 的底座模型
dots.mocr 2026.03.19 全面升级更名,3B 参数,SVG 图表解析 + 网页解析 + 场景识别

演进脉络:

dots.ocr (1.7B) → 基础多语言文档解析
dots.ocr.base → 专注 OCR 底座
dots.mocr (3B) → 全面升级 + SVG + 网页 + 场景 + 更名

趋势:能力越来越强 → 场景越来越广 → 从纯 OCR 到通用文档理解


3. 核心能力

3.1 文档版面解析

11 种版面元素分类:

📝 Text → 正文文本(Markdown 输出)
📰 Title → 标题(Markdown 输出)
📊 Section-header → 章节标题(Markdown 输出)
📋 List-item → 列表项(Markdown 输出)
📸 Caption → 图表说明(Markdown 输出)
🔢 Footnote → 脚注(Markdown 输出)
📐 Formula → 数学公式(LaTeX 输出)
📊 Table → 表格(HTML 输出)
🖼️ Picture → 图片(仅检测,不提取文字)
📄 Page-header → 页眉(可过滤不输出)
📄 Page-footer → 页脚(可过滤不输出)

→ 一个模型搞定检测 + 识别 + 格式化
→ 无需拼接多个专用模型

3.2 图表→SVG 代码

图表/图形 → 直接生成 SVG 代码

✅ 折线图/柱状图/饼图 → SVG
✅ 流程图/示意图 → SVG
✅ 化学结构式 → SVG
✅ Logo/图标 → SVG
✅ 设计稿 → SVG

→ 视觉语言首次统一转化为可编辑矢量代码
→ dots.mocr-svg 专版强化 SVG 能力

3.3 网页截图解析

网页截图 → 结构化解析

✅ 识别网页布局结构
✅ 提取文本内容
✅ 还原阅读顺序
✅ 支持 UI 自动化场景

3.4 场景文字识别

自然场景文字识别(Scene Text Spotting)

✅ 招牌/广告牌文字
✅ 产品标签
✅ 手写体
✅ 多语言场景文字

3.5 多语言支持

支持几乎所有人类文字:

✅ 中文(简体/繁体)
✅ 英文
✅ 俄文
✅ 藏文
✅ 卡纳达文(Kannada)
✅ 荷兰文
✅ 更多语言持续扩展

→ "Designed for universal accessibility"


4. 性能基准

4.1 综合排名(Elo Score)

模型参数olmOCR-BenchOmniDocBenchXDocParse平均
MonkeyOCR-pro-3B 3B 895.0 811.3 637.1 781.1
GLM-OCR 0.9B 884.2 972.6 820.7 892.5
PaddleOCR-VL-1.5 0.9B 897.3 997.9 866.4 920.5
HuanyuanOCR 0.9B 997.6 1003.9 951.1 984.2
dots.ocr 3B 1041.1 1027.2 1190.3 1086.2
dots.mocr 3B 1104.4 1059.0 1210.7 1124.7
Gemini 3 Pro 1180.4 1128.0 1323.7 1210.7

→ dots.mocr 在 3B 级别 SOTA
→ 超越 PaddleOCR-VL-1.5、GLM-OCR、HuanyuanOCR
→ 仅次于 Gemini 3 Pro(通用大模型)
→ XDocParse 1210.7 分,远超同级竞品

4.2 olmOCR-Bench 细分

模型ArXiv旧扫描数学表格旧扫描页眉页脚多栏长微小文字基础总体
Mistral OCR API 77.2 67.5 60.6 29.3 93.6 71.3 77.1 72.0
olmOCR v0.4.0 83.0 82.3 84.9 47.7 96.1 83.7 81.9 82.4
dots.ocr 82.1 64.2 88.3 40.9 94.1 82.4 81.2 79.1
dots.mocr 85.9 85.5 90.7 48.2 94.0 85.3 81.6 83.9

→ dots.mocr 在数学(85.5)和表格(90.7)上大幅领先
→ 旧扫描数学从 64.2 → 85.5,提升 33%
→ 表格从 88.3 → 90.7,稳居前列

4.3 OmniDocBench Edit Distance(越低越好)

模型参数Text Edit↓Read Order Edit↓pdf-parse-bench
Gemini-2.5 Pro 0.075 0.097 9.06
Deepseek-OCR 3B 0.073 0.086 8.26
PaddleOCR-VL 0.9B 0.035 0.043 9.51
dots.ocr 3B 0.048 0.053 9.29
dots.mocr 3B 0.031 0.029 9.54

→ dots.mocr Edit Distance 0.031 / 0.029 全场最低
→ 超越所有通用 VLM(Gemini-2.5 Pro、Qwen3-VL-235B)
→ 超越所有专用 OCR VLM(Deepseek-OCR、PaddleOCR-VL)
→ 文字准确度和阅读顺序均为最佳

4.4 SVG 图表解析

模型UniSVGChartMimicDesign2CodeGenExamSciGenChemDraw综合得分
OCRVerse 0.632 0.852 0.763 0.799 0.881
Gemini 3 Pro 0.563 0.850 0.735 0.788 0.760 0.756 0.839
dots.mocr 0.850 0.923 0.894 0.772 0.801 0.664 0.790
dots.mocr-svg 0.860 0.931 0.902 0.905 0.834 0.800 0.901

→ dots.mocr-svg 综合得分 0.901,超越 Gemini 3 Pro (0.839)
→ ChartMimic 0.931、Design2Code 0.902 领先
→ 图表→SVG 的最佳开源模型


5. 安装部署

方式 1:源码安装

# 1. 创建 conda 环境
conda create -n dots_mocr python=3.12
conda activate dots_mocr

# 2. 克隆源码
git clone https://github.com/rednote-hilab/dots.mocr.git
cd dots.mocr

# 3. 安装 PyTorch(根据 CUDA 版本选择)
# pip install torch==2.7.0 torchvision==0.22.0 torchaudio==2.7.0 \\
# –index-url https://download.pytorch.org/whl/cu128

# 4. 安装 flash-attn(加速推理)
# pip install flash-attn==2.8.0.post2

# 5. 安装 dots.mocr
pip install -e .

# 6. 下载模型权重
python3 tools/download_model.py
# 或从 ModelScope 下载
python3 tools/download_model.py –type modelscope

方式 2:Docker 部署

# 使用官方 Docker 镜像
docker pull rednotehilab/dots.ocr

# 如果源码安装遇到问题,Docker 是更简单的选择

⚠️ 注意事项

模型保存路径不要包含句号!
❌ ./weights/dots.mocr → 会有问题
✅ ./weights/DotsMOCR → 正常

这是 Transformers 集成的临时限制,后续会修复


6. 推理使用

vLLM 部署(推荐)

# 启动 vLLM 模型服务(vLLM ≥ 0.11.0 官方集成)
# dots.mocr
CUDA_VISIBLE_DEVICES=0 vllm serve rednote-hilab/dots.mocr \\
–tensor-parallel-size 1 \\
–gpu-memory-utilization 0.9 \\
–chat-template-content-format string \\
–served-model-name model \\
–trust-remote-code

# dots.mocr-svg(SVG 增强版)
CUDA_VISIBLE_DEVICES=0 vllm serve rednote-hilab/dots.mocr-svg \\
–tensor-parallel-size 1 \\
–gpu-memory-utilization 0.9 \\
–chat-template-content-format string \\
–served-model-name model \\
–trust-remote-code

vLLM API 调用

# 文档版面解析(全量)
python3 ./demo/demo_vllm.py –prompt_mode prompt_layout_all_en

# 网页截图解析
python3 ./demo/demo_vllm.py \\
–prompt_mode prompt_web_parsing \\
–image_path ./assets/showcase/origin/webpage_1.png

# 场景文字识别
python3 ./demo/demo_vllm.py \\
–prompt_mode prompt_scene_spotting \\
–image_path ./assets/showcase/origin/scene_1.jpg

# 图表→SVG
python3 ./demo/demo_vllm_svg.py –prompt_mode prompt_image_to_svg

# 通用问答
python3 ./demo/demo_vllm_general.py

HuggingFace Transformers 推理

import torch
from transformers import AutoModelForCausalLM, AutoProcessor
from qwen_vl_utils import process_vision_info

model_path = "./weights/DotsMOCR"
model = AutoModelForCausalLM.from_pretrained(
model_path,
attn_formation="flash_attention_2",
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)

image_path = "demo/demo_image1.jpg"
prompt = """Please output the layout information from the PDF image, including
each layout element's bbox, its category, and the corresponding text content.

1. Bbox format: [x1, y1, x2, y2]
2. Layout Categories: ['Caption', 'Footnote', 'Formula', 'List-item',
'Page-footer', 'Page-header', 'Picture', 'Section-header',
'Table', 'Text', 'Title']
3. Text Extraction & Formatting Rules:
– Picture: omit text
– Formula: LaTeX format
– Table: HTML format
– Others: Markdown format
4. Constraints: original text, no translation, sorted by reading order
5. Output: single JSON object"""

messages = [{
"role": "user",
"content": [
{"type": "image", "image": image_path},
{"type": "text", "text": prompt}
]
}]

text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(text=[text], images=image_inputs, videos=video_inputs,
padding=True, return_tensors="pt").to("cuda")

generated_ids = model.generate(**inputs, max_new_tokens=24000)
output_text = processor.batch_decode(
[out[len(inp):] for inp, out in zip(inputs.input_ids, generated_ids)],
skip_special_tokens=True
)
print(output_text)

一键解析命令

# 基于 vLLM 服务器,一键解析图片或 PDF

# 全量版面解析(检测+识别)
python3 dots_mocr/parser.py demo/demo_image1.jpg
python3 dots_mocr/parser.py demo/demo_pdf1.pdf –num_thread 64

# 仅版面检测
python3 dots_mocr/parser.py demo/demo_image1.jpg –prompt prompt_layout_only_en

# 仅文字识别(过滤页眉页脚)
python3 dots_mocr/parser.py demo/demo_image1.jpg –prompt prompt_ocr

# 使用 Transformers(加 –use_hf true)
python3 dots_mocr/parser.py demo/demo_image1.jpg –use_hf true

输出格式

解析一张图片/一页 PDF,输出三份文件:

1. demo_image1.json → 结构化版面数据(bbox + 类别 + 文字)
2. demo_image1.md → Markdown 文件(所有单元格文字拼接)
3. demo_image1.jpg → 版面可视化(检测框绘制在原图上)

兼容模式:
demo_image1_nohf.md → 去除页眉页脚的 Markdown(兼容 olmOCR-Bench 等)


7. SVG 图表解析

为什么 SVG?

传统 OCR 处理图表:
图片 → 识别为图片 → 不可编辑 → 不可检索 → 不可复用

dots.mocr 处理图表:
图片 → 解析为 SVG 代码 → 可编辑 → 可检索 → 可复用

优势:
✅ 矢量化,无损缩放
✅ 可编辑,修改颜色/字体/布局
✅ 可检索,文字内容可全文搜索
✅ 可复用,直接嵌入网页/文档
✅ 体积小,比位图小 10-100 倍

dots.mocr vs dots.mocr-svg

模型SVG 综合得分适用场景
dots.mocr 0.790 文档解析为主,SVG 为辅
dots.mocr-svg 0.901 SVG 图表解析为主,强化版

建议:
– 日常文档 OCR → dots.mocr
– 大量图表/设计稿 → dots.mocr-svg
– 两者都用 vLLM 一键部署


8. 多场景展示

文档版面解析

支持场景:
✅ 学术论文(ArXiv) → 公式/表格/多栏/页眉页脚
✅ 历史扫描件 → 旧文档/手写体/低质量扫描
✅ 多栏排版 → 自动识别阅读顺序
✅ 复杂表格 → HTML 格式输出
✅ 数学公式 → LaTeX 格式输出
✅ 多语言文档 → 中文/英文/俄文/藏文/…

网页截图解析

场景:
✅ UI 自动化测试
✅ 网页内容提取
✅ 设计稿还原
✅ 无障碍访问

场景文字识别

场景:
✅ 街景招牌
✅ 产品标签
✅ 名片识别
✅ 票据信息提取


9. 竞品对比

对比维度dots.mocrolmOCRPaddleOCR-VLMistral OCRMinerU
出品方 小红书 AI2 PaddlePaddle Mistral OpenDataLab
参数量 3B 7B 0.9B API 1.2B
模型类型 VLM VLM VLM API Pipeline
开源
olmOCR-Bench 83.9 82.4 80.0 72.0 75.2
OmniDocBench Edit↓ 0.031 0.035 0.164 0.047
SVG 图表 ✅ (0.901)
网页解析
场景文字
多语言
vLLM 集成 ✅ 0.11.0
部署方式 vLLM/HF/Docker pip/Docker pip API pip/Docker
公式识别 ✅ LaTeX ✅ LaTeX ✅ LaTeX ✅ LaTeX
表格识别 ✅ HTML ✅ HTML ✅ HTML ✅ HTML

dots.mocr 独特优势

1. SVG 图表解析 → 唯一能将图表转为 SVG 代码的开源 OCR 模型
2. 网页解析 → 独有的网页截图结构化解析能力
3. 场景文字 → 文档+场景全场景覆盖
4. OmniDocBench SOTA → Edit Distance 全场最低(0.031/0.029)
5. vLLM 官方集成 → 0.11.0 原生支持,生产级部署
6. 小红书出品 → 商业级验证,大规模实际使用
7. 双模型策略 → dots.mocr(文档)+ dots.mocr-svg(图表)灵活选择


10. 优缺点与使用建议

✅ 优点

维度评分说明
综合性能 ⭐⭐⭐⭐⭐ 3B 级 SOTA,多个基准第一
SVG 解析 ⭐⭐⭐⭐⭐ 开源唯一,综合得分 0.901
多场景 ⭐⭐⭐⭐⭐ 文档+网页+场景文字+图表全覆盖
多语言 ⭐⭐⭐⭐⭐ 几乎全人类文字
部署便捷 ⭐⭐⭐⭐⭐ vLLM 一键部署,Docker 可选
输出格式 ⭐⭐⭐⭐⭐ JSON + Markdown + 可视化三合一
学术支撑 ⭐⭐⭐⭐ 2 篇 arXiv 论文

⚠️ 注意事项

事项说明
3B 限制 复杂表格和公式仍有挑战,偶尔解析失败
SVG 精度 dots.mocr 的 SVG 能力不如 dots.mocr-svg,建议双模型
路径限制 模型保存路径不能含句号(临时限制)
GPU 需求 推荐 CUDA GPU,CPU 推理较慢
中文文档 部分说明以英文为主,中文文档待完善
新版本磨合 v3.0 更名后部分生态还在更新

💡 使用建议

  • vLLM 部署:生产环境务必用 vLLM,速度远超 Transformers
  • 双模型策略:文档用 dots.mocr,图表用 dots.mocr-svg
  • PDF 批量解析:–num_thread 64 并行处理大 PDF
  • 过滤页眉页脚:用 –prompt prompt_ocr 模式
  • 在线试玩:先去 dotsocr.xiaohongshu.com 体验
  • 路径命名:模型目录用 DotsMOCR 不用 dots.mocr
  • max_new_tokens:设为 24000,复杂文档需要更多 token
  • flash-attn:安装 flash-attn 加速推理

  • 11. 总结

    dots.mocr 是小红书 HiLab 出品的 3B 参数多语言文档版面解析 VLM:

    • 📄 全版面解析:11 种元素分类 + 检测识别一体化 + JSON/Markdown/可视化三合一输出
    • 🎨 SVG 图表:图表/图形→SVG 代码,开源唯一,dots.mocr-svg 综合得分 0.901
    • 🌐 网页解析:网页截图结构化解析,UI 自动化场景
    • 🏙️ 场景文字:文档+场景全场景覆盖
    • 🏆 3B SOTA:olmOCR-Bench 83.9 / OmniDocBench Edit 0.031 全场最低
    • 🚀 vLLM 集成:0.11.0 官方支持,一键部署
    • 🌍 多语言:几乎全人类文字
    • 📖 2 篇论文:arXiv:2512.02498 + arXiv:2603.13032

    推荐指数:⭐⭐⭐⭐⭐

    如果你需要文档 OCR,dots.mocr 是目前 3B 级别的最佳选择。更关键的是,它是唯一能将图表转为 SVG 代码的开源模型——这意味着图表从"图片"变成"代码",可以编辑、搜索、复用。加上网页解析和场景文字,一个模型覆盖三大场景,vLLM 一键部署,小红书商业验证。

    📢 项目地址:https://github.com/rednote-hilab/dots.ocr 🤗 模型:dots.mocr · dots.mocr-svg 📄 论文 1:arXiv:2512.02498 📄 论文 2:arXiv:2603.13032 🎮 在线 Demo:https://dotsocr.xiaohongshu.com


    标签:#GitHub #小红书 #dotsmocr #OCR #SVG #文档解析 #VLM #开源项目 #多语言 分类:原创文章

    赞(0)
    未经允许不得转载:171主机测评 » 小红书开源 dots.mocr:3B 参数多语言文档版面解析 VLM,图表→SVG 代码,网页/场景文字全搞定,olmOCR-Bench 同级第一,vLLM 一键部署
    分享到: 更多 (0)

    评论 抢沙发

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址