SAMIX: Reinforcing SAM2 with Semantic Adapter and Reference Selecting Policy for Mix-Supervised Segmentation (CVPR 2026)
Qiang Hu1 · Jiajie Wei1 · Zhenyu Yi2 · Zhifen Yan1 · Yingjie Guo1 · Hongkuan Shi3 · Ge-Peng Ji4 · Qiang Li1 · Zhiwei Wang1
1HUST 2SJTU 3Wuhan United Imaging Surgical Healthcare Co., Ltd. 4ANU
Problem Formulation: Mix-supervised Segmentation aims to train a single segmentation model using heterogeneous-annotated data, including mask, box, scribble, point, class-labled, and unlabled data.
Paradigm Comparison:
-
Exsing SAM-based methods (1) heavily rely on sparse spatial prompts (e.g., box, point); (2) can not address scenarios with ambiguous boundaries; (3) can not use class-labeled and unlabeled data for training; (4) overlooks the potential of collaborative learning across heterogeneous data.
-
Ours (1) repurpose the SAM2's instance tracking mechanism to promote semantic tracking across data, i.e., in-context segmentation; (2) introduce a RL-empowered Network to actively select in-context examples for each query; (3) can use class-labeled and unlabeled data for training; (4) achieve collaborative learning across heterogeneous data.
Recommended baseline:
- Python
3.10 - PyTorch
2.5.1 - CUDA
12.4
Install Python dependencies:
pip install -r requirements.txtgit submodule update --init --recursivecd external/sam2
pip install -e .Use the official checkpoint script inside the SAM2 submodule, or provide your own checkpoint path when launching training.
The repository supports a unified mixed-supervision layout. See:
For the polyp experiments in this codebase, the training script expects a manifest JSON that enumerates training samples and their supervision type.
The recommended entrypoint is:
bash scripts/train.shThe default script configuration uses:
SAM2.1 Hiera Tiny- warmup for
10epochs - joint training for
50epochs
If you use this repository, please cite the SAMIX paper. Final BibTeX metadata will be added in the public release.
This repository is also developed with assistance from
@codex, OpenAI's coding agent.
This codebase builds on:
