OmerKurtulus commited on
Commit
8d8d6fd
·
verified ·
1 Parent(s): 6b8c319

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +107 -0
README.md CHANGED
@@ -1,3 +1,110 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - deepfake-detection
5
+ - ai-generated-image-detection
6
+ - synthetic-media
7
+ - image-forensics
8
+ - computer-vision
9
+ - clip
10
+ - siglip
11
+ base_model:
12
+ - openai/clip-vit-large-patch14
13
+ - google/siglip2-base-patch16-512
14
+ pipeline_tag: image-classification
15
  ---
16
+
17
+ # DeepReality: Layer 2 detector weights
18
+
19
+ Trained weights for the Layer 2 detection core of **DeepReality**, a six-layer
20
+ forensic system for detecting AI-generated and manipulated imagery.
21
+
22
+ **Source code, documentation and the full pipeline:**
23
+ https://github.com/OmerKurtulus/DeepReality
24
+
25
+ These files are the three detectors that were trained for the project. They are
26
+ not a standalone classifier: DeepReality reads them as three of fifteen
27
+ independent analysis modules, and its verdict is produced by a reasoning layer
28
+ that weighs them against documentary provenance, compression physics and
29
+ localisation evidence. Used alone, they carry the limitations described below.
30
+
31
+ ## Files
32
+
33
+ | File | Pin | Size | Architecture |
34
+ |---|---|---|---|
35
+ | `pin_b1_clip_ln_tune_final.pt` | PIN-B1 | 1.6 GB | CLIP ViT-L/14, frozen backbone with LayerNorm tuning |
36
+ | `pin_b2_siglip2_finetune_final.pt` | PIN-B2 | 1.4 GB | SigLIP2-base-patch16-512, full fine-tune |
37
+ | `pin_b3_freq_cnn_final.pt` | PIN-B3 | 19 MB | Frequency CNN over DCT/DWT maps, trained from scratch |
38
+
39
+ Two further models complete the detection core and are **not** hosted here.
40
+ PIN-B4 is a public third-party checkpoint
41
+ ([prithivMLmods/AI-vs-Deepfake-vs-Real-Siglip2](https://huggingface.co/prithivMLmods/AI-vs-Deepfake-vs-Real-Siglip2)),
42
+ and the PIN-F1 XGBoost meta-learner is small enough to be tracked directly in
43
+ the GitHub repository.
44
+
45
+ ## Usage
46
+
47
+ Download the three files into the `models/` directory of a DeepReality clone:
48
+
49
+ ```bash
50
+ git clone https://github.com/OmerKurtulus/DeepReality.git
51
+ cd DeepReality
52
+
53
+ hf download OmerKurtulus/deepreality-models --local-dir models
54
+ ```
55
+
56
+ PIN-B1 and PIN-B2 additionally fetch their base architectures from the Hub on
57
+ first run. Placement instructions and the remaining setup are in
58
+ [`models/README.md`](https://github.com/OmerKurtulus/DeepReality/blob/main/models/README.md).
59
+
60
+ ## Training data
61
+
62
+ All three detectors were trained on **OpenDeepfake-Preview**, 20,000 images.
63
+
64
+ ## Reported performance
65
+
66
+ Held-out results on the training corpus:
67
+
68
+ | Pin | Accuracy | ROC-AUC |
69
+ |---|---|---|
70
+ | PIN-B1 | 99.77% | 0.9997 |
71
+ | PIN-B2 | 99.97% | 1.0000 |
72
+ | PIN-B3 | 96.50% | 0.9923 |
73
+
74
+ ## Limitations, and why they matter
75
+
76
+ **Read the figures above as in-distribution performance. They do not survive a
77
+ change of corpus.** Measured on
78
+ [`ComplexDataLab/OpenFake`](https://huggingface.co/datasets/ComplexDataLab/OpenFake)
79
+ the same detectors fall to 0.51 to 0.84 ROC-AUC. On
80
+ [`Hemg/deepfake-and-real-images`](https://huggingface.co/datasets/Hemg/deepfake-and-real-images)
81
+ all four sit at chance, and PIN-B3 is anti-correlated with the label, which is
82
+ worse than noise because a downstream fusion stage learns to trust it backwards.
83
+
84
+ This generalisation gap is the reason DeepReality exists. A single detector
85
+ reporting 99% on its own benchmark tells you very little about an unseen
86
+ generator, which is why the system combines paradigms that fail differently and
87
+ subordinates all of them to documentary provenance when provenance is present.
88
+
89
+ The only figure measured by cross-validation on a corpus none of these detectors
90
+ saw in training is the Layer 6 meta-learner: ROC-AUC 0.8846 at an Expected
91
+ Calibration Error of 0.0203. That is the conservative number, and the one to
92
+ quote.
93
+
94
+ **Intended use.** Research and assistive review. These weights should not be
95
+ used as the sole basis for a consequential decision about a specific image or
96
+ person.
97
+
98
+ ## Licence and citation
99
+
100
+ Released under the MIT licence. If you use this work, please cite it:
101
+
102
+ ```bibtex
103
+ @software{kurtulus2026deepreality,
104
+ author = {Kurtulus, Omer Faruk},
105
+ title = {DeepReality: PIN Architecture for Multi-Layer AI Image Forensics},
106
+ year = {2026},
107
+ url = {https://github.com/OmerKurtulus/DeepReality},
108
+ license = {MIT}
109
+ }
110
+ ```