IMDPrompter: Adapting SAM to Image Manipulation Detection by Cross-View Automated Prompt Learning
Quan Zhang, Yuxin Qi, Xi Tang, Jinwei Fang, Xi Lin, Ke Zhang, Chun Yuan
TL;DR
This work addresses image manipulation detection by repurposing SAM through automated cross-view prompt learning. It introduces IMDPrompter, which leverages four views—RGB and semantic-agnostic SRM, Bayer, and Noiseprint—and employs Optimal Prompt Selection, Cross-View Prompt Consistency, Cross-view Feature Perception, and a Prompt Mixing Module to enable end-to-end manipulation localization. The training objective combines L_Seg-sam, L_Seg-p, L_CPC, and L_Img-level with weights λ1, λ2, λ3, and uses an Otsu-based adaptive threshold for image-level decisions, yielding strong IND and OOD performance across five datasets. Empirical results show IMDPrompter outperforms state-of-the-art methods on pixel- and image-level metrics, with notable robustness to distortions and significant gains on out-of-domain data. This framework demonstrates the potential of automated prompt learning for leveraging large pretrained segmentation models in forensic vision tasks and could extend to other foundational models beyond SAM.
Abstract
Using extensive training data from SA-1B, the Segment Anything Model (SAM) has demonstrated exceptional generalization and zero-shot capabilities, attracting widespread attention in areas such as medical image segmentation and remote sensing image segmentation. However, its performance in the field of image manipulation detection remains largely unexplored and unconfirmed. There are two main challenges in applying SAM to image manipulation detection: a) reliance on manual prompts, and b) the difficulty of single-view information in supporting cross-dataset generalization. To address these challenges, we develops a cross-view prompt learning paradigm called IMDPrompter based on SAM. Benefiting from the design of automated prompts, IMDPrompter no longer relies on manual guidance, enabling automated detection and localization. Additionally, we propose components such as Cross-view Feature Perception, Optimal Prompt Selection, and Cross-View Prompt Consistency, which facilitate cross-view perceptual learning and guide SAM to generate accurate masks. Extensive experimental results from five datasets (CASIA, Columbia, Coverage, IMD2020, and NIST16) validate the effectiveness of our proposed method.
