SARIF: Segment Anything for Robust Image Forensics
Abstract
Image forgery localization remains challenging due to di-verse manipulation techniques and distribution shifts. Existing recentforgery localization models achieve high accuracy on benchmarks butoften struggle with cross-domain generalization and robustness. In thispaper, we propose SARIF (Segment Anything for Robust Im-age Forensics), a framework that leverages Segment Anything Model(SAM), which has a promptable architecture and generalization abilityto overcome these limitations. SARIF introduces a feedback-guided maskdecoder and a dual-encoder design that extracts forgery-specific informa-tion to capture forensic traces while exploiting SAM’s architecture. Tolocalize manipulated regions, we design a block-wise prompting mecha-nism that derives forgery-specific cues from residual features between anadapted encoder and its frozen counterpart. These features are fused withthe previous mask prompt to drive a feedback-based mask refinementprocess, enabling automatic forgery segmentation without manual in-put. Extensive experiments on standard forgery-localization benchmarksshow that SARIF achieves strong average cross-dataset performance androbustness to common image corruptions. Our SARIF code is availablein GitHub Link.