benjaik commited on
Commit
0997ec9
·
verified ·
1 Parent(s): c1e4351

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +71 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ library_name: pytorch
4
+ tags:
5
+ - image-forensics
6
+ - image-manipulation-detection
7
+ - image-segmentation
8
+ - trufor
9
+ - pytorch
10
+ ---
11
+
12
+ # TruFor Phase-2 Localization Checkpoints
13
+
14
+ This repository stores phase-2 localization checkpoints trained with the
15
+ official [TruFor](https://github.com/grip-unina/TruFor) PyTorch implementation.
16
+ TruFor detects and localizes manipulated regions in images using RGB and
17
+ Noiseprint++ features.
18
+
19
+ ## Training summary
20
+
21
+ - Architecture: TruFor localization network (`detconfcmx`, SegFormer-B2 backbone)
22
+ - Training datasets: IMD2020, CASIA 2.0 revised, and CocoGlide
23
+ - Training crop: 512 x 512
24
+ - Epochs: 30
25
+ - Optimizer: SGD
26
+ - Initial learning rate: 0.005
27
+ - Batch size: 1 per GPU
28
+ - Hardware: NVIDIA GeForce RTX 2080 Ti (11 GiB)
29
+ - Validation maximum crop: 1024 x 1024
30
+
31
+ Final recorded validation results:
32
+
33
+ - Loss: 0.657
34
+ - Best `avg_p-F1_smooth`: 0.5505
35
+ - Class IoU: `[0.90797067, 0.17650062]`
36
+
37
+ ## Files
38
+
39
+ - `weights/best.pth.tar`: best checkpoint selected by `avg_p-F1_smooth`
40
+ - `weights/checkpoint.pth.tar`: final epoch-30 resume checkpoint
41
+ - `config/trufor_ph2.yaml`: training configuration
42
+ - `logs/trufor_ph2_gpu1.log`: complete training log
43
+ - `code/`: the locally patched training/device-placement files and launchers
44
+ - `SHA256SUMS`: checkpoint integrity hashes
45
+
46
+ ## Loading
47
+
48
+ These are native TruFor/PyTorch checkpoints, not Transformers checkpoints.
49
+ Use them with the TruFor training/inference code. For phase-2 inference, place
50
+ the selected checkpoint at `weights/trufor_ph2/best.pth.tar`, or pass the path
51
+ through the project's `TEST.MODEL_FILE` configuration option.
52
+
53
+ ## Local compatibility changes
54
+
55
+ The accompanying files document changes needed on the training server:
56
+
57
+ - consistent CUDA placement for model, inputs, labels, losses, and resumed
58
+ optimizer state;
59
+ - corrected eight malformed CASIA list entries;
60
+ - validation crops limited to 1024 pixels to fit an 11 GiB GPU;
61
+ - a dedicated CUDA-10.2-compatible Conda environment.
62
+
63
+ ## License and attribution
64
+
65
+ The upstream TruFor license permits informational and nonprofit use and imposes
66
+ additional restrictions. This repository does not relicense the original code
67
+ or weights. Review `LICENSE.txt`, `LICENSE_CMX.txt`, and the upstream repository
68
+ before use or redistribution.
69
+
70
+ TruFor paper: *TruFor: Leveraging All-Round Clues for Trustworthy Image Forgery
71
+ Detection and Localization*, CVPR 2023.