SAM-PM: Enhancing Video Camouflaged Object Detection using Spatio-Temporal Attention
Muhammad Nawfal Meeran, Gokul Adethya T, Bhanu Pratyush Mantha
TL;DR
This work addresses video camouflaged object detection (VCOD) by augmenting the Segment Anything Model (SAM) with a lightweight Propagation Module (SAM-PM) that enforces temporal coherence via spatio-temporal cross-attention. The PM comprises a Temporal Fusion Mask Module (TFMM) and a Memory Prior Affinity Module (MPAM); SAM remains frozen, and only the PM is trained, with memory of frames enabling mask propagation across time using under $10^6$ trainable parameters. The approach achieves state-of-the-art results on MoCA-Mask and CAD, showing substantial improvements across standard VCOD metrics while maintaining parameter efficiency. This demonstrates a practical pathway to infusing temporal and domain-specific knowledge into large foundation models for video segmentation, accompanied by open-source code for reproducibility.
Abstract
In the domain of large foundation models, the Segment Anything Model (SAM) has gained notable recognition for its exceptional performance in image segmentation. However, tackling the video camouflage object detection (VCOD) task presents a unique challenge. Camouflaged objects typically blend into the background, making them difficult to distinguish in still images. Additionally, ensuring temporal consistency in this context is a challenging problem. As a result, SAM encounters limitations and falls short when applied to the VCOD task. To overcome these challenges, we propose a new method called the SAM Propagation Module (SAM-PM). Our propagation module enforces temporal consistency within SAM by employing spatio-temporal cross-attention mechanisms. Moreover, we exclusively train the propagation module while keeping the SAM network weights frozen, allowing us to integrate task-specific insights with the vast knowledge accumulated by the large model. Our method effectively incorporates temporal consistency and domain-specific expertise into the segmentation network with an addition of less than 1% of SAM's parameters. Extensive experimentation reveals a substantial performance improvement in the VCOD benchmark when compared to the most recent state-of-the-art techniques. Code and pre-trained weights are open-sourced at https://github.com/SpiderNitt/SAM-PM
