RMP-SAM: Towards Real-Time Multi-Purpose Segment Anything

Shilin Xu, Haobo Yuan, Qingyu Shi, Lu Qi, Jingbo Wang, Yibo Yang, Yining Li, Kai Chen, Yunhai Tong, Bernard Ghanem, Xiangtai Li, Ming-Hsuan Yang

Introduction

The "Segment Anything" Model (SAM) revolutionized computer vision by providing a foundation model capable of segmenting any object via user prompts. However, SAM and its successors rely on heavy transformer architectures, making them computationally expensive and difficult to deploy in real-time applications or on edge devices.

While "real-time" segmentation models exist, they are typically specialized for a single task—such as semantic segmentation for autonomous driving—and lack the versatility to handle interactive prompts or video tracking. To address this "multi-purpose" gap, researchers have introduced RMP-SAM (Real-Time Multi-Purpose Segment Anything). RMP-SAM is a single, end-to-end model designed to perform interactive, panoptic, and video instance segmentation all in real-time, achieving an optimal balance between accuracy and speed.

Overview of RMP-SAM capabilities and performance trade-offs

Methods and Architecture

To achieve real-time performance without sacrificing versatility, RMP-SAM introduces three core architectural innovations that depart from standard heavy transformer decoders:

Architecture of RMP-SAM showing the dynamic convolution decoder and asymmetric adapters
  1. Lite Feature Extractor: Instead of heavy vision transformers, the model uses lightweight backbones like ResNet18 or TopFormer. These are enhanced by a Feature Pyramid Network (FPN) with deformable convolutions to fuse multi-scale features efficiently.
  2. Unified Dynamic Convolution Decoder: Standard decoders rely on pixel-wise cross-attention, which creates a significant speed bottleneck. RMP-SAM replaces this with a pooling-based dynamic convolution framework. It uses object queries to generate parameters that weight the feature maps, drastically reducing the computational load.
  3. Asymmetric Decoupled Adapters: The model employs two specialized adapters at the end of the pipeline. The Object Adapter focuses on global scene and temporal context for panoptic and video tasks, while the Prompt Adapter focuses on local details to better respond to specific user clicks or boxes.

The model is trained using a Joint Co-training strategy, where image and video data are processed in the same pipeline. This allows the model to learn shared representations of "objects" across different modalities.

Key Insights

  • The "Asymmetry" Breakthrough: One of the most interesting findings is that treating interactive prompts and detected objects identically leads to sub-optimal results. Prompts require high-resolution local guidance, whereas general object detection requires broader context. The asymmetric adapter design allows the model to "switch gears" based on the input type.
  • Efficiency over Complexity: The paper demonstrates that for real-time constraints, pooling-based dynamic convolution is superior to the cascaded transformer decoders used in models like Mask2Former.
  • Universal Labeling: To handle different datasets with different category names, the authors replaced the standard learnable classifier with CLIP text embeddings. This allows the model to unify label taxonomies across various datasets (e.g., "thing" vs. "stuff").

Datasets and Performance

The researchers benchmarked RMP-SAM using several standard datasets, including COCO (panoptic), YouTube-VIS 2019 (video instance), and COCO-SAM (synthetic prompts for interactive segmentation). ADE-20K and VIP-Seg were also used to test generalization.

RMP-SAM achieves the best accuracy-to-speed trade-off currently available for multi-purpose segmentation:

  • Speed: The ResNet18 version runs at 40.3 FPS on an NVIDIA A100 GPU.
  • Panoptic Performance: On COCO, it achieves 39.9 PQ, outperforming other real-time baselines like YOSO (31.6 PQ) and Mask2Former-R18 (35.6 PQ).
  • Video Performance: On YouTube-VIS, it reaches 38.7 mAP, significantly higher than the real-time version of MaskFormer (34.1 mAP).
  • Interactive Performance: In 1-click interactive segmentation, it achieves 57.9 mIoU, surpassing the much heavier SAM-L (55.7 mIoU) while being orders of magnitude faster and more computationally efficient (123G FLOPs vs 1315G).

Limitations and Future Work

Despite its strengths, RMP-SAM struggles in highly crowded environments where many objects overlap, partly due to the limited number of "instance kernels" it can process simultaneously. Furthermore, while it leads in the real-time category, there is still a performance gap between RMP-SAM and heavy, non-real-time foundation models.

Future work will focus on knowledge distillation—using a massive "teacher" model like SAM-2 to train the lightweight RMP-SAM "student"—to further boost accuracy without losing speed, as well as optimizing the architecture for specific mobile hardware deployments.

Summary updated

BibTeX
@inproceedings{xu2025rmp,
  author = {Shilin Xu and Haobo Yuan and Qingyu Shi and Lu Qi and Jingbo Wang and Yibo Yang and Yining Li and Kai Chen and Yunhai Tong and Bernard Ghanem and Xiangtai Li and Ming-Hsuan Yang},
  title = {{RMP-SAM: Towards Real-Time Multi-Purpose Segment Anything}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=1pXzC30ry5},
}
Figure