Plug-and-Play PPO: An Adaptive Point Prompt Optimizer Making SAM Greater

Xueyu Liu, Rui Wang, Yexin Lai, Guangze Shi, Feixue Shao +5 more
2/10/2026

No official code found. Best implementation: XueyuLiu/PPO (38 stars, last commit 2026-01-28).

Abstract

Powered by extensive curated training data, the Segment Anything Model (SAM) demonstrates impressive generalization capabilities in open-world scenarios, effectively guided by user-provided prompts. However, the classagnostic characteristic of SAM renders its segmentation accuracy highly dependent on prompt quality. In this paper, we propose a novel plug-and-play dual-space Point Prompt Optimizer (PPO) designed to enhance prompt distribution through deep reinforcement learning (DRL)-based heterogeneous graph optimization. PPO optimizes initial prompts for any task without requiring additional training, thereby improving SAM’s downstream segmentation performance. Specifically, PPO constructs a dual-space heterogeneous graph, leveraging the robust feature-matching capabilities of a foundational pre-trained model to create internal feature and physical distance matrices. A DRL policy network iteratively refines the distribution of prompt points, optimizing segmentation predictions. We conducted experiments on four public datasets. The ablation study explores the necessity and balance of optimizing prompts in both feature and physical spaces. The comparative study shows that PPO enables SAM to surpass recent one-shot methods. Additionally, experiments with different initial prompts demonstrate PPO’s generality across prompts generated by various methods. In conclusion, PPO redefines the prompt optimization problem as a heterogeneous graph optimization task, using DRL to construct an effective, plugand-play prompt optimizer. This approach holds potential for broader applications across diverse segmentation tasks and provides a promising solution for point prompt optimization. The source code and demo are available at https://github.com/XueyuLiu/PPO.

DOISemantic Scholar

Code Implementations(1)

XueyuLiu/PPOCommunity75%

The official implementation code for Plug-and-Play PPO: An Adaptive Point Prompt Optimizer Making SAM Greater.

387Shell, PythonJul 22, 20248 months ago

Similar Papers

Cite this paper

@article{liu2026plugandplay,
  title  = {Plug-and-Play PPO: An Adaptive Point Prompt Optimizer Making SAM Greater},
  author = {Xueyu Liu and Rui Wang and Yexin Lai and Guangze Shi and Feixue Shao and Fang Hao and Jianan Zhang and Jia Shen and Yongfei Wu and Wen-Xin Zheng},
  year   = {2026},
  doi    = {10.1109/CVPR52734.2025.00409},
  url    = {https://doi.org/10.1109/CVPR52734.2025.00409},
  journal = {CVPR 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/24c0d237cd88fc2f6124f730c67e3ce2a08fb8b0.svg)](https://codeofpaper.com/paper/24c0d237cd88fc2f6124f730c67e3ce2a08fb8b0)

Discussion