Referring Camouflaged Object Detection With Multi-Context Overlapped Windows Cross-Attention

Yu Wen, Shuyong Gao, Shu-Ping Zhang, Miao Huang, Lili Tao, Han Yang, Haozhe Xing, Lihe Zhang, Boxue HouarXiv 2025 · DOI

Introduction

Camouflaged Object Detection (COD) is a challenging computer vision task that involves identifying objects evolved or designed to blend seamlessly into their surroundings, such as leaf insects or animals in their natural habitats. Referring COD (Ref-COD) adds a layer of complexity by providing a "reference"—either a salient image of a similar object or a descriptive text—to guide the model's search.

Existing Ref-COD methods often suffer from two primary limitations: information loss and data inefficiency. Many models compress reference images into one-dimensional global prompts, discarding the rich spatial details like textures and contours necessary for fine-grained matching. Furthermore, these models often require a large number of reference images (e.g., 10+) to achieve high performance. This paper introduces RFMNet (Referring Feature Multi-context Network), a framework that leverages multi-context feature fusion and a novel local attention mechanism to achieve state-of-the-art results with significantly fewer references.

Methodology

RFMNet is designed to preserve and exploit multi-scale spatial information through three key architectural innovations:

Multi-Context Referring Information Fusion (RIF)

Instead of relying on a single global prompt, the RIF module extracts features from multiple stages of the reference image's encoding process. This allows the model to simultaneously utilize high-level semantic information and low-level structural details. For text-based references, the model employs a pre-trained CLIP text encoder coupled with a semantics-guided enhancement module to highlight relevant features in the camouflage map.

Overlapped Windows Cross-attention (OWCA)

In camouflage detection, global context can often be misleading because the target and background are visually similar. The OWCA module addresses this by dividing the camouflage image into overlapping windows and performing cross-attention with reference features within these local regions. This forces the model to focus on subtle local textural discrepancies that distinguish the object from its environment.

Referring Feature Aggregation (RFA)

The RFA module serves as a specialized decoder that progressively merges fused features from high-resolution to low-resolution layers. This step-by-step refinement ensures that the final segmentation mask maintains sharp boundaries and accurate object localization.

The overall architecture of RFMNet, illustrating the flow from image/text encoders through the Referring Information Fusion (RIF) and Referring Feature Aggregation (RFA) stages.

Experimental Results

The model was evaluated on the R2C7K dataset, a standard benchmark for Ref-COD. To facilitate text-referring experiments, the authors used the large-scale multimodal model mPLUG-Owl2 to generate detailed descriptions for the dataset's images.

Quantitative Performance

RFMNet achieved state-of-the-art results across all major metrics ($S_\alpha$, $F_\beta^\omega$, $M$). Using a ResNet-50 backbone, RFMNet-S showed a 6.25% average performance gain in Mean Absolute Error (M) over previous leading models. When scaled to a Swin-Transformer-S backbone, the model reached a Structure-measure ($S_\alpha$) of 0.875. Notably, RFMNet outperformed models using ten reference images while using only three, proving its superior data efficiency.

Qualitative Analysis

Visual comparisons demonstrate that RFMNet is significantly more robust in "uncertainty" scenarios where the background is highly complex. It also excels at accurately segmenting very small objects and handling occlusions that typically cause other models to fail.

Qualitative comparison of RFMNet against state-of-the-art methods across various challenging scenarios like small objects, occlusion, and background uncertainty.

Conclusion

RFMNet demonstrates that the quality of feature extraction and local spatial matching is more critical than the quantity of reference data in Ref-COD. By utilizing multi-context fusion and overlapped window attention, the model effectively bridges the gap between reference guidance and hidden target detection. Future work will focus on integrating image and text modalities simultaneously and extending the model to handle scenes with multiple different camouflaged categories.

Summary updated

BibTeX
@misc{wen2025referring,
  author = {Yu Wen and Shuyong Gao and Shu-Ping Zhang and Miao Huang and Lili Tao and Han Yang and Haozhe Xing and Lihe Zhang and Boxue Hou},
  title = {{Referring Camouflaged Object Detection With Multi-Context Overlapped Windows Cross-Attention}},
  year = {2025},
  eprint = {2511.13249},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.13249},
}
Figure