Evaluating SAM2's Role in Camouflaged Object Detection: From SAM to SAM2

Lv Tang, Bo LiarXiv 2024 · DOI

Abstract

Meta’s Segment Anything Model 2 (SAM2) represents a significant advancement in video segmentation and prompt-based computer vision. However, recent evaluations in Camouflaged Object Detection (COD) reveal a surprising regression: while SAM2 excels at following explicit instructions, it is significantly less sensitive than its predecessor, SAM, when operating autonomously. This report explores the trade-offs between architectural precision and perceptual sensitivity in the SAM family.

Introduction

The Segment Anything Model (SAM) was a foundational milestone for computer vision, enabling zero-shot segmentation of nearly any object. Its successor, SAM2, was designed to improve speed, accuracy, and temporal consistency for video tasks. To "stress test" these improvements, researchers applied both models to Camouflaged Object Detection (COD)—the challenging task of identifying objects that blend into their background. The results suggest that the evolution toward precision may have come at the cost of "perceptual curiosity."

Methodology

The study compared SAM and SAM2 across three primary scenarios:

  1. Video Camouflaged Object Detection (VCOD): Assessing SAM2’s ability to track camouflaged entities across video sequences using initial frame prompts.
  2. Promptable Segmentation: Integrating Multimodal Large Language Models (MLLMs) like Shikra and LLaVA to provide coordinate "hints" to the models.
  3. Autonomous "Auto Mode": Evaluating the models' ability to segment "everything" in a static image without any external guidance or bounding boxes.

The "Auto Mode" Paradox

The most significant finding is the drastic reduction in sensitivity during autonomous operation. In "everything" mode, SAM2 predicts between 6 and 10 times fewer masks than SAM. While SAM2 produces cleaner boundaries once an object is identified, it often fails to detect camouflaged objects entirely when left to its own devices.

Visual comparison of mask density in auto mode.

As shown in the figure above, SAM's higher sensitivity allows it to identify subtle, low-contrast boundaries that SAM2 ignores. For instance, in the NC4K dataset, SAM generated over 347,000 masks, whereas SAM2 generated only approximately 34,000.

Quantitative Results

When provided with prompts, the performance hierarchy flips. SAM2 consistently outperforms SAM when guided by MLLM-generated coordinates, demonstrating superior boundary refinement and object understanding.

Quantitative comparison of SAM and SAM2 across major COD benchmarks.

Key performance highlights include:

  • Video Dominance: On the MoCA-Mask dataset, SAM2 achieved a weighted F-measure ($F_\beta^w$) of 0.691, significantly outperforming the previous state-of-the-art (0.444).
  • Prompted Accuracy: Using LLaVA prompts on the NC4K benchmark, SAM2 reached an $S_\alpha$ of 0.776, compared to SAM’s 0.699.
  • Auto Mode Decline: Conversely, on the COD10K dataset in autonomous mode, SAM’s $S_\alpha$ of 0.783 far exceeded SAM2’s 0.549.

Conclusion

SAM2 is a superior "tool" for guided tasks and video tracking, but it is currently a less effective "scout" for autonomous discovery in complex, camouflaged environments. Future iterations of the Segment Anything architecture should aim to reconcile SAM's high-sensitivity discovery with SAM2's precision and temporal stability.

Summary updated

BibTeX
@misc{tang2024evaluating,
  author = {Lv Tang and Bo Li},
  title = {{Evaluating SAM2's Role in Camouflaged Object Detection: From SAM to SAM2}},
  year = {2024},
  eprint = {2407.21596},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.21596},
}
Figure