---
title: WeVisOne-VL-4B
canonical_url: "https://www.modelscope.cn/models/isLinXu/WeVisOne-VL-4B"
md_url: "https://www.modelscope.cn/models/isLinXu/WeVisOne-VL-4B.md"
repository: isLinXu/WeVisOne-VL-4B
chinese_name: "微信视觉统一感知模型 4B"
last_updated: 2026-10-25
license: apache-2.0
pipeline_tag: image-text-to-text
tasks:
  - image-text-to-text
model_type:
  - qwen3_vl
architectures:
  - Qwen3VLForConditionalGeneration
base_model_relation: finetune
parameters: 4.8B
tensor_type:
  - F32
library_name:
  - safetensors
downloads: 389
stars: 5
tags:
  - vision-language
  - qwen3_vl
  - object-detection
  - referring-expression-comprehension
  - object-counting
  - point-grounding
  - ocr
  - referring-expression-segmentation
  - image-matting
---

# WeVisOne-VL-4B

> WeVisOne-VL-4B - isLinXu 在 ModelScope 开源的模型。WeVisOne-VL（WeChat Vision All-in-One）是腾讯微信视觉团队（WeChat Vision, Tencent Inc.）开发的视觉语言基础模型，基于 Qwen3-VL 构建。它通过结构化 next-token prediction 与一个轻量的 9.6M 参数像素解码器，统一目标级感知（目标检测、referring 定位、计数、指向、OCR）与像素级感知（referring 分割、可提示…

isLinXu/WeVisOne-VL-4B 是 ModelScope 魔搭社区上的 4.8B 参数image-text-to-text模型，采用 apache-2.0 许可。

- **Repository**: isLinXu/WeVisOne-VL-4B
- **License**: apache-2.0
- **Tasks**: image-text-to-text
- **Parameters**: 4.8B
- **Tags**: vision-language, qwen3_vl, object-detection, referring-expression-comprehension, object-counting, point-grounding, ocr, referring-expression-segmentation, image-matting
- **Downloads**: 389
- **Stars**: 5
- **Last updated**: 2026-10-25

Source: https://www.modelscope.cn/models/isLinXu/WeVisOne-VL-4B

---

# WeVisOne-VL-4B

**WeVisOne-VL**（**We**Chat **Vis**ion All-in-**One**）是腾讯微信视觉团队（WeChat Vision, Tencent Inc.）开发的视觉语言基础模型，基于 **Qwen3-VL** 构建。它通过结构化 next-token prediction 与一个轻量的 **9.6M 参数像素解码器**，统一**目标级**感知（目标检测、referring 定位、计数、指向、OCR）与**像素级**感知（referring 分割、可提示 alpha matting）——支持从点、框到二值掩码与连续 alpha matte 的任意粒度定位，并可靠地拒绝不存在的目标查询。

