Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: gpl-3.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gpl-3.0
|
| 3 |
+
pipeline_tag: image-classification
|
| 4 |
+
tags:
|
| 5 |
+
- ai-detection
|
| 6 |
+
- deepfake-detection
|
| 7 |
+
- image-classification
|
| 8 |
+
- computer-vision
|
| 9 |
+
- pytorch
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# BAILU - Lightweight AI-Generated Image Detector
|
| 13 |
+
|
| 14 |
+
BAILU is a highly efficient deepfake detection model designed to identify AI-generated images from various image generation models. With only **2M parameters (~8MB)**, it achieves **95.88% overall accuracy** by analyzing artifacts/signatures unique to AI generation pipelines.
|
| 15 |
+
|
| 16 |
+
## 🎯 Key Features
|
| 17 |
+
|
| 18 |
+
- **Ultra-Lightweight**: 2M parameters, ~8MB model size - runs on CPU or GPU
|
| 19 |
+
- **Multi-VAE Detection**: Trained to detect artifacts from FLUX.1, FLUX.2, SDXL, and Stable Diffusion 1.5
|
| 20 |
+
- **High Accuracy**: 95.88% overall accuracy (97.75% AI detection rate, 94.00% real detection)
|
| 21 |
+
- **Fast Inference**: <10ms per image on modern GPUs
|
| 22 |
+
- **Open-Source Advocacy**: Built to demonstrate the importance of open-source model transparency
|
| 23 |
+
|
| 24 |
+
## 📊 Performance Metrics
|
| 25 |
+
|
| 26 |
+
| Metric | Score |
|
| 27 |
+
|--------|-------|
|
| 28 |
+
| **Overall Validation Accuracy** | 95.88% (767/800) |
|
| 29 |
+
| **Loss** | 0.2645 |
|
| 30 |
+
|
| 31 |
+
*Tested on balanced dataset of 400 AI-generated and 400 real images*
|
| 32 |
+
|
| 33 |
+
## 🎓 Training Details
|
| 34 |
+
|
| 35 |
+
- **Hardware**: NVIDIA RTX 5090
|
| 36 |
+
- **Training Time**: ~110 hours
|
| 37 |
+
- **Data Augmentation**: Random crops, flips, compression, resizing
|
| 38 |
+
- **Optimizer**: AdamW (lr=1e-4, weight_decay=1e-4)
|
| 39 |
+
- **Scheduler**: CosineAnnealingLR (T_max=50)
|
| 40 |
+
- **Loss**: Binary Cross-Entropy with Logits
|
| 41 |
+
|
| 42 |
+
## 🌍 Why Open-Source Matters for Deepfake Detection
|
| 43 |
+
|
| 44 |
+
This model was only possible because companies like Black Forest Labs and Stability AI release their models publicly. Private, closed-source models create detection blind spots—we cannot defend against what we cannot study.
|
| 45 |
+
We strongly encourage all AI companies to open-source their models to enable:
|
| 46 |
+
|
| 47 |
+
- Effective deepfake detection research
|
| 48 |
+
- Transparency in AI development
|
| 49 |
+
- Collaborative safety measures
|
| 50 |
+
- Public trust through verifiable defenses
|
| 51 |
+
|
| 52 |
+
Detection must keep pace with generation. That requires open access.
|
| 53 |
+
## ⚠️ Important Limitations
|
| 54 |
+
|
| 55 |
+
- Not foolproof: Adversarial attacks and new model architectures may evade detection (**We plan to train model capable of detecting adversarial attacks later.**)
|
| 56 |
+
- No attribution: Cannot identify which specific AI model created an image
|
| 57 |
+
- Temporal degradation: Effectiveness may decrease as new AI models emerge
|
| 58 |
+
|
| 59 |
+
Disclaimer: This tool is for research and educational purposes. Results should not be used as sole evidence in legal or high-stakes decisions without human expert verification.
|