--- license: apache-2.0 base_model: facebook/dinov2-small pipeline_tag: image-classification library_name: transformers datasets: - srishti-kaushik/COCO-2017 - finedet/openimages - OwensLab/CommunityForensics tags: - ai-image-detection - deepfake-detection - image-forensics - agent-forensics - dinov2 - onnx - transformers.js - ai-image-detector - ai-detector - synthetic-image-detection --- # Tamarillo/ai-image-forensics-guard-tiny > **Family Tiers:** [`ai-image-forensics-guard-tiny`](https://huggingface.co/Tamarillo/ai-image-forensics-guard-tiny) *(this model)* · [`ai-image-forensics-guard-small`](https://huggingface.co/Tamarillo/ai-image-forensics-guard-small) · [`ai-image-forensics-guard-base`](https://huggingface.co/Tamarillo/ai-image-forensics-guard-base) > **Interactive Browser Demo (100% Client-Side WASM):** [`Tamarillo/ai-image-forensics-guard-demo`](https://huggingface.co/spaces/Tamarillo/ai-image-forensics-guard-demo) **Ultra-Fast Edge CPU & Browser WASM Tier (22.1M, DINOv2-Small, 224px)** — an **Apache-2.0**, social-media-recompression-hardened AI-generated image forensics detector (native `AutoModelForImageClassification`, zero `trust_remote_code`) designed as a **1-line drop-in replacement** (`id2label = {0: "artificial", 1: "human"}`) for `umm-maybe/AI-image-detector` and `Organika/sdxl-detector` in Hugging Face `image-classification` pipelines, edge CPU sidecars, and client-side browser WASM (`Transformers.js`). ### Key Highlights - **Fastest evaluated model on 4-thread x86 CPU (`82.3 ms`, `88.5 MB` exact-parity FP32 ONNX)** — `1.71×` faster and `4.0×` smaller than `umm-maybe/AI-image-detector` (`140.9 ms`, `353.7 MB`) and faster than `CommunityForensics-ViT` (`94.0 ms`) and `Ateeqq` (`101.2 ms`). - **Outperforms `4×` larger `umm-maybe` & `Organika`:** Achieves **`28.52%`** 3-Corpus Unique Zero-Touch EER (`0.7862` AUC) and **`30.82%`** 4-Suite Zero-Touch EER vs. `umm-maybe` (`37.56%`) and non-commercial `Organika` (`36.27%`), while ranking **#3 overall on `Synthbuster` (`19.05%` EER / `0.899` AUC; at `0.50`: `42.9%` fake recall, `1.5%` real-photo FPR)**. - **Honest Tradeoff:** Larger/higher-resolution tiers (`Tamarillo small` `26.90%`, `Tamarillo base` `19.98%` 5-suite EER) and `haywoodsloan` (`20.68%`) / `CommunityForensics-ViT` (`25.45%`) / `Ateeqq` (`27.50%`) achieve lower overall EER than `tiny` (`30.53%`); choose `tiny` when `<85 ms` CPU or client-side browser WASM footprint is the primary constraint. ![Public OOD Pareto Frontier](assets/pareto.svg) --- ## Model Family & Recommended Tier Interactive 100% client-side in-browser image-drop & WhatsApp/X recompression stress demo (running `tiny` `88.5 MB` exact-parity FP32 ONNX locally): Hugging Face Space [`Tamarillo/ai-image-forensics-guard-demo`](https://huggingface.co/spaces/Tamarillo/ai-image-forensics-guard-demo) (published alongside this model family). | Model | Backbone | Params | Input Res | Social-Recomp EER ↓ | Synthbuster EER ↓ | 3-Corpus Unique Zero-Touch (EER ↓ / AUC ↑) | 5-Suite Public Mean (EER ↓ / AUC ↑) | CPU FP32 ONNX | ONNX Size | | :--- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | `Tamarillo/ai-image-forensics-guard-tiny` *(this repo)* | `facebook/dinov2-small` | 22.1M | 224×224 | 37.71% | 19.05% | 28.52% / 0.7862 | 30.53% / 0.7652 | 82.3 ms | 88.5 MB | | `Tamarillo/ai-image-forensics-guard-small` | `facebook/convnextv2-tiny-22k-384` | 27.9M | 384×384 | 30.59% | 9.45% | 26.65% / 0.7908 | 26.90% / 0.8015 | 136.8 ms | 111.6 MB | | `Tamarillo/ai-image-forensics-guard-base` | `google/siglip2-base-patch16-384` | 93.2M | 384×384 | 20.12% | 10.00% | 20.73% / 0.8573 | 19.98% / 0.8709 | 312.7 ms | 344.6 MB | --- ## 30-Second Quickstart (Exact 1-Line `transformers` Drop-In) Requires `transformers>=4.40` (zero `trust_remote_code`). > **Operating-Point Note:** At default `0.50` argmax, `Tamarillo/ai-image-forensics-guard-tiny` achieves `41.3%` fake recall / `14.8%` real-photo FPR on clean `OpenFake Core`, `42.9%` fake recall / `1.5%` real-photo FPR on `Synthbuster`, and `55.9%` fake recall / `31.0%` real FPR under heavy `Social-Media Recompressed` stress (`512px` JPEG Q45 + WebP Q55). Note that `pipeline()` outputs uncalibrated softmax probabilities (identical `0.50` argmax, whereas raw probability values differ from `calibration.json` temperature-scaled probabilities `T = 1.3757`). ```bash pip install "transformers>=4.40" torch pillow ``` ```python from PIL import Image from transformers import pipeline # Exact 1-line drop-in replacement for umm-maybe/AI-image-detector and Organika/sdxl-detector # Label schema: id2label = {0: "artificial", 1: "human"} detector = pipeline("image-classification", model="Tamarillo/ai-image-forensics-guard-tiny") # Self-contained wiring smoke test (replace with: img = Image.open("photo.jpg").convert("RGB")) img = Image.new("RGB", (512, 512), color=(128, 128, 128)) scores = detector(img) print(scores) # [{'label': 'human', 'score': ...}, {'label': 'artificial', 'score': ...}] ``` ### Direct PyTorch with Temperature Calibration (`calibration.json`) ```python import torch from PIL import Image from transformers import AutoImageProcessor, AutoModelForImageClassification repo_id = "Tamarillo/ai-image-forensics-guard-tiny" processor = AutoImageProcessor.from_pretrained(repo_id) model = AutoModelForImageClassification.from_pretrained(repo_id).eval() # Wiring smoke test (replace with: img = Image.open("photo.jpg").convert("RGB")) img = Image.new("RGB", (512, 512), color=(128, 128, 128)) inputs = processor(images=img, return_tensors="pt") with torch.no_grad(): logits = model(**inputs).logits[0] raw_probs = torch.softmax(logits, dim=-1) # Optional temperature scaling from calibration.json (T=1.3757) cal_probs = torch.softmax(logits / 1.3757, dim=-1) p_art = float(cal_probs[0]) verdict = "ARTIFICIAL" if p_art >= 0.50 else "HUMAN" print(f"{verdict} | raw P(artificial)={float(raw_probs[0]):.4f} | cal P(artificial)={p_art:.4f}") ``` ### ONNX Runtime (CPU / Edge) & Browser WASM (`Transformers.js`) ```bash pip install onnxruntime huggingface_hub "transformers>=4.40" pillow numpy ``` ```python import numpy as np import onnxruntime as ort from huggingface_hub import hf_hub_download from PIL import Image from transformers import AutoImageProcessor repo_id = "Tamarillo/ai-image-forensics-guard-tiny" processor = AutoImageProcessor.from_pretrained(repo_id) onnx_path = hf_hub_download(repo_id=repo_id, filename="onnx/model.onnx") # 88.5 MB FP32 (82.3 ms 4-thread CPU) sess = ort.InferenceSession(onnx_path, providers=["CPUExecutionProvider"]) # Wiring smoke test (replace with: img = Image.open("photo.jpg").convert("RGB")) img = Image.new("RGB", (512, 512), color=(128, 128, 128)) pixel_values = processor(images=img, return_tensors="np")["pixel_values"].astype(np.float32) logits = sess.run(None, {"pixel_values": pixel_values})[0][0] scaled = logits / 1.3757 # temperature T from calibration.json ex = np.exp(scaled - scaled.max()) probs = ex / ex.sum() print(f"cal P(artificial)={probs[0]:.4f} | cal P(human)={probs[1]:.4f}") ``` #### Browser / Node.js (`Transformers.js` v3) ```bash npm install @huggingface/transformers ``` ```javascript import { pipeline, RawImage } from "@huggingface/transformers"; const detector = await pipeline("image-classification", "Tamarillo/ai-image-forensics-guard-tiny", { dtype: "fp32", // loads exact-parity 88.5 MB onnx/model.onnx }); // Self-contained 224x224 wiring smoke-test image (replace with an image URL, Blob, or file path) const dummy = new RawImage(new Uint8ClampedArray(224 * 224 * 3).fill(128), 224, 224, 3); const results = await detector(dummy, { top_k: 2 }); console.log(results); // [{ label: "artificial", score: ... }, { label: "human", score: ... }] ``` > Recommended tier for client-side browser WASM and `<85 ms` CPU sidecars. For stronger accuracy on 2026 generators and heavily recompressed social-media imagery, use `Tamarillo/ai-image-forensics-guard-small` (`27.9M`, `384px`) or `Tamarillo/ai-image-forensics-guard-base` (`93.2M`, `384px`). --- ## Label Schema & Calibration (`calibration.json`) | Class ID | Label | Meaning | | :---: | :--- | :--- | | `0` | `artificial` | AI-generated / synthetic image (diffusion, flow-matching DiT, GAN, or AI video frame). | | `1` | `human` | Authentic human photograph. | - **Calibration ([`calibration.json`](calibration.json)):** Generator-disjoint validation EER = `4.16%`, validation ROC-AUC = `0.9928`, validation temperature `T = 1.3757`, calibrated ECE = `0.0249`. Reference validation operating cutoffs on temperature-scaled `P(artificial)`: 5% FPR at `τ = 0.2105`, 1% FPR at `τ = 0.7230`. Because in-domain validation separation is much tighter than unseen wild 2026 generators, treat validation `thr_val_5pct_fpr` as a lower bound and calibrate `τ` on a small target-domain sample (or start at `0.50`). --- ## Benchmarks (3 Unique Zero-Touch Corpora + Social-Media Compression Stress + Held-Out `CommunityForensics-Eval`) All 8 models were evaluated head-to-head on identical frozen RGB images with **zero evaluation images present in training**. Full reproducible synthesis, data, training, ONNX, and evaluation scripts are bundled in this repository: [`scripts/synth_2026_images.py`](scripts/synth_2026_images.py), [`scripts/build_image_data.py`](scripts/build_image_data.py), [`scripts/train_image_model.py`](scripts/train_image_model.py), [`scripts/eval_image_suite.py`](scripts/eval_image_suite.py), and [`scripts/export_image_onnx.py`](scripts/export_image_onnx.py). Bold marks the best value (or ties) in each column. ### Evaluation Protocol & Subsampling Details - **Non-Double-Counted vs. Stress & Held-Out Averages:** Because `ood_social_recompressed` is a derived stress transform of `1,000` images from `ood_openfake_core` and `700` images from `ood_synthbuster` (and its compression chain resembles Tamarillo's training augmentations), we report **three explicit aggregates**: 1. **3-Corpus Unique Zero-Touch Mean (`[U3]`):** Equal mean over the 3 strictly disjoint zero-touch corpora (`OpenFake Core`, `OpenFake Reddit`, `Synthbuster`) — **zero image overlap, zero real-source overlap, zero generator overlap**. 2. **4-Suite Zero-Touch Mean (`[Z4]`):** Includes the `Social-Media Recompressed` stress suite alongside the 3 unique zero-touch corpora. 3. **5-Suite Public Mean (`[5S]`):** Includes `CommunityForensics-Eval` (`CompEval`), which is a held-out CVPR 2025 benchmark whose parent corpus family (`Systematic+Manual`, strictly excluding `PublicEval` and `Commercial`) appeared in Tamarillo's training mix. - **Dataset Sizes & Sampling Seeds:** - `ood_openfake_core` (`ComplexDataLab/OpenFake` `core/test`, eval-only, **`n=2,000`: 1,000 real / 1,000 fake, `seed=201`**): 2025–2026 generators vs. `DOCCI` smartphone photos & `ImageNet`. - `ood_openfake_reddit` (`ComplexDataLab/OpenFake` `reddit/test`, eval-only, **`n=1,600`: 800 real / 800 fake, `seed=202`**): wild social-media compressed real vs. AI imagery & video frames. - `ood_synthbuster` (`marco-willi/synthbuster-plus` `test`, eval-only, **`n=1,200`: 200 real / 1,000 fake, `seed=203`** — all available real `RAISE` test photos + 1,000 fakes from `DALL-E 2/3`, `Midjourney v5`, `Adobe Firefly`, `SDXL`; EER and ROC-AUC are class-ratio invariant). - `ood_social_recompressed` (**`n=1,700`: 700 real / 1,000 fake, `seed=204`** — `500` real + `500` fake from `ood_openfake_core` plus `200` real + `500` fake from `ood_synthbuster`): every image deterministically passed through **Bilinear resize (`max_side=512`) → `JPEG Q45` → `WebP Q55`**. - `eval_commfor_comp` (`OwensLab/CommunityForensics-Eval` `CompEval`, eval-only, **`n=2,000`: 1,000 real / 1,000 fake, `seed=205`**). - **Incumbent Scoring Fairness:** Every Hugging Face incumbent (`umm-maybe`, `Organika`, `Ateeqq`, `haywoodsloan`) was evaluated with its native `AutoImageProcessor` and `id2label`. `buildborderless/CommunityForensics-DeepfakeDet-ViT` was evaluated using its official `CLIPImageProcessor` (`384px`) and its official FP32 ONNX artifact. ### 1. Core 5-Suite Public Benchmark (EER % ↓ and ROC-AUC ↑) | Model | Params | Official ONNX | OpenFake Core [Z] | OpenFake Reddit [Z] | Synthbuster [Z] | Social-Recomp [Stress] | CommFor-Eval | 3-Corpus Unique [U3] | 4-Suite [Z4] | 5-Suite Mean [5S] | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | **Tamarillo `tiny` (DINOv2-S, 224px)** | 22.1M | Yes (FP32) | 35.90% (0.696) | 30.63% (0.764) | 19.05% (0.899) | 37.71% (0.684) | 29.35% (0.783) | 28.52% / 0.7862 | 30.82% / 0.7608 | 30.53% / 0.7652 | | Tamarillo `small` (ConvNeXtV2-T, 384px) | 27.9M | Yes (FP32) | 36.70% (0.684) | 33.81% (0.716) | **9.45%** (0.973) | 30.59% (0.780) | 23.95% (0.856) | 26.65% / 0.7908 | 27.64% / 0.7880 | 26.90% / 0.8015 | | Tamarillo `base` (SigLIP2-B, 384px) | 93.2M | Yes (FP32) | 25.50% (0.805) | 26.69% (0.808) | 10.00% (0.959) | **20.12%** (0.872) | 17.60% (0.911) | 20.73% / 0.8573 | 20.58% / 0.8610 | **19.98%** / **0.8709** | | `haywoodsloan/ai-image-detector-deploy` | 195.2M | No | **13.20%** (0.931) | **21.56%** (0.882) | 19.95% (0.883) | 26.24% (0.813) | 22.45% (0.839) | **18.24%** / **0.8985** | **20.24%** / **0.8770** | 20.68% / 0.8693 | | `buildborderless/CommunityForensics-DeepfakeDet-ViT` | 21.8M | Yes (FP32)* | 20.35% (0.877) | 33.50% (0.736) | 22.95% (0.835) | 41.12% (0.635) | **9.35%** (0.971) | 25.60% / 0.8158 | 29.48% / 0.7707 | 25.45% / 0.8108 | | `Ateeqq/ai-vs-human-image-detector` | 92.9M | No | 17.15% (0.906) | 22.00% (0.858) | 28.00% (0.795) | 27.71% (0.810) | 42.65% (0.615) | 22.38% / 0.8528 | 23.71% / 0.8421 | 27.50% / 0.7966 | | `Organika/sdxl-detector` (`CC-BY-NC-3.0`) | 86.8M | Yes (FP32) | 38.15% (0.656) | 38.88% (0.645) | 27.60% (0.793) | 40.46% (0.638) | 27.20% (0.800) | 34.88% / 0.6980 | 36.27% / 0.6829 | 34.46% / 0.7064 | | `umm-maybe/AI-image-detector` | 86.8M | No | 41.70% (0.625) | 31.37% (0.744) | 39.50% (0.649) | 37.66% (0.670) | 43.25% (0.585) | 37.53% / 0.6724 | 37.56% / 0.6719 | 38.70% / 0.6546 | *`[Z]` marks the 3 unique strictly zero-touch OOD corpora; `Social-Recomp` is a compression stress transform of `OpenFake Core` + `Synthbuster`. \*Note: `CommunityForensics-DeepfakeDet-ViT`'s shipped INT8 ONNX variant fails to load in standard ORT CPU (`ConvInteger(10)` unimplemented); its official FP32 ONNX artifact was used.* ### 2A. Per-2026-Generator ROC-AUC on `OpenFake Core` (All 10 Evaluated Generators) | Model | `illustrious` | `wan-2.5` | `midjourney-7` | `recraft-v3` | `veo-3` | `ernie-turbo` | `z-image-turbo` | `gpt-image-1.5` | `gpt-image-2` | `flux.2-klein-9b` | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | **Tamarillo `tiny` (DINOv2-S, 224px)** | 0.825 | 0.849 | 0.751 | 0.721 | 0.857 | 0.802 | 0.748 | 0.678 | 0.505 | 0.438 | | Tamarillo `small` (ConvNeXtV2-T, 384px) | 0.864 | 0.916 | 0.814 | 0.742 | 0.740 | 0.794 | 0.742 | 0.685 | 0.643 | 0.324 | | Tamarillo `base` (SigLIP2-B, 384px) | 0.963 | 0.958 | 0.891 | 0.884 | 0.883 | 0.868 | 0.867 | 0.852 | 0.680 | 0.474 | | `haywoodsloan/ai-image-detector-deploy` | 0.995 | 0.996 | 0.991 | 0.982 | 0.988 | 0.998 | 0.947 | 0.988 | 0.963 | 0.751 | | `buildborderless/CommunityForensics-DeepfakeDet-ViT` | 0.993 | 0.966 | 0.926 | 0.967 | 0.942 | 0.864 | 0.907 | 0.894 | 0.795 | 0.667 | | `Ateeqq/ai-vs-human-image-detector` | 0.981 | 0.986 | 0.833 | 0.817 | 0.968 | 0.915 | 0.937 | 0.864 | 0.933 | 0.844 | | `Organika/sdxl-detector` (`CC-BY-NC-3.0`) | 0.857 | 0.895 | 0.834 | 0.669 | 0.749 | 0.592 | 0.580 | 0.752 | 0.742 | 0.372 | | `umm-maybe/AI-image-detector` | 0.377 | 0.581 | 0.501 | 0.617 | 0.686 | 0.634 | 0.746 | 0.749 | 0.576 | 0.614 | ### 2B. Operating-Point Trade-off at Default `τ = 0.50` (Fake Recall / Real-Photo FPR) | Model | OpenFake Core @0.50 (Rec / Real FPR) | Synthbuster @0.50 (Rec / Real FPR) | Social-Recomp @0.50 (Rec / Real FPR) | | :--- | :---: | :---: | :---: | | **Tamarillo `tiny` (DINOv2-S, 224px)** | 41.3% / 14.8% | 42.9% / 1.5% | 55.9% / 31.0% | | Tamarillo `small` (ConvNeXtV2-T, 384px) | 31.5% / 6.7% | 47.2% / 0.0% | 54.5% / 18.4% | | Tamarillo `base` (SigLIP2-B, 384px) | 47.1% / 3.3% | 53.1% / 0.0% | 73.9% / 14.6% | | `haywoodsloan/ai-image-detector-deploy` | 72.7% / 2.8% | 58.6% / 6.0% | 32.8% / 1.1% | | `buildborderless/CommunityForensics-DeepfakeDet-ViT` | 26.3% / 0.0% | 55.4% / 1.5% | 8.9% / 1.9% | | `Ateeqq/ai-vs-human-image-detector` | 83.4% / 17.6% | 47.8% / 9.5% | 73.2% / 28.7% | | `Organika/sdxl-detector` (`CC-BY-NC-3.0`) | 49.8% / 22.6% | 52.1% / 13.0% | 34.0% / 16.6% | | `umm-maybe/AI-image-detector` | 39.4% / 16.5% | 26.4% / 11.0% | 60.0% / 34.7% | --- ## ONNX Parity & Same-Machine 4-Thread x86 CPU Latency (`bs=1`) Hardware: GCP `g2-standard-8` (Intel Xeon Cascade Lake, 4 ORT intra-op threads, `bs=1`, median p50 ms over 25 timed runs after 5 warmups). For apples-to-apples CPU timing across the `22M–93M` drop-in tier, incumbents without official ONNX (`umm-maybe`, `Ateeqq`) were exported locally to FP32 ONNX on the exact same machine (heavyweight `195.2M` `haywoodsloan` was omitted from local CPU ONNX export, and GPU latency was not separately timed): - `umm-maybe/AI-image-detector` (`86.8M`, `224px`, `353.7 MB` FP32): **`140.92 ms`** - `Organika/sdxl-detector` (`86.8M`, `224px`, `353.7 MB` official FP32, `CC-BY-NC-3.0`): **`138.08 ms`** - `Ateeqq/ai-vs-human-image-detector` (`92.9M`, `224px`, `343.4 MB` FP32): **`101.23 ms`** - `buildborderless/CommunityForensics-DeepfakeDet-ViT` (`21.8M`, `384px`, `87.4 MB` official FP32): **`94.04 ms`** (its shipped INT8 ONNX variant errored on `ConvInteger(10)`) | Artifact | Input Res | File Size | Parity (`n=64` OpenFake Core: Argmax / Max Δp / Mean Δp) | 4-Thread CPU p50 | 4-Thread CPU p90 | | :--- | :---: | :---: | :---: | :---: | :---: | | `onnx/model.onnx` (FP32) | 224×224 | 88.5 MB | 100.0% / `0.00000` / `0.00000` | **82.35 ms** | 82.93 ms | - **Quantization Hygiene:** Dynamic INT8 (`max Δp = 0.376`, `mean Δp = 0.0395`, `93.8%` argmax) was automatically discarded by our parity gate (`mean Δp <= 0.015`, `argmax >= 98%`), and FP16 conversion was omitted due to ORT `Conv`/norm mixed-type mismatches. Accordingly, `Tamarillo/ai-image-forensics-guard-tiny` ships **exact-parity FP32 ONNX (`onnx/model.onnx`, `max Δp = 0.00000`, `100%` argmax agreement across `n=64` held-out `OpenFake Core` images)**. --- ## Training Recipe & Upstream-Audited Data Provenance Trained end-to-end with **symmetric social-media degradation augmentation** applied identically to both `artificial` and `human` images (random aspect-preserving crop, horizontal flip, Bilinear/Bicubic/Lanczos downscale `0.45×–0.88×`, mild Gaussian blur / UnsharpMask smartphone sharpening, subtle color jitter, and real `JPEG Q35–95` / `WebP Q40–95` / double-JPEG re-encoding) using focal cross-entropy (`gamma=1.0`, label smoothing `0.03`), differential LR (head `5×`), EMA (`0.996`), and validation-only EER selection on **`24,326` training images** (`12,567` human / `11,759` artificial) and **`2,066` generator-disjoint validation images** (`1,033` human / `1,033` artificial), upweighting 1:1 matched 2025–2026 DiT pairs `2.5×`. Every training source carries verified commercially permissive provenance (zero `NC`, zero `SA`, zero ImageNet): 1. **Commercial MS-COCO 2017 (`train2017` ONLY, strictly filtered to `license ∈ {4, 7, 8}` = `CC-BY-2.0` / Public Domain; excluding all `NC`/`SA`/`ND` licenses and `val2017`)** (`srishti-kaushik/COCO-2017`): **`3,167` train / `433` val** (`3,600` total authentic photos). 2. **Fresh 2025–2026 Apache-2.0 Flow-Matching DiT Pairs (Matched 1:1 on Captions & Aspect Ratios to Commercial COCO):** **`3,167` train / `433` val** (`3,600` total synthetic images) generated on A100 using **`Efficient-Large-Model/Sana_Sprint_1.6B_1024px_diffusers`** (`1,450` train / `150` val, DC-AE 32× 2-step consistency DiT, `Apache-2.0`), **`Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers`** (`1,050` train / `150` val, DC-AE 32× flow-matching DiT, `Apache-2.0`), and **`Alpha-VLLM/Lumina-Image-2.0`** (`667` train / `133` val, 16-ch Flow-Matching VAE Next-DiT, `Apache-2.0`) — 100% disjoint from `OpenFake` `core/test`. 3. **Open Images V7** (`finedet/openimages`, `CC-BY-4.0` annotations / `CC-BY-2.0` Flickr photos): **`9,400` train / `600` val** (`10,000` total diverse real photos). 4. **Community Forensics (`Systematic` + `Manual` ONLY, `nsfw_flag=False`, excluding `PublicEval` & `Commercial`)** (`OwensLab/CommunityForensics`, `CC-BY-4.0`): **`8,592` train (`5,105` `Systematic` + `3,487` `Manual`) / `600` unseen-generator val** (`808` surplus rows from held-out validation generator models were excluded from training to enforce strict generator disjointness). *Exact totals: Train = `3,167 + 3,167 + 9,400 + 8,592 = 24,326` (`12,567` human + `11,759` artificial); Val = `433 + 433 + 600 + 600 = 2,066` (`1,033` human + `1,033` artificial).* --- ## Honest Limitations & Where Baselines Win 1. **Capacity & Unseen-Generator Gaps (`haywoodsloan`, `Ateeqq`, `CommunityForensics-ViT`, & Larger Tamarillo Tiers Win Overall):** At `22.1M` (`224px`), `Tamarillo/ai-image-forensics-guard-tiny` trails larger/higher-res baselines on 3-Corpus Unique Zero-Touch EER (`28.52%` vs. `haywoodsloan` `18.24%`, `Ateeqq` `22.38%`, `Tamarillo base` `20.73%`) and 5-Suite EER (`30.53%` vs. `CommunityForensics-ViT` `25.45%`). Because Tamarillo intentionally held out all FLUX and proprietary OpenAI generators from training, `Tamarillo/ai-image-forensics-guard-tiny` struggles severely on `flux.2-klein-9b` (`0.438` AUC vs. `Ateeqq` `0.844`) and `gpt-image-2` (`0.505` AUC vs. `haywoodsloan` `0.963`). 2. **`CommunityForensics-Eval` Home-Benchmark Advantage:** `buildborderless/CommunityForensics-DeepfakeDet-ViT` (`9.35%` EER) significantly outperforms Tamarillo (`17.60%–29.35%` EER) on its own home `eval_commfor_comp` split (having trained on all 2.7M CommunityForensics images vs. Tamarillo's `8,592`-image subsample), while collapsing to `41.12%` EER (`8.9%` fake recall) under `Social-Media Recompressed` stress. 3. **Operating-Point Tradeoffs & Forensic Edge Cases:** On clean `OpenFake Core`, default `0.50` is conservative (`41.3%` fake recall at `14.8%` real-photo FPR on `Tamarillo/ai-image-forensics-guard-tiny`), whereas heavy social-media recompression (`JPEG Q45 + WebP Q55 + 512px`) increases real-photo false positives (`31.0%` real FPR at `55.9%` fake recall). Additionally, binary whole-image detectors can struggle on **partial edits / localized AI inpainting**, **heavily retouched or filtered smartphone photos**, **UI screenshots**, and **3D CGI / digital illustrations**. Treat probabilities as one signal inside a layered verification workflow (C2PA content credentials, metadata/EXIF checks, and human review for high-stakes decisions). 4. **FP32-Only ONNX Shipping:** Dynamic INT8 and FP16 ONNX exports did not clear our strict parity gate on forensic pixel features and were intentionally omitted; only exact-parity FP32 `onnx/model.onnx` is shipped. --- ## License, Attribution & Citation Model weights and code are released under the **Apache-2.0 License** by **Tamarillo**. Training data attributions: MS-COCO 2017 commercial subset (`CC-BY-2.0` / Public Domain), Open Images V7 (`CC-BY-2.0` / `CC-BY-4.0`), Community Forensics (`CC-BY-4.0`), SANA-Sprint & SANA-1.5 (`Apache-2.0`), and Lumina-Image-2.0 (`Apache-2.0`). ```bibtex @misc{tamarillo_ai_image_forensics_guard_2026, title = {Tamarillo AI-Image Forensics Guard: Social-Media-Hardened Visual Deepfake Detectors}, author = {Tamarillo Open-Model Lab}, year = {2026}, howpublished = {\url{https://huggingface.co/Tamarillo/ai-image-forensics-guard-tiny}}, license = {Apache-2.0} } ```