CamDiff: Camouflage Image Augmentation via Diffusion

Xue-Jing Luo, Shuo Wang, Zongwei Wu, Christos Sakaridis, Yun Cheng, Deng-Ping Fan, Luc Van GoolCAAI 2023

Abstract

Camouflaged Object Detection (COD) aims to identify objects that blend seamlessly into their environments. While current learning-based models show high performance, they often lack robustness, frequently misclassifying salient (highly visible) objects as camouflaged. This paper introduces CamDiff, a novel augmentation framework that leverages Latent Diffusion Models (LDM) to synthesize salient objects within camouflaged scenes. By incorporating the Contrastive Language-Image Pre-training (CLIP) model to ensure semantic alignment, CamDiff generates "multi-pattern" training samples that force models to distinguish between true camouflage and mere foreground saliency. Experimental results demonstrate that models trained with CamDiff-augmented data exhibit significantly improved robustness and accuracy across diverse domains.

Introduction: The Robustness Gap in COD

The primary challenge in Camouflaged Object Detection is the subtle boundary and texture similarity between the target and its background. However, a critical limitation of existing COD models is their "lazy" learning behavior: they often learn to identify any prominent foreground object rather than specifically isolating camouflaged patterns.

This robustness gap is most evident when a salient distractor is introduced into a scene. Because standard training datasets rarely contain both hidden and obvious objects in the same frame, models fail to learn the semantic difference between high-contrast saliency and low-contrast camouflage.

Comparison of various COD models on a scene with a salient distractor. Most models incorrectly identify the salient orange ball as camouflaged.

As shown in the figure above, state-of-the-art models like SINet and ZoomNet often focus on salient distractors (e.g., the orange ball) while ignoring the actual camouflaged target or producing false positives in empty regions.

Methodology: The CamDiff Framework

To address the scarcity of multi-pattern training data, the authors propose CamDiff, an AI-Generated Content (AIGC) approach to dataset augmentation. The framework consists of four key stages:

  1. Semantic-Aware Splitting: The input image is divided into a grid, and a region outside the original camouflage ground-truth (GT) mask is selected for editing.
  2. Salient Object Generation: A pre-trained Latent Diffusion Model (LDM) performs inpainting based on a text prompt (e.g., "Rabbit" or "Ball") to generate a high-quality, salient object in the selected region.
  3. CLIP-Based Verification: To ensure the generated object matches the intended prompt and remains salient, the CLIP model provides zero-shot classification. If the match is poor, the generation is retried.
  4. Label Preservation: Since the new object is placed strictly outside the original mask, the original camouflage labels remain valid, creating a "negative sample" distractor that does not interfere with the primary task.

Experimental Setup and Datasets

The study utilizes four major COD benchmarks: CAMO, CHAM, COD10K, and NC4K. A new benchmark, Diff-COD, was created using the CamDiff framework, comprising a training set of 4,040 augmented images and a testing set of 5,395 synthesized images. To verify the saliency of the generated objects, standard Salient Object Detection (SOD) datasets like DUTS-TE were also employed.

Key Insights and Results

The researchers found that saliency and camouflage represent opposite ends of a visual spectrum. By introducing salient distractors, models are forced to move beyond simple "foreground detection" and instead learn the intricate texture and boundary nuances required for true camouflage detection.

Performance and Robustness

  • Baseline Failure: When tested on the new Diff-COD dataset, the performance of pre-trained models plummeted, confirming that they were largely relying on saliency cues.
  • Retraining Benefits: After retraining on the Diff-COD augmented set, models showed a dramatic increase in robustness. They successfully ignored salient distractors while maintaining high accuracy on camouflaged targets.
  • Human Validation: A user study revealed that 98% of participants noticed the synthesized salient objects before the camouflaged ones, confirming that the distractors effectively draw attention as intended.

Conclusion

CamDiff demonstrates that semantic augmentation via diffusion models is a powerful tool for improving model robustness. By teaching AI the difference between "hidden" and "obvious," the framework bridges the gap between laboratory performance and real-world reliability in camouflaged object detection. Future work will focus on increasing generation resolution and exploring more complex scenes with multiple salient distractors.

Summary updated

BibTeX
@inproceedings{luo2023camdiff,
  author = {Xue-Jing Luo and Shuo Wang and Zongwei Wu and Christos Sakaridis and Yun Cheng and Deng-Ping Fan and Luc Van Gool},
  title = {{CamDiff: Camouflage Image Augmentation via Diffusion}},
  booktitle = {CAAI},
  year = {2023},
  doi = {10.26599/air.2023.9150021},
}
Figure