飞桨PaddlePaddle/PaddleOCR-VL-1.6
模型介绍文件和版本Pull Requests讨论分析
下载使用量0

PaddleOCR-VL-1.6: 通过欠优化区域优化与渐进式后训练拓展文档解析前沿

repo HuggingFace ModelScope HuggingFace ModelScope Discord X License

🔥 官方网站 📝 技术报告

简介

我们推出了PaddleOCR-VL-1.6,这是一款在PaddleOCR-VL-1.5基础上升级的轻量级文档解析模型。PaddleOCR-VL-1.6引入了区域感知数据优化框架,该框架能从先前模型中识别出薄弱区域,对这些区域进行针对性增强,并提升监督信号的可靠性。此外,它还采用了基于精选数据选择和强化学习的渐进式后训练方案,通过分阶段优化将模型性能推向更高水平。PaddleOCR-VL-1.6在OmniDocBench v1.6上取得了96.33%的全新最佳成绩,同时在OmniDocBench v1.5和Real5-OmniDocBench上也创下新纪录,展现出与顶级VLMs相抗衡的强大竞争力。该模型架构与PaddleOCR-VL-1.5完全兼容,可实现零成本即插即用迁移。

PaddleOCR-VL-1.6的核心能力

🚀 全新最佳精度:在OmniDocBench v1.6上达到96.33%,同时在OmniDocBench v1.5和Real5-OmniDocBench上也刷新了最佳纪录。在文本、公式和表格识别方面均实现全面领先,性能超越了开源和闭源解决方案。

⚡ 能力全面升级:表格、中文古籍文献和中文生僻字识别能力显著提升,印章识别、文本检测、图表识别以及更多样化场景的处理能力也有明显增强。

🔄 无缝迁移:模型架构与PaddleOCR-VL-1.5完全兼容——零适配成本,可直接替换使用。

PaddleOCR-VL-1.6架构

PaddleOCR-VL-1.6数据引擎

新闻

  • 2026.06.03 🚀 我们发布了PaddleOCR-VL-1.6 技术报告。

  • 2026.05.28 🚀 我们发布了PaddleOCR-VL-1.6。PaddleOCR-VL-1.6 在 OmniDocBench v1.6 上取得了 96.33% 的全新最佳成绩,同时在 OmniDocBench v1.5 和 Real5-OmniDocBench 上也创下新纪录,并展现出与顶级 VLMs 相比的强大竞争力。该模型架构与 PaddleOCR-VL-1.5 完全兼容,可实现零成本即插即用迁移。

安装依赖

安装PaddlePaddle和PaddleOCR:

# The following command installs the PaddlePaddle version for CUDA 12.6. For other CUDA versions and the CPU version, please refer to https://www.paddlepaddle.org.cn/en/install/quick?docurl=/documentation/docs/en/develop/install/pip/linux-pip_en.html
python -m pip install paddlepaddle-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
python -m pip install -U "paddleocr[doc-parser]>=3.6.0"

请确保安装 3.2.1 或更高版本的 PaddlePaddle 框架,以及特定版本的 safetensors。 macOS 用户请使用 Docker 搭建环境。

基本用法

命令行界面用法:

paddleocr doc_parser -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png --pipeline_version v1.6

Python API 使用方法:

from paddleocr import PaddleOCRVL
pipeline = PaddleOCRVL(pipeline_version="v1.6")
output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png")
for res in output:
    res.print()
    res.save_to_json(save_path="output")
    res.save_to_markdown(save_path="output")

通过优化的推理服务器加速 VLM 推理

  1. 启动 VLM 推理服务器:

    您可以通过以下两种方法之一启动 vLLM 推理服务:

    • 方法一:PaddleOCR 方法

      docker run \
          --rm \
          --gpus all \
          --network host \
          ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleocr-genai-vllm-server:latest-nvidia-gpu \
          paddleocr genai_server --model_name PaddleOCR-VL-1.6-0.9B --host 0.0.0.0 --port 8080 --backend vllm
    • 方法二:vLLM 方法

      vLLM:PaddleOCR-VL 使用指南

  2. 调用 PaddleOCR CLI 或 Python API:

    paddleocr doc_parser \
        -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png \
        --pipeline_version v1.6 \
        --vl_rec_backend vllm-server \
        --vl_rec_server_url http://127.0.0.1:8080/v1
    from paddleocr import PaddleOCRVL
    pipeline = PaddleOCRVL(pipeline_version="v1.6", vl_rec_backend="vllm-server", vl_rec_server_url="http://127.0.0.1:8080/v1")
    output = pipeline.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/paddleocr_vl_demo.png")
    for res in output:
        res.print()
        res.save_to_json(save_path="output")
        res.save_to_markdown(save_path="output")

有关更多使用细节和参数说明,请参见 文档。

