This is the official repo for paper: TBFormer: Two-Branch Transformer for Image Forgery Localization
Image forgery localization aims to identify forged regions by capturing subtle traces from high-quality discriminative features. In this paper, we propose a Transformer-style network with two feature extraction branches for image forgery localization, and it is named as Two-Branch Transformer (TBFormer). Firstly, two feature extraction branches are elaborately designed, taking advantage of the discriminative stacked Transformer layers, for both RGB and noise domain features. Secondly, an Attention-aware Hierarchical-feature Fusion Module (AHFM) is proposed to effectively fuse hierarchical features from two different domains. Although the two feature extraction branches have the same architecture, their features have significant differences since they are extracted from different domains. We adopt position attention to embed them into a unified feature domain for hierarchical feature investigation. Finally, a Transformer decoder is constructed for feature reconstruction to generate the predicted mask. Extensive experiments on publicly available datasets demonstrate the effectiveness of the proposed model.
Our project is developed based on MMsegmentation.
- Please install MMSegmentation follow the official tutorial.
- Move the files provided here to the folder corresponding to MMSegmentation.
Please download our pre-trained modle here and place it under /checkpoint directory.
- TBFormer(Extraction code: tbfm)
- You can run a simple demo:
python demo/demo.py
Our synthesized dataset can be downloaded here.
- Mydata(Extraction code: lbmd; Decompression password: mdtvtlb22)
If you enounter any questions, please contact [email protected]