arXiv:2508.15313cs.CVcs.AI2025-08

不训练也能检测伪装物体,靠检索生成提示+模型分割。

First RAG, Second SEG: A Training-Free Paradigm for Camouflaged Object Detection

  • 用无监督聚类构建小数据库,检索特征生成粗略掩码作提示。
  • 在个人笔记本上运行,性能媲美甚至超过现有方法。
  • 无需调参或训练,适合资源有限的实时应用。

伪装物体检测(COD)因目标与背景高度相似而极具挑战性。现有方法多依赖大量训练和计算资源。尽管基础模型如分割一切模型(SAM)具备良好泛化能力,但在未微调情况下仍难胜任COD任务,且需高质量提示才能取得良好效果,而手动生成提示成本高、效率低。为此,我们提出无需训练的范式First RAG, Second SEG(RAG-SEG),将检测分为两阶段:先通过检索增强生成(RAG)生成粗掩码作为提示,再由SAM2进行精修分割。RAG-SEG利用无监督聚类构建紧凑检索数据库,实现快速有效特征检索;推理时,检索到的特征生成伪标签,引导SAM2生成精确掩码。该方法无需传统训练,同时保持竞争力。在多个基准COD数据集上的实验表明,RAG-SEG性能达到或超越当前最优方法。值得注意的是,所有实验均在一台个人笔记本上完成,凸显其计算高效与实用性。附录中进一步分析了局限性、显著物体检测扩展及改进方向。

原文摘要 · Abstract (English)

Camouflaged object detection (COD) poses a significant challenge in computer vision due to the high similarity between objects and their backgrounds. Existing approaches often rely on heavy training and large computational resources. While foundation models such as the Segment Anything Model (SAM) offer strong generalization, they still struggle to handle COD tasks without fine-tuning and require high-quality prompts to yield good performance. However, generating such prompts manually is costly and inefficient. To address these challenges, we propose \textbf{First RAG, Second SEG (RAG-SEG)}, a training-free paradigm that decouples COD into two stages: Retrieval-Augmented Generation (RAG) for generating coarse masks as prompts, followed by SAM-based segmentation (SEG) for refinement. RAG-SEG constructs a compact retrieval database via unsupervised clustering, enabling fast and effective feature retrieval. During inference, the retrieved features produce pseudo-labels that guide precise mask generation using SAM2. Our method eliminates the need for conventional training while maintaining competitive performance. Extensive experiments on benchmark COD datasets demonstrate that RAG-SEG performs on par with or surpasses state-of-the-art methods. Notably, all experiments are conducted on a \textbf{personal laptop}, highlighting the computational efficiency and practicality of our approach. We present further analysis in the Appendix, covering limitations, salient object detection extension, and possible improvements. \textcolor{blue} {Code: https://github.com/Lwt-diamond/RAG-SEG.}

伪装检测零样本SAM高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。