CamoFocus: Enhancing Camouflage Object Detection with Split-Feature Focal Modulation and Context Refinement

Abbas Khan, Mustaqeem Khan, Wail Gueaieb, Abdulmotaleb El-Saddik, Giulia De Masi, Fakhri Karray

Abstract

Camouflage Object Detection (COD) is a challenging task due to the high similarity between targets and their backgrounds. While Vision Transformers (ViTs) have set new benchmarks, their computational cost is significant. This paper introduces CamoFocus, an efficient framework that utilizes "Focal Modulation" to explicitly separate foreground and background features. By refining these features across multiple scales, CamoFocus achieves state-of-the-art performance with a leaner parameter footprint.

Introduction

Detecting camouflaged objects is often described as a "needle in a haystack" problem. Unlike generic object detection, camouflaged targets are naturally or artificially designed to blend seamlessly with their environment's texture and color. Existing state-of-the-art (SOTA) methods frequently rely on complex attention mechanisms which, while powerful, often struggle with fine-grained structural details and carry high computational overhead. CamoFocus addresses these challenges by rethinking feature interaction through a split-stream modulation approach.

Methodology

The CamoFocus architecture is designed around three primary components that prioritize efficiency and structural clarity.

The CamoFocus architecture overview, highlighting the Backbone, Feature Split and Modulation (FSM) stages, and the Context Refinement Module (CRM).

Feature Split and Modulation (FSM)

The core innovation of CamoFocus is the FSM module. Rather than processing feature maps uniformly, FSM uses a predicted supervisory mask to bifurcate features into Foreground and Background streams. Each stream is processed by dedicated modulators (FM and BM) using depth-wise convolutions with varying kernel sizes. This explicit separation prevents "feature washing," where dominant background noise might otherwise obscure subtle object details.

Context Refinement Module (CRM)

To handle objects of varying scales, the CRM fuses multi-scale features. It employs dilated convolutions and skip connections to capture a wider receptive field without significantly increasing the parameter count. This ensures that both global context and local details are preserved.

Hybrid Loss Function

Training is guided by a combination of Weighted Binary Cross-Entropy (BCE), Weighted Intersection Over Union (IoU), and Dice Loss. This hybrid approach forces the model to focus on challenging boundary pixels and maintain the overall structural integrity of the detection.

Experiments and Results

CamoFocus was evaluated on four major COD benchmarks: CAMO, COD10K, NC4K, and CHAMELEON.

Performance Metrics

On the NC4K dataset, CamoFocus achieved a Structure-Measure ($S_m$) of 0.889. Notably, it outperformed larger models like CamoFormer-P4 while utilizing a more compact backbone. This demonstrates that architectural innovation in feature modulation can be more effective than simple scaling.

Qualitative Analysis

Visual results indicate that CamoFocus excels at recovering sharp boundaries, particularly for thin or highly obscured objects such as insect legs or sticks, which competing models often blur into the background.

Qualitative comparison of CamoFocus against other state-of-the-art COD methods across various challenging scenarios.

Conclusion

CamoFocus presents a compelling alternative to attention-heavy COD models. By explicitly splitting foreground and background features and applying focal modulation, it achieves superior accuracy and efficiency. Future work may address the model's dependency on the initial mask generation and explore its application in video-based camouflage detection.

Summary updated

Abstract

Camouflage Object Detection (COD) involves the challenge of isolating a target object from a visually similar background, presenting a formidable challenge for learning algorithms. Drawing inspiration from state-of-the-art (SOTA) Focal Modulation Networks, our objective is to proficiently modulate the foreground and background components, thereby capturing the distinct features of each. We introduce a Feature Split and Modulation (FSM) module to attain this goal. This module efficiently separates the object from the background by utilizing foreground and background modulators guided by a supervisory mask. For enhanced feature refinement, we propose a Context Refinement Module (CRM), which considers features acquired from FSM across various spatial scales, leading to comprehensive enrichment and highly accurate prediction maps. Through extensive experimentation, we showcase the superiority of CamoFocus over recent SOTA COD methods. Our evaluations encompass diverse benchmark datasets, including CAMO, COD10K, CHAMELEON, and NC4K. The findings underscore the potential and significance of the proposed CamoFocus model and establish its efficacy in addressing the critical challenges of camouflage object detection.
BibTeX
@inproceedings{khan2024camofocus,
  author = {Abbas Khan and Mustaqeem Khan and Wail Gueaieb and Abdulmotaleb El-Saddik and Giulia De Masi and Fakhri Karray},
  title = {{CamoFocus: Enhancing Camouflage Object Detection with Split-Feature Focal Modulation and Context Refinement}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00146},
}
Figure