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(提取码:tbfm)
- You can run a simple demo:
python demo/demo.py
Our synthesized dataset can be downloaded here. Extraction code and decompression password can be obtained by contacting us via email.
If you enounter any questions, please contact [email protected]