Detective SAM: Adapting SAM to Localize Diffusion-based Forgeries via Embedding Artifacts
Abstract
Image forgery localization in the diffusion eraposes new challenges as modern editing pipelinesproduce photorealistic, semantically coherent manipulations that bypass conventional detectors.While some recent methods leverage foundationmodel cues or handcrafted noise residuals, theystill miss the subtle embedding artifacts introduced by modern diffusion pipelines. In response,we develop Detective SAM, which extends theSegment Anything Model by incorporating a blur based detection signal, learnable coarse-to-fineprompt generation, and lightweight fine-tuningfor automatic forgery mask generation. Detective SAM localizes forgeries with high precision.On three challenging benchmarks (MagicBrush,CoCoGlide, and IMD2020), it outperforms priorstate-of-the-art methods, demonstrating the powerof combining explicit forensic perturbation cueswith foundation-model adaptation for robust image forgery localization in the diffusion era. The code will be published in the anonymous repository https://anonymous.4open.science/r/DetectiveSAM-BC61 .