Kembali ke blog
Technical Practice · Vortap 团队

Qwen2.5-VL 实战指南:用中国多模态模型做图片理解

Qwen2.5-VL 是阿里巴巴最新的多模态模型。本文手把手教你用它做图片理解、OCR、图表分析,API 调用示例全中文。

Artikel ini saat ini hanya tersedia dalam bahasa Mandarin.

Qwen2.5-VL 实战指南

2026 年 7 月,阿里巴巴发布 Qwen2.5-VL,这是目前最强的中文多模态模型之一。它不仅能理解图片内容,还能做 OCR、图表分析、视频理解。

本文通过实战示例,带你快速上手。

Qwen2.5-VL 核心能力

  • 图片理解:识别场景、物体、人物动作
  • OCR 识别:中英文文字识别,包括手写体和复杂背景
  • 图表分析:理解折线图、柱状图、饼图的数据
  • 文档解析:读取 PDF/截图中的结构化信息
  • 视频理解:基于关键帧的视频内容分析

实战一:图片内容识别

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_VORTAP_KEY",
    base_url="https://api.vortap.store/v1"
)

response = client.chat.completions.create(
    model="qwen2.5-vl-72b",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "这张图片里有什么?用中文描述"},
            {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}
        ]
    }]
)
print(response.choices[0].message.content)

实战二:OCR 识别发票

response = client.chat.completions.create(
    model="qwen2.5-vl-72b",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "请提取这张发票上的所有文字信息,包括发票号码、日期、金额"},
            {"type": "image_url", "image_url": {"url": "https://example.com/invoice.jpg"}}
        ]
    }]
)

实战三:图表数据提取

response = client.chat.completions.create(
    model="qwen2.5-vl-72b",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "这张折线图展示的是什么数据?每个季度的值是多少?"},
            {"type": "image_url", "image_url": {"url": "https://example.com/chart.png"}}
        ]
    }]
)

性能对比

场景Qwen2.5-VL 72BGPT-4oQwen 优势
中文场景理解96.2%90.1%+6.1%
英文场景理解89.5%92.3%-2.8%
中文 OCR 识别94.7%88.3%+6.4%
图表理解91.3%89.5%+1.8%
价格¥4/M tokens¥86/M tokens95% 更便宜

使用场景推荐

跨境电商:自动识别商品图片中的文字和标签 文档处理:发票识别、合同 OCR、表单录入 内容审核:图片内容自动分类和过滤 数据分析:图表自动解读和报告生成

通过 Vortap 开始使用

在 Vortap,Qwen2.5-VL 已全面上线,支持 OpenAI 兼容 API:

curl https://api.vortap.store/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_KEY" \
  -d '{
    "model": "qwen2.5-vl-72b",
    "messages": [{
      "role": "user",
      "content": [{"type": "text", "text": "识别这张图"}, {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}]
    }]
  }'

立即体验 → vortap.store