This is the repository for paper Shallow- and Deep-fake Image Manipulation Localization Using Deep Learning accepted to ICNC 2023.
The deepfake dataset we constructed in Section II.C of our paper can be downloaded here.
Shallowfake dataset used in our paper can be downloaded individually via the following links:
The way (file paths) of how we split the datasets into train/val/test subsets can be downloaded here.
The format of each line in these files is as the following. For authentic images, /path/to/mask.png
and /path/to/egde.png
are set to string None
. We use digit 0
to represent authentic images, and 1
to represent manipulated images.
/path/to/image.png /path/to/mask.png /path/to/egde.png 0/1
Run the following code to train the network.
For the option --model
, to reproduce experiments in Table III of our paper:
- Use
mvssnet
for experiments 1/2/3; - Use
upernet
for experiments 4/5/6; - Use
ours
for experiments 7/8/9.
python -u train_torch.py --paths_file /path/to/train.txt --val_paths_file /path/to/val.txt --model {mvssnet, upernet, ours}
Run the following code to evaluate the network.
Trained models for experiments in Table III of our paper can be found in the following links: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9.
python -u evaluate.py --paths_file /path/to/test.txt --load_path /path/to/trained/model.path --model {mvssnet, upernet, ours}