---
license: apache-2.0
base_model: google/embeddinggemma-2
base_model_relation: finetune
library_name: sentence-transformers
pipeline_tag: image-classification
tags:
- ai-image-detection
- ai-generated-image-detection
- deepfake-detection
- smaug
- abacusai
---
## 1. Model Introduction
Smaug-AI-Image-Detector sets a new state of the art for open-source AI-generated image detection. It is a fine-tune of Google's
[EmbeddingGemma-2](https://huggingface.co/google/embeddinggemma-2) by Abacus.AI and the strongest open-source detector
on real-world images.
**A dedicated vision model, 41% smaller than its base.** We streamlined EmbeddingGemma-2 into a vision-only
architecture by removing its 305M-parameter audio tower: 439M parameters instead of 744M, with no loss in accuracy.
```python
import sys
from huggingface_hub import snapshot_download
sys.path.insert(0, snapshot_download("abacusai/Smaug-AI-Image-Detector"))
from smaug_image_detect import SmaugImageDetect # ships with this repo
detector = SmaugImageDetect.from_pretrained("abacusai/Smaug-AI-Image-Detector")
detector("photo.jpg") # 0.97 -> probability the image is AI-generated
```
## 2. Highlights
- **#1 on real-world images:** 0.973 AUC on OpenFake Reddit; the next best open-source detector scores 0.947.
- **Catches more at the same false-alarm rate:** at 5% false alarms it catches 86.7% of AI images on Reddit;
the next best catches 77.4%.
- **#1 on OpenFake Core** (0.991 AUC) and **#1 on average** across all three benchmarks (0.982 AUC).
- **Precise:** flags only 3.0% of real Reddit photos, 1.4% of real OpenFake photos and 0.4% of real
CommunityForensics photos as AI.
- **Current generators:** GPT-Image 2, Nano Banana Pro, Midjourney 7, Seedream 5, FLUX.2, Z-Image, Recraft, Ideogram,
ERNIE-Image, Sora 2 and Veo 3 frames, DALL·E 3, Firefly 3 and more.
- **Runs anywhere:** at 439M parameters it runs on a single consumer GPU (about 1 GB of memory), on Apple Silicon Macs
via Metal, or on a plain CPU, so images can be checked locally without sending them anywhere.
## 3. Model Summary
| Architecture | EmbeddingGemma-2 image encoder + linear classifier |
| Total Parameters | 439M (base model: 744M) |
| Audio Tower | Removed: vision-only architecture, −305M parameters |
| Input | Any image; scored as three 528 × 528 crops at native resolution |
| Output | Probability that the image is AI-generated |
| Hardware | NVIDIA GPU (~1 GB), Apple Silicon (Metal), or CPU |
| Precision | bfloat16 weights |
| Formats | PyTorch / sentence-transformers (this repo); GGUF for llama.cpp: Smaug-AI-Image-Detector-GGUF |
| Base Model | google/embeddinggemma-2 |
| Adaptation | Full fine-tune |
## 4. Evaluation
| Smaug-AI-Image-Detector | OpenFake-SwinV2 | Bombek1-SigLIP-DINOv2 | Thermostatic-Frontier | CommFor-384 | haywoodsloan-SwinV2 |
| AUC ↑ |
| OpenFake Reddit | 0.973 | 0.947 | 0.842 | 0.894 | 0.744 | 0.897 |
| OpenFake Core | 0.991 | 0.989 | 0.959 | 0.977 | 0.921 | 0.953 |
| CommunityForensics | 0.981 | 0.951 | 0.990 | 0.979 | 0.968 | 0.901 |
| Average | 0.982 | 0.962 | 0.930 | 0.950 | 0.878 | 0.917 |
| AI images caught at 5% false alarms ↑ |
| OpenFake Reddit | 86.7% | 77.4% | 54.0% | 60.8% | 34.8% | 59.4% |
| OpenFake Core | 95.8% | 95.0% | 83.9% | 87.9% | 68.2% | 83.1% |
| CommunityForensics | 92.2% | 81.8% | 96.2% | 91.6% | 83.2% | 74.5% |
| Real photos flagged as AI ↓ |
| OpenFake Reddit | 3.0% | 2.9% | 34.7% | 16.4% | 2.0% | 9.5% |
| OpenFake Core | 1.4% | 2.1% | 18.4% | 6.6% | 0.3% | 1.1% |
| CommunityForensics | 0.4% | 3.0% | 5.2% | 17.7% | 4.0% | 10.6% |
Bold = best in the row. Shading is relative within each row (darker = better). All models scored on the same 26,070 test images.
All open-source detectors tested
| Model | OpenFake Reddit | OpenFake Core | CommunityForensics | Average | Real photos flagged: Reddit / Core / CF |
|---|---|---|---|---|---|
| **Smaug-AI-Image-Detector** | 0.9730 | 0.9909 | 0.9808 | 0.9816 | 3.0% / 1.4% / 0.4% |
| [OpenFake-SwinV2](https://github.com/vicliv/OpenFake) | 0.9467 | 0.9886 | 0.9512 | 0.9622 | 2.9% / 2.1% / 3.0% |
| [s-gehring/detectra-openfake](https://huggingface.co/s-gehring/detectra-openfake) | 0.9359 | 0.9715 | 0.9535 | 0.9537 | 2.7% / 1.2% / 2.0% |
| [Thermostatic-Frontier](https://huggingface.co/Thermostatic/community-forensics-frontier-detector-2026-08) | 0.8935 | 0.9766 | 0.9792 | 0.9498 | 16.4% / 6.6% / 17.7% |
| [Bombek1-SigLIP-DINOv2](https://huggingface.co/Bombek1/ai-image-detector-siglip-dinov2) | 0.8418 | 0.9591 | 0.9900 | 0.9303 | 34.7% / 18.4% / 5.2% |
| [haywoodsloan-SwinV2](https://huggingface.co/haywoodsloan/ai-image-detector-deploy) | 0.8970 | 0.9528 | 0.9011 | 0.9170 | 9.5% / 1.1% / 10.6% |
| [TensorFold/detectra-v1](https://huggingface.co/TensorFold/detectra-v1) | 0.7483 | 0.9330 | 0.9652 | 0.8822 | 5.3% / 0.6% / 3.5% |
| [CommFor-384](https://huggingface.co/OwensLab/commfor-model-384) | 0.7441 | 0.9214 | 0.9678 | 0.8778 | 2.0% / 0.3% / 4.0% |
| [Ateeqq/ai-vs-human-image-detector](https://huggingface.co/Ateeqq/ai-vs-human-image-detector) | 0.8665 | 0.9045 | 0.6939 | 0.8217 | 27.2% / 14.3% / 40.1% |
| [Organika/sdxl-detector](https://huggingface.co/Organika/sdxl-detector) | 0.6625 | 0.6673 | 0.8243 | 0.7180 | 43.9% / 22.4% / 24.8% |
| [umm-maybe/AI-image-detector](https://huggingface.co/umm-maybe/AI-image-detector) | 0.7364 | 0.6007 | 0.6042 | 0.6471 | 13.8% / 17.3% / 15.3% |
## 5. Training Approach
- **Full fine-tune** of EmbeddingGemma-2's image encoder with a linear classifier on its embedding.
- **Native-resolution crops** keep the pixel-level traces that generators leave, instead of shrinking the image.
- **Robustness training** with resizing, recompression and blur, so scores hold up on shared and re-saved copies.
- **Hard negatives** from professional photography, so a polished real photo is not mistaken for AI.
## 6. Limitations
- Brand-new generators, or ones built to evade detectors, may get through.
- A real photo with a small AI-edited region may be scored as real.
- A score is evidence, not proof: do not use it as the only basis for decisions about people or their work.
## 7. Usage
```bash
pip install "sentence-transformers[image]" pillow
```
```python
from huggingface_hub import snapshot_download
import sys
path = snapshot_download("abacusai/Smaug-AI-Image-Detector")
sys.path.insert(0, path)
from smaug_image_detect import SmaugImageDetect
detector = SmaugImageDetect.from_pretrained(path) # NVIDIA GPU, Apple Silicon (Metal) or CPU, picked automatically
detector("photo.jpg") # -> float in [0, 1]
detector(["a.jpg", "b.png", pil_image], batch_size=16) # -> list of floats
detector("photo.jpg", crops=1) # 3x faster
```
0.5 is a good default threshold; raise it when a false alarm is costly.
**llama.cpp:** use [Smaug-AI-Image-Detector-GGUF](https://huggingface.co/abacusai/Smaug-AI-Image-Detector-GGUF). It includes the classification head and a client that applies the same crops; a GGUF of the image encoder alone returns an embedding, not a verdict.
## 8. License
Apache 2.0, the same license as the base model, EmbeddingGemma-2.
## 9. Citation
```bibtex
@misc{abacusai2026smaugaiimagedetector,
title = {Smaug-AI-Image-Detector},
author = {Abacus.AI},
year = {2026},
url = {https://huggingface.co/abacusai/Smaug-AI-Image-Detector}
}
```