This is the implementation of the paper [Image Tampering Localization Using Unified Two-Stream Features Enhanced with Channel and Spatial Attention] (PRCV 2021).
Perform the training process by using train_mask.py, where self.tfmodel is the path to a pre-trained model and the function combined_roidb accepts a dataset name as its parameter. Modify the corresponding parts and then run:
python train_mask.py
Perform the training process by using test_mask.py. Change the path to the model and the name of dataset by modifying the defaults and then run:
python test_mask.py
lib/datasets:contain the code for different datasets
lib/datasets/factory.py:set the path for different datasets
lib/nets:contain the code for different networks
lib/config/config.py:set the hyper parameters
'learning_rate':the learning rate
'MASK_BATCH':the number of RoIs in the Mask branch
'max_iters':max iterations
'display':the number of iterations that the value of loss will be shown
'snapshot_iterations':the number of iterations that the model will be saved
The codes are modified from https://github.com/LarryJiang134/Image_manipulation_detection and https://github.com/HuizhouLi/Constrained-R-CNN.