使用 transformers 调用 PaddleOCR-VL-1.6-0.9B 模型

目前,PaddleOCR-VL-1.6-0.9B 模型可通过 transformers 库实现无缝推理,支持全面的文本定位以及对公式、表格、图表、印章等复杂元素的识别。以下是我们提供的一个简单脚本,用于支持使用 transformers 对 PaddleOCR-VL-1.5-0.9B 模型进行推理。

[!NOTE] 注意:我们目前建议使用官方方法进行推理,因为该方法速度更快,并且支持页面级文档解析。以下示例代码仅支持元素级识别和文本定位。

# ensure the transformers v5 is installed
python -m pip install "transformers>=5.0.0"
from PIL import Image
import torch
from transformers import AutoProcessor, AutoModelForImageTextToText

# ---- Settings ----
model_path = "PaddlePaddle/PaddleOCR-VL-1.6"
image_path = "test.png"
task = "ocr" # Options: 'ocr' | 'table' | 'chart' | 'formula' | 'spotting' | 'seal'
# ------------------

# ---- Image Preprocessing For Spotting ----
image = Image.open(image_path).convert("RGB")
orig_w, orig_h = image.size
spotting_upscale_threshold = 1500

if task == "spotting" and orig_w < spotting_upscale_threshold and orig_h < spotting_upscale_threshold:
    process_w, process_h = orig_w * 2, orig_h * 2
    try:
        resample_filter = Image.Resampling.LANCZOS
    except AttributeError:
        resample_filter = Image.LANCZOS
    image = image.resize((process_w, process_h), resample_filter)

# Set max_pixels: use 1605632 for spotting, otherwise use default ~1M pixels
max_pixels = 2048 * 28 * 28 if task == "spotting" else 1280 * 28 * 28
# ---------------------------

# -------- Inference --------
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
PROMPTS = {
    "ocr": "OCR:",
    "table": "Table Recognition:",
    "formula": "Formula Recognition:",
    "chart": "Chart Recognition:",
    "spotting": "Spotting:",
    "seal": "Seal Recognition:",
}

model = AutoModelForImageTextToText.from_pretrained(model_path, torch_dtype=torch.bfloat16).to(DEVICE).eval()
processor = AutoProcessor.from_pretrained(model_path)

messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "image": image},
            {"type": "text", "text": PROMPTS[task]},
        ]
    }
]
inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    images_kwargs={"size": {"shortest_edge": processor.image_processor.min_pixels, "longest_edge": max_pixels}},
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=512)
result = processor.decode(outputs[0][inputs["input_ids"].shape[-1]:-1])
print(result)
# ---------------------------
👉 点击展开:使用 flash-attn 提升性能并降低内存占用
# ensure the flash-attn2 is installed
pip install flash-attn --no-build-isolation
model = AutoModelForImageTextToText.from_pretrained(model_path, torch_dtype=torch.bfloat16, attn_implementation="flash_attention_2").to(DEVICE).eval()

性能表现

文档解析

1. OmniDocBench v1.6

PaddleOCR-VL-1.6 在 OmniDocBench v1.6 的总体、文本、公式、表格任务上均取得 SOTA 性能

注:

  • 性能指标引用自 OmniDocBench 官方排行榜,Gemini-3 Pro、Qwen3-VL-235B-A22B-Instruct 以及本模型除外,这些模型为独立评估。

2. Real5-OmniDocBench

在扫描、扭曲、屏幕拍摄、光照变化和倾斜这五个多样化且具有挑战性的场景中,PaddleOCR-VL-1.6 均持续刷新 SOTA 记录

注:

  • Real5-OmniDocBench 是一个面向真实世界场景的全新基准数据集,我们基于 OmniDocBench v1.5 数据集构建而成。该数据集包含五个不同场景:扫描、扭曲、屏幕拍摄、光照变化和倾斜。更多详情请参见 Real5-OmniDocBench。

致谢

感谢 PaddleFormers、Keye、MinerU、OmniDocBench 提供的宝贵代码、模型权重和基准数据集。同时也感谢所有为这个开源项目做出贡献的人!

引用

如果您觉得 PaddleOCR-VL-1.6 对您有帮助,欢迎给我们点赞并引用。

@misc{zhang2026paddleocrvl16expandingfrontierdocument,
      title={PaddleOCR-VL-1.6: Expanding the Frontier of Document Parsing with Under-Optimized Region Refinement and Progressive Post-Training}, 
      author={Zelun Zhang and Hongen Liu and Suyin Liang and Yubo Zhang and Yiqing Xiang and Jiaxuan Liu and Ting Sun and Manhui Lin and Yue Zhang and Changda Zhou and Tingquan Gao and Cheng Cui and Yi Liu and Dianhai Yu and Yanjun Ma},
      year={2026},
      eprint={2606.03264},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2606.03264}, 
}