Spaces:
Running
Running
AMontiB
commited on
Commit
Β·
0301159
1
Parent(s):
9b289ad
update
Browse files
app.py
CHANGED
|
@@ -101,14 +101,11 @@ demo = gr.Blocks(title="Deepfake Detection", theme=gr.themes.Soft())
|
|
| 101 |
with demo:
|
| 102 |
gr.Markdown("# π Deepfake Detection Library")
|
| 103 |
gr.Markdown("""
|
| 104 |
-
|
| 105 |
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
- **CLIP-D**: CLIP-based detector
|
| 110 |
-
- **P2G**: Prompt2Guard detector
|
| 111 |
-
- **NPR**: Neural Posterior Regularization
|
| 112 |
""")
|
| 113 |
|
| 114 |
with gr.Row():
|
|
@@ -130,13 +127,42 @@ with demo:
|
|
| 130 |
show_copy_button=True
|
| 131 |
)
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
gr.Markdown("""
|
| 134 |
---
|
| 135 |
-
###
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
|
|
|
| 140 |
""")
|
| 141 |
|
| 142 |
submit_btn.click(
|
|
|
|
| 101 |
with demo:
|
| 102 |
gr.Markdown("# π Deepfake Detection Library")
|
| 103 |
gr.Markdown("""
|
| 104 |
+
This library collects a series of state-of-the-art methods for deepfake detection, allowing for free and unlimited use.
|
| 105 |
|
| 106 |
+
### Training & Performance
|
| 107 |
+
All methods have been trained using the **[DeepShield dataset](https://zenodo.org/records/15648378)**, which includes images generated with **Stable Diffusion XL** and **StyleGAN 2**.
|
| 108 |
+
You can expect performance comparable to the results shown in [Dell'Anna et al. (2025)](https://arxiv.org/pdf/2504.20658).
|
|
|
|
|
|
|
|
|
|
| 109 |
""")
|
| 110 |
|
| 111 |
with gr.Row():
|
|
|
|
| 127 |
show_copy_button=True
|
| 128 |
)
|
| 129 |
|
| 130 |
+
with gr.Accordion("π Model Details", open=False):
|
| 131 |
+
gr.Markdown("""
|
| 132 |
+
### **R50_TF**
|
| 133 |
+
* **Description**: A ResNet50 architecture modified to exclude downsampling at the first layer. It uses "learned prototypes" in the classification head for robust detection.
|
| 134 |
+
* **Paper**: [TrueFake: A Real World Case Dataset of Last Generation Fake Images also Shared on Social Networks](https://arxiv.org/pdf/2504.20658)
|
| 135 |
+
* **Code**: [GitHub Repository](https://github.com/MMLab-unitn/TrueFake-IJCNN25)
|
| 136 |
+
|
| 137 |
+
### **R50_nodown**
|
| 138 |
+
* **Description**: A ResNet-50 model without downsampling operations in the first layer, designed to preserve high-frequency artifacts common in synthetic images.
|
| 139 |
+
* **Paper**: [On the detection of synthetic images generated by diffusion models](https://arxiv.org/abs/2211.00680)
|
| 140 |
+
* **Code**: [GitHub Repository](https://grip-unina.github.io/DMimageDetection/)
|
| 141 |
+
|
| 142 |
+
### **CLIP-D**
|
| 143 |
+
* **Description**: A lightweight detection strategy based on CLIP features. It exhibits surprising generalization ability using only a handful of example images.
|
| 144 |
+
* **Paper**: [Raising the Bar of AI-generated Image Detection with CLIP](https://arxiv.org/abs/2312.00195v2)
|
| 145 |
+
* **Code**: [GitHub Repository](https://grip-unina.github.io/ClipBased-SyntheticImageDetection/)
|
| 146 |
+
|
| 147 |
+
### **P2G (Prompt2Guard)**
|
| 148 |
+
* **Description**: Uses Vision-Language Models (VLMs) with conditioned prompt-optimization for continual deepfake detection. It leverages read-only prompts for efficiency.
|
| 149 |
+
* **Paper**: [Conditioned Prompt-Optimization for Continual Deepfake Detection](https://arxiv.org/abs/2407.21554)
|
| 150 |
+
* **Code**: [GitHub Repository](https://github.com/laitifranz/Prompt2Guard)
|
| 151 |
+
|
| 152 |
+
### **NPR**
|
| 153 |
+
* **Description**: Focuses on Neighboring Pixel Relationships (NPR) to capture generalized structural artifacts stemming from up-sampling operations in generative networks.
|
| 154 |
+
* **Paper**: [Rethinking the Up-Sampling Operations in CNN-based Generative Network for Generalizable Deepfake Detection](https://arxiv.org/abs/2312.10461)
|
| 155 |
+
* **Code**: [GitHub Repository](https://github.com/chuangchuangtan/NPR-DeepfakeDetection)
|
| 156 |
+
""")
|
| 157 |
+
|
| 158 |
gr.Markdown("""
|
| 159 |
---
|
| 160 |
+
### References
|
| 161 |
+
1. Dell'Anna, S., Montibeller, A., & Boato, G. (2025). *TrueFake: A Real World Case Dataset of Last Generation Fake Images also Shared on Social Networks*. arXiv preprint arXiv:2504.20658.
|
| 162 |
+
2. Corvi, R., et al. (2023). *On the detection of synthetic images generated by diffusion models*. ICASSP.
|
| 163 |
+
3. Cozzolino, D., et al. (2023). *Raising the Bar of AI-generated Image Detection with CLIP*. CVPRW.
|
| 164 |
+
4. Laiti, F., et al. (2024). *Conditioned Prompt-Optimization for Continual Deepfake Detection*. arXiv preprint arXiv:2407.21554.
|
| 165 |
+
5. Tan, C., et al. (2024). *Rethinking the up-sampling operations in cnn-based generative network for generalizable deepfake detection*. CVPR.
|
| 166 |
""")
|
| 167 |
|
| 168 |
submit_btn.click(
|