Downloads · 30 days
899
49% of all-time downloads
ByteDance/Sa2VA-Qwen3-VL-4B-SAM3
Sa2VA-Qwen3-VL-4B-SAM3 is a image-text-to-text model from ByteDance. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Sa2VA-Qwen3-VL-4B-SAM3 is a Sa2VA model built on Qwen3-VL-4B-Instruct with a SAM3 PVS-tracker grounding encoder. The MLLM predicts a [SEG] token whose hidden state conditions the SAM3 mask decoder, producing dense ima…
Downloads · 30 days
899
49% of all-time downloads
All-time downloads
1.8K
Public
Parameters
5.3B
21.2 GB on disk
Likes
3
Trending 1
Click a slice to open those files.
.safetensors21.2 GB · 100%
From the Hugging Face model README
Sa2VA-Qwen3-VL-4B-SAM3 is a Sa2VA model built on Qwen3-VL-4B-Instruct with a
SAM3 PVS-tracker grounding encoder. The MLLM predicts a [SEG] token whose
hidden state conditions the SAM3 mask decoder, producing dense image and video
referring segmentation alongside open-ended chat.
This checkpoint is self-contained: the SAM3 grounding code is vendored into
the repository, so it loads with trust_remote_code=True without any extra
packages.
Image referring segmentation (cIoU):
| RefCOCO val / testA / testB | RefCOCO+ val / testA / testB | RefCOCOg val / test |
|---|---|---|
| 83.7 / 84.7 / 81.9 | 79.4 / 83.2 / 76.0 | 83.0 / 83.0 |
Video referring segmentation (J&F):
| MeViS (val_u) | ReVOS | Ref-DAVIS17 |
|---|---|---|
| 65.3 | 66.3 | 77.1 |
Grounded conversation generation (GCG, val):
| AP50 | mIoU | Recall |
|---|---|---|
| 37.1 | 70.1 | 49.4 |
import torch
from transformers import AutoModel, AutoProcessor
from PIL import Image
path = "HarborYuan/Sa2VA-Qwen3-VL-4B-SAM3"
model = AutoModel.from_pretrained(
path, torch_dtype=torch.bfloat16, trust_remote_code=True, low_cpu_mem_usage=True,
).eval().cuda()
processor = AutoProcessor.from_pretrained(path, trust_remote_code=True)
image = Image.open("your_image.jpg").convert("RGB")
out = model.predict_forward(
image=image,
text="Please segment the dog in the image.",
processor=processor,
)
print(out["prediction"]) # text response containing [SEG]
masks = out["prediction_masks"] # list of boolean masks at the original image size
Load in bfloat16 (the lm_head is kept in higher precision; torch_dtype="auto"
mixes dtypes and fails).
For video, pass video=[frame0, frame1, ...] (a list of PIL images) instead of image.
If you find this project useful in your research, please consider citing:
@article{sa2va,
title={Sa2VA: Marrying SAM2 with LLaVA for Dense Grounded Understanding of Images and Videos},
author={Yuan, Haobo and Li, Xiangtai and Zhang, Tao and Sun, Yueyi and Huang, Zilong and Xu, Shilin and Ji, Shunping and Tong, Yunhai and Qi, Lu and Feng, Jiashi and Yang, Ming-Hsuan},
journal={IEEE TPAMI},
year={2026}
}