Dirs:
Models-> Source codes of our framework
checkpoints-> The pretrained model fine-tuned on NIST dataset
samples-> Several forged samples and the corresponding masks
Install the relevant libs according to requirements.txt. Our codes are written in Keras with the TensorFlow backend.
tensorflow==1.14.0
keras==2.3.1
View and run demo.ipynb with Jupyter Notebook. Some examples and demo are provided in demo.ipynb. One may view some samples predicted by our model and run this demo to localize the tampered regions of forged image.
Kindly note that the pretrained model was only fine-funed on NIST dataset. Thus, to obtain more robust performance, one need to train the model on more datasets.
Modify train.py and load_dataset.py to load new datasets. Run the code for training:
python train.py
!!!Updated for visulization!!!
To view the feature maps of the CW-HPF and Forgery Attention Module, we provide the code for visulization. Please run the code as follows:
''' python models/vis_code.py '''