Downloads · 30 days
176
90% of all-time downloads
yujunwei04/UnSAMv2
UnSAMv2 is a image segmentation model from yujunwei04. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for sam2. The card lists the license as apache-2.0.
Project Page | arXiv | Code | Demo
Downloads · 30 days
176
90% of all-time downloads
All-time downloads
196
Public
Repo size
377 MB
Likes
1
Public
Click a slice to open those files.
.pt377 MB · 100%
From the Hugging Face model README
Project Page | arXiv | Code | Demo
UnSAMv2 adds granularity control to promptable segmentation. Alongside the usual point or box prompt, you pass a continuous granularity scalar that selects how fine or coarse the returned mask should be, letting a single model move smoothly from whole objects down to their parts without retraining or prompt engineering.
The model is trained without any human labels. A granularity-aware divide-and-conquer pipeline mines mask–granularity pairs from unlabeled images, and those pseudo-labels supervise a lightweight granularity embedding added to SAM 2.
| File | Description | NoC<sub>80</sub> ↓ | NoC<sub>90</sub> ↓ | 1-IoU ↑ | AR<sub>1000</sub> ↑ |
|---|---|---|---|---|---|
unsamv2.pt | UnSAMv2 | 2.28 | 3.40 | 79.3 | 68.3 |
unsamv2_plus.pt | UnSAMv2+, trained on more unlabeled data | 2.07 | 3.10 | 81.7 | 74.1 |
For reference, SAM 2 scores 2.44 / 3.63 / 69.0 / 49.6 on the same metrics.
Both checkpoints are fine-tuned from SAM 2.1 Hiera-Small (46.4M parameters) and are
saved in the SAM 2 training format, with the weights under the model key.
Install the code from the UnSAMv2 repository, then download a checkpoint:
from huggingface_hub import hf_hub_download
ckpt = hf_hub_download("yujunwei04/UnSAMv2", "unsamv2_plus.pt")
Load it the way the repository's notebooks do, passing a granularity scalar alongside your point or box prompt. The repository covers interactive segmentation, whole-image segmentation, and video segmentation.
Self-supervised pseudo-labels mined from unlabeled images. No human segmentation annotations were used to train these checkpoints.
Released under the Apache License 2.0.
@article{yu2025unsamv2,
title={UnSAMv2: Self-Supervised Learning Enables Segment Anything at Any Granularity},
author={Yu, Junwei and Darrell, Trevor and Wang, XuDong},
journal={arXiv preprint arXiv:2511.13714},
year={2025}
}