> **中文名**：微信视觉统一感知模型 4B
>
> 本仓库是 [tencent/WeVisOne-VL-4B](https://huggingface.co/tencent/WeVisOne-VL-4B) 的镜像，**权重内容未做任何修改**，仅重写了模型卡以适配国内访问。
>
> 上游：<https://huggingface.co/tencent/WeVisOne-VL-4B>
> 项目页：<https://tencent.github.io/WeVisOne-VL> · 论文：<https://arxiv.org/abs/2610.31329>
> 代码：<https://github.com/Tencent/WeVisOne-VL>（另含 [Mask2Alpha](https://github.com/Tencent/WeVisOne-VL/tree/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` 而非幻觉（WeRef-Bench 拒绝率 96.4%）。

## 安装

```bash
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 .
```

## 推理

```python
from PIL import Image
from wevisone_vl import WeVisOneVL
from wevisone_vl.visualization import save_result

model = WeVisOneVL("isLinXu/WeVisOne-VL-4B", 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`）。

4B 版本基于 Qwen3-VL 搭建：文本侧 36 层、hidden 2560、32 个注意力头；视觉侧 24 层 ViT、patch 16、out_hidden_size 2560。

附带的 `mask_decoder.pt` 是必需的核心组件，包含：

- **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。下表为 4B 与同系列 2B 的对照。

**目标检测（F1 Mean ↑）**

| Method | COCO | LVIS | Dense200 | VisDrone |
|---|---|---|---|---|
| WeVisOne-VL-2B | 55.2 | 53.3 | 61.4 | 40.4 |
| **WeVisOne-VL-4B** | **57.1** | **55.3** | **71.3** | **44.7** |

**Referring 目标检测（F1 Mean / 拒绝率 %）**

| Method | RefCOCOg | RefCOCOg Rej | WeRef Mean | WeRef Rej | HumanRef | Ref-L4 |
|---|---|---|---|---|---|---|
| WeVisOne-VL-2B | 78.2 | 50.2 | 73.2 | 92.9 | 77.4 | 75.1 |
| **WeVisOne-VL-4B** | **81.8** | **67.4** | **78.7** | **96.4** | **80.7** | **78.1** |

**目标计数（精确匹配准确率 %）**

| Method | CountQA | PixMo-Count | CLOC | KubriCount-B | MixCount |
|---|---|---|---|---|---|
| WeVisOne-VL-2B | 47.9 | 88.1 | 26.9 | 32.4 | 32.2 |
| **WeVisOne-VL-4B** | **57.1** | **89.6** | **28.3** | **40.1** | **40.4** |

**目标指向（Acc ↑）**

| Method | PointBench | PixMo-Points | COCO | LVIS | Dense200 | VisDrone |
|---|---|---|---|---|---|---|
| WeVisOne-VL-2B | 62.9 | 73.2 | **85.8** | 78.9 | 83.2 | 62.4 |
| **WeVisOne-VL-4B** | **71.9** | **74.7** | 85.4 | **79.5** | **87.0** | **64.4** |

**OCR（F1 Mean ↑）**

| Method | HierText | ICDAR2015 | TotalText | SROIE |
|---|---|---|---|---|
| WeVisOne-VL-2B | 30.5 | 42.6 | 42.5 | 62.1 |
| **WeVisOne-VL-4B** | **39.0** | **47.8** | **52.0** | **68.1** |

**Referring 分割（gIoU ↑）**

| Method | RefCOCO testA | RefCOCO+ testA | RefCOCOg | ReasonSeg | Ref-ZOM cIoU | Ref-ZOM Rej |
|---|---|---|---|---|---|---|
| WeVisOne-VL-2B | 82.9 | 79.0 | 74.9 | 60.9 | **73.4** | 62.4 |
| **WeVisOne-VL-4B** | **84.5** | **81.1** | **77.8** | **71.2** | 72.2 | **86.0** |

**Matting（MAD ↓，越低越好）**

| Method | P3M-500-NP | AM-2K | PPM-100 | WeRefMat (Category) | WeRefMat (Referring) |
|---|---|---|---|---|---|
| WeVisOne-VL-2B | **6.6** | 5.7 | **5.3** | 17.7 | 15.8 |
| **WeVisOne-VL-4B** | 7.3 | **5.0** | 6.1 | **16.4** | **9.8** |

> 注意：box matting 的 P3M-500-NP 与 PPM-100 上 **2B 版本反而更好**（MAD 更低），matting 任务并非越大越强。完整基准与更多对照基线（Qwen3-VL-8B、Qwen3.5-9B、Rex-Omni-3B、LocateAnything-3B）见[官方仓库](https://github.com/Tencent/WeVisOne-VL)。

## 文件说明

| 文件 | 大小 | 说明 |
|---|---|---|
| `model.safetensors` | 19.3 GB | 主权重（bfloat16，`Qwen3VLForConditionalGeneration`） |
| `mask_decoder.pt` | 38.5 MB | 像素解码器权重，**必需组件** |
| `tokenizer.json` | 11.6 MB | 分词器 |
| `tokenizer_config.json` / `chat_template.jinja` | — | 分词器配置与对话模板 |
| `config.json` | — | 架构配置（Qwen3-VL：36 层文本 / hidden 2560；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 发布。第三方组件保留其原始许可与版权声明，使用前请查阅对应源文件。

## 引用

```bibtex
@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}
}
```
