WeVisOne-VL-2B
WeVisOne-VL(WeChat Vision All-in-One)是腾讯微信视觉团队(WeChat Vision, Tencent Inc.)开发的视觉语言基础模型,基于 Qwen3-VL 构建。它通过结构化 next-token prediction 与一个轻量的 9.6M 参数像素解码器,统一目标级感知(目标检测、referring 定位、计数、指向、OCR)与像素级感知(referring 分割、可提示 alpha matting)——支持从点、框到二值掩码与连续 alpha matte 的任意粒度定位,并可靠地拒绝不存在的目标查询。
中文名:微信视觉统一感知模型 2B
本仓库是 tencent/WeVisOne-VL-2B 的镜像,权重内容未做任何修改,仅重写了模型卡以适配国内访问。
上游:https://huggingface.co/tencent/WeVisOne-VL-2B 项目页:https://tencent.github.io/WeVisOne-VL · 论文:https://arxiv.org/abs/2610.31329 代码:https://github.com/Tencent/WeVisOne-VL(另含 Mask2Alpha matting 标注器) 在线 Demo:https://huggingface.co/spaces/hugging-apps/wevisone-vl-4b
✨ 亮点
- 🎯 All-in-One:检测、referring、计数、指向、OCR、分割、matting 全部集中在一个模型里;
- 🪶 轻量像素解码器:9.6M 参数的解码器直接输出 masks 与 alpha mattes,无需 SAM;
- 🚫 可靠拒绝:目标不存在时返回
None而非幻觉。
安装
git clone https://github.com/Tencent/WeVisOne-VL.git && cd WeVisOne-VL
conda create -n wevisone-vl python=3.10 -y && conda activate wevisone-vl
pip install -r requirements.txt && pip install -v -e .
推理
from PIL import Image
from wevisone_vl import WeVisOneVL
from wevisone_vl.visualization import save_result
model = WeVisOneVL("isLinXu/WeVisOne-VL-2B", backend="transformers") # 或 backend="vllm"
# 目标级:开放词表目标检测
image = Image.open("demo/examples/images/livingroom.jpg").convert("RGB")
result = model.predict(image, task="detection", query=["sofa", "pillow", "coffee table", "lamp"])
save_result("outputs/detection", image, result)
# 像素级:可提示 alpha matting
image = Image.open("demo/examples/images/seabreeze.jpg").convert("RGB")
result = model.predict(image, task="matting", query="person")
save_result("outputs/matting", image, result)
也可用 device("auto" / "cuda:0" / "npu:0" / "cpu")、dtype、min_pixels / max_pixels 以及常规解码参数(max_new_tokens、temperature 等)。
支持的任务
task |
query |
输出 | |
|---|---|---|---|
| 📦 | detection |
类别列表 | boxes |
| 💬 | referring |
referring 表达式 | boxes 或 None |
| 📍 | point |
类别 / 表达式 | points |
| 🔢 | count_box / count_point |
类别 / 表达式 | boxes / points + 计数 |
| 🔤 | ocr / ocr_grounding |
– / 待查找文本 | text + boxes |
| 🎭 | segmentation |
类别 / 表达式 | boxes + 二值 masks |
| ✂️ | matting |
类别 / 表达式 | boxes + alpha mattes |
架构
模型使用专用坐标 token(<0> ... <1000>)表示归一化边界框与点位;当查询目标不存在时返回 None;在稠密任务中每个预测框后会输出一个专用实例 token(<OBJ>,token ID 152678)。
附带的 mask_decoder.pt(9,511,460 参数)是必需的核心组件,包含:
- Visual Feature Adapter —— 基于 Qwen3-VL pre-merging ViT 多层级特征;
- Box-Guided Query Decoder —— 6 个可变形交叉注意力块,由
<OBJ>hidden state 初始化,并带 Fourier 编码的 box prior; - Instance-Conditioned Dense Prediction Head —— 含
FullCanvasAlphaCascadeHead,在 S/4、S/2、S/1 逐级精化,输出 stride 1 的全分辨率连续 alpha matte。
性能一览
F1 取 IoU 0.5:0.95 均值;贪心解码,每图 ≤ 1,960 visual tokens。
| 任务 | Benchmark | 指标 | 最强开源基线 | WeVisOne-VL-2B |
|---|---|---|---|---|
| 📦 Detection | LVIS | F1 Mean ↑ | 50.7 | 53.3 |
| 📦 Dense Detection | Dense200 | F1 Mean ↑ | 58.7 | 61.4 |
| 💬 Referring | RefCOCOg test | F1 Mean ↑ | 77.6 | 78.2 |
| 🚫 Rejection | WeRef-Bench | Rej. Rate ↑ | 73.0 | 92.9 |
| 🔢 Counting | PixMo-Count test | Acc ↑ | 82.8 | 88.1 |
| 📍 Pointing | PointBench | Acc ↑ | 69.9 | 见官方仓库 |
| 🔤 OCR | TotalText | F1 Mean ↑ | 43.3 | 见官方仓库 |
| 🎭 Referring Seg. | ReasonSeg val | gIoU ↑ | 65.0 | 见官方仓库 |
| ✂️ Box Matting | P3M-500-NP | MAD ↓ | 15.4 | 见官方仓库 |
完整基准结果(含 COCO / VisDrone / CountQA / RefCOCO 各变体)见官方仓库。对照基线包括 Qwen3-VL-8B、Qwen3.5-9B、Rex-Omni-3B、LocateAnything-3B 等。
文件说明
| 文件 | 大小 | 说明 |
|---|---|---|
model.safetensors |
9.77 GB | 主权重(bfloat16,Qwen3VLForConditionalGeneration) |
mask_decoder.pt |
38 MB | 像素解码器权重(9,511,460 参数),必需组件 |
tokenizer.json |
11.6 MB | 分词器 |
tokenizer_config.json / chat_template.jinja |
— | 分词器配置与对话模板 |
config.json |
— | 架构配置(Qwen3-VL:28 层文本 / hidden 2048;24 层 ViT / patch 16) |
generation_config.json / processor_config.json |
— | 生成与处理配置 |
LICENSE |
— | Apache License 2.0 |
预期用途
本版本面向视觉定位、referring 定位、指向、计数、OCR 定位、referring 分割与图像 matting 等研究用途。不用于自主的高影响决策,不用于身份识别。
限制
- 精细 alpha 边界对图像分辨率、严重遮挡、复杂透明度与提示词措辞较敏感;
- 为提升推理效率,模型直接生成结构化输出而不做显式 CoT 推理;
- 当前仅面向单轮图像感知,像素解码器会拒绝视频网格输入。
License
除另有说明外,腾讯自研代码以 Apache License 2.0 发布。第三方组件保留其原始许可与版权声明,使用前请查阅对应源文件。
引用
@article{liang2026wevisone,
title={WeVisOne-VL: Unified Visual Perception from Objects to Pixels},
author={Liang, Tianming and Pan, Junyi and Li, Yuxi and Fu, Canmiao and Huang, Zhipeng and Sun, Chong and Li, Chen and Lyu, Jing},
journal={arXiv preprint arXiv:2610.31329},
year={2026}
}