README.md

January 1, 2026 ยท View on GitHub

๐Ÿงฌ Evol-SAM3

Evolving, Not Training: Zero-Shot Reasoning Segmentation via Evolutionary Prompting

Kai Ye1, Xiaotong You1, Jianghang Lin1, Jiayi Ji1,2, Pingyang Dai1, Liujuan Cao1

1Xiamen University, 2National University of Singapore


Evol-SAM3 reformulates reasoning segmentation as an inference-time evolutionary search.
It achieves state-of-the-art zero-shot performance without updating any parameters.


๐Ÿ”ฅ News

  • [2025-12-31] ๐Ÿš€ Code and paper are released!
  • [2025-12-XX] ๐Ÿšง We are preparing the demo on HuggingFace.

๐Ÿ’ก Abstract

Reasoning Segmentation requires models to interpret complex linguistic queries for pixel-level localization. While current SFT and RL methods suffer from catastrophic forgetting and training instability, we propose Evol-SAM3, a novel zero-shot framework.

Instead of a static "generate-then-segment" paradigm, we model the task as an Evolutionary Search process:

  1. Dynamic Evolution: We maintain a population of prompts and refine them via a "Generate-Evaluate-Evolve" loop.
  2. Visual Arena: A tournament-based selection mechanism using MLLMs to assess mask quality without ground truth.
  3. Semantic Mutation: Injecting diversity and correcting hallucinations during inference.
  4. Heterogeneous Arbitration: A final safeguard combining text-based reasoning with geometric intuition.

Evol-SAM3 significantly outperforms static baselines (e.g., SAM3 Agent) and even fully supervised SOTA methods (e.g., LISA-13B) on ReasonSeg and RefCOCO benchmarks.


๐Ÿ› ๏ธ Methodology

Our framework consists of three phases:

  • Phase 1: Initialization. A meta-generator expands the query into diverse hypotheses.
  • Phase 2: Evolutionary Loop. Prompts compete in a Visual Arena, and winners undergo Semantic Mutation to breed better generations.
  • Phase 3: Final Arbitration. A double-blind swap mechanism selects the best mask between evolutionary results and geometric priors.

๐Ÿ“Š Performance

We conduct extensive experiments on ReasonSeg and RefCOCO series benchmarks. Evol-SAM3 achieves superior performance without any parameter updates.

๐Ÿ† Comparison on ReasonSeg (Zero-Shot vs. SFT)

Evol-SAM3 (7B) outperforms not only other training-free agents but also fully supervised SOTA methods (e.g., LISA-13B).

MethodTypeBackboneVal gIoUTest gIoU
LISA [CVPR'24]SFTLLaVA-1.5 13B65.061.3
GLaMM [CVPR'24]SFTVicuna 7B47.4--
SAM 3 Agent [arXiv'25]Training-freeQwen2.5-VL 72B74.670.8
RSVP [arXiv'25]Training-freeGPT-4o64.760.3
Evol-SAM3 (Ours)Training-freeQwen2.5-VL 7B70.772.5

Note: Our 7B model surpasses the 72B baseline on the challenging Test set, proving the efficiency of evolutionary search.


๐Ÿ“ˆ Comparison on Referring Expression Segmentation (Zero-Shot)

Comparison with state-of-the-art zero-shot methods on RefCOCO/+/g.

MethodBackboneRefCOCO (val)RefCOCO+ (val)RefCOCOg (val-U)
SAM 3 AgentQwen2.5-VL 7B59.451.457.2
Evol-SAM3 (Ours)Qwen2.5-VL 7B68.764.464.7
Improvement--+9.3+13.0+7.5

All results are reported in cIoU. Evol-SAM3 significantly narrows the gap with supervised methods.


๐Ÿ–ผ๏ธ Qualitative Results

Comparison between SAM3 Agent (Baseline) and Evol-SAM3 (Ours). Our method successfully handles functional descriptions and corrects visual biases.


๐Ÿš€ Quick Start

1. Environment Setup

Create and activate the conda environment:

conda env create -f Evol-SAM3.yml
conda activate Evol-SAM3

2. Data Preparation

Download Datasets:

  • For dataset, you can download it from here.

Organize your datasets in the DATASET directory as follows:

DATASET/
โ”œโ”€โ”€ reason_seg/
โ”‚   โ””โ”€โ”€ ReasonSeg/
โ”‚       โ”œโ”€โ”€ train/
โ”‚       โ”œโ”€โ”€ val/
โ”‚       โ””โ”€โ”€ test/
โ””โ”€โ”€ refer_seg/
    โ”œโ”€โ”€ images/
    โ”‚   โ””โ”€โ”€ train2014/
    โ”œโ”€โ”€ refcoco/
    โ”œโ”€โ”€ refcoco+/
    โ””โ”€โ”€ refcocog/

3. Model Weights

Download the required model weights:

  • SAM3 Checkpoint: Download sam3.pt from Hugging Face (requires access request).
  • MLLM Checkpoint: The MLLM directory structure should look like this:
MLLM/
โ”œโ”€โ”€ Qwen2.5_VL_3B/
โ””โ”€โ”€ Qwen2.5_VL_7B/
    โ””โ”€โ”€ Qwen/
        โ””โ”€โ”€ Qwen2___5-VL-7B-Instruct/
            โ”œโ”€โ”€ config.json
            โ”œโ”€โ”€ model.safetensors
            โ”œโ”€โ”€ tokenizer.json
            โ””โ”€โ”€ ...

Download Qwen2.5-VL-7B-Instruct .

4. Configuration

Update the configuration file configs/ReasonSeg_7B.yaml to point to the correct paths:

paths:
  qwen_model_path: "MLLM/Qwen2.5_VL_7B/Qwen/Qwen2___5-VL-7B-Instruct"
  sam3_ckpt_path: "sam3/sam3.pt"
  dataset_root: "DATASET/reason_seg/ReasonSeg"
  log_dir: "logs/ReasonSeg_7B"

5. Inference

Run the inference script:

bash ReasonSeg_7B.sh

This script will execute:

python main.py --config configs/ReasonSeg_7B.yaml

Resume Inference: If the inference is interrupted, you can resume it by specifying the log directory with the --resume argument:

python main.py --config configs/ReasonSeg_7B.yaml --resume logs/ReasonSeg_7B/ReasonSeg_7B_xxxxx

(Replace ReasonSeg_7B_xxxxx with your actual log directory name)

๐Ÿ“ Citation

If you find our work helpful, please consider citing:

@misc{ye2025evolvingtrainingzeroshotreasoning,
      title={Evolving, Not Training: Zero-Shot Reasoning Segmentation via Evolutionary Prompting}, 
      author={Kai Ye and Xiaotong You and Jianghang Lin and Jiayi Ji and Pingyang Dai and Liujuan Cao},
      year={2025},
      eprint={2512.24702},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2512.24702}, 
}