Skip to content
Projekte

yujunwei04/UnSAMv2 has 90 GitHub stars and 5 forks. GitHot measured 0 in 7 days. Last checked 2026-11-09 09:11 UTC. Last push 2026-10-09.

So werden diese Zahlen gemessen

[TMLR 2026] Code release for "UnSAMv2: Self-Supervised Learning Enables Segment Anything at Any Granularity"

Gemessener Sternzuwachs

in 24h
Aktualisierung verzögert
in 7 days
0
in 15 days
Aktualisierung verzögert
in 1 month
Aktualisierung verzögert

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

UnSAMv2: Self-Supervised Learning Enables Segment Anything at Any Granularity

Junwei Yu, Trevor Darrell, XuDong Wang*

UC Berkeley
* Corresponding author

Project Page | arXiv | HF Demo 😊

News 🎉

  • 10/9/2026: UnSAMv2 got accepted to TMLR with J2C certificate. We will present our work at ICLR 2027!
  • 11/17/2025: We released UnSAMv2.

Demo

We host our model on HuggingFace space, feel free to try our UnSAMv2 Demo! UnSAMv2 support granularity control for interactive image segmentation, whole image segmentation, and video segmentation.

  1. Interactive Segmentation: Add point prompts and granularity scaler first, and click segment to run inference. Click the little cross icon on the top-right corner if you want to try your own image! alt text

  2. Whole Image Segmentation: UnSAMv2 supports to find all instance at a given granularity score in images. Click "generate masks" to run inference. alt text

  3. Video Segmentation: UnSAMv2 can propagate mask at your desired granularity across video frames! Firstly, add point prompts and granularity and click "segment frame". Then, we can propagate the mask to later frames by clicking "propagate video." alt text

Installation ⚙️

We provide installation instructions here.

Method Overview 💡

UnSAMv2 has two stages. (1) We generate pseudo mask-granularity pairs with granularity-aware divide-and-conquer. (2) We utilize these unsupervised data to finetune SAM-2 with granularity module.

1. Granularity-Aware Divide-and-Conquer ✌️

To run granularity-aware divide-and-conquer, please download CutLER's weights here

Then, specify the input, output, and checkpoint path in the script and run

cd granularity_divide_and_conquer
bash run_gra_dico.sh

2. Segment Anything at Any Granularity 🔥

We host UnSAMv2 model on HuggingFace Space, feel free to try it out by following demo. If you want to run UnSAMv2 or UnSAMv2+ locally, we provide tutorial notebooks for different tasks, please download UnSAMv2/UnSAMv2+ checkpoints from the model zoo.

UnSAMv2: Inference Demo for Interative Image Segmentation

We provide the tutorial notebook for running UnSAMv2's interactive segmentation here.

UnSAMv2: Inference Demo for Whole Image Segmentation

We provide the tutorial notebook for running UnSAMv2's whole image segmentation here.

UnSAMv2: Inference Demo for Video Segmentation

We provide the tutorial notebook for running UnSAMv2's video segmentation here.

Model Zoo

UnSAMv2 achieves state-of-the-art performance on interactive segmentation and whole image segmentation by finetuning SAM-2 with pseudo-labeled mask-granularity pairs on 6,000 images.

For interactive segmentation, we report averaged Number of clicks (NoC) and Intersection of Union with 1 click(1-IoU) across 5 datasets: GrabCut, Berkeley, DAVIS, SA-1B, PartImageNet.

For whole image segmentation, we report Average Recall (AR) on 5 datasets: COCO, LVIS, ADE20K, Entity, SA-1B.

Method Models NoC80 ↓ NoC90 ↓ 1-IoU ↑ AR1000 ↑
SimpleClick - 3.32 4.87 60.2 -
UnSAM - - - - 39.2
GraCo - 2.35 3.42 74.4 -
SAM-2 - 2.44 3.63 69.0 49.6
UnSAMv2 Download 2.28 3.40 79.3 68.3
UnSAMv2+ Download 2.07 3.10 81.7 74.1

Evaluation 😎

Interactive Segmentation

Download corresponding datasets and specify the data path here. Then run the evaluation

cd evaluation/interactive
bash sam2_eval.sh

Whole Image Segmentation

Download corresponding dataset and run inference script to get coco style annotations

cd ./evaluation/whole_image
bash run_coco_annotator.sh

Then we can get numbers by running

cd ./evaluation/whole_image
bash evaluate.sh

License 📋

This project is licensed under the Apache License 2.0.

Acknowledgements 🙏

This codebase is built on UnSAM, SAM-2, CutLER, DINOv3, HQ-SAM, and GraCo. We sincerely appreciate the authors for open-sourcing their code.

Contact ☎️

If you have any general questions, feel free to email us at [email protected] and [email protected]. If you have code questions, we encourage you to open an issue in this repo as your question may help others.

Citation ✨

If you find our work inspiring or use our codebase in your research, please consider giving us a star ⭐ and a citation!

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

@article{wang2024segment,
  title={Segment anything without supervision},
  author={Wang, XuDong and Yang, Jingfeng and Darrell, Trevor},
  journal={Advances in Neural Information Processing Systems},
  volume={37},
  pages={138731--138755},
  year={2024}
}

Ähnliche Projekte entdecken