fakeradar fast-v0

A small (about 12M parameters), CPU-friendly detector of AI-generated images, from fakeradar. It fuses a gradient-field branch (SRM residuals, an up-sampling residual, gradient magnitude and structure-tensor coherence) and a frequency-spectrum branch, reads native-resolution crops (never resized), and outputs a temperature-calibrated P(AI).

Read this first

  • Trained on one generator. All training images are GenImage Stable Diffusion v1.4 against ImageNet photos. It is near-perfect on the Stable Diffusion family and clearly weaker on other generators (table below). It was never trained or tested on 2025-2026 commercial generators.
  • Do not trust the fixed 0.5 cut on new data. Ranking is good, but the probability is calibrated on the training generator only: on the pooled 8-generator test the 0.5 cut gets only about 0.55-0.59 accuracy. In a spot check, two of three DALL-E 2 samples scored as real and one of three real Unsplash photos scored 0.80. For decisions, set your own threshold on real photos from your setting with fakeradar calibrate-fpr (a bounded rate of real photos flagged; method audited in the repository's Gate B report).
  • A probabilistic signal, not proof. Never use it as sole evidence about a person or in legal, journalistic or academic-integrity decisions.

Use

pip install fakeradar            # from the repository until a PyPI release exists
fakeradar scan photo.jpg --pretrained fast-v0
fakeradar calibrate-fpr real_photos.csv --pretrained fast-v0 --alpha 0.01
fakeradar scan photo.jpg --pretrained fast-v0 --fpr-thresholds real_photos.fpr.json

Or download fast_v0.pt and pass --checkpoint fast_v0.pt.

Training

  • Data: GenImage, Stable Diffusion v1.4 subset (Kaggle copy vtphatt2/genimage-stable-diffusion-v1-4, CC-BY-NC-SA-4.0), 95,000 images sampled from the 324,000 available (balanced), plus 5,000 held out for model selection and temperature calibration.
  • Compression history equalized: GenImage stores real photos as JPEG and generated images as PNG, so a detector can learn "JPEG means real". Every non-JPEG image got one JPEG pass at quality 96 (training, validation, calibration and the "equalized" test columns).
  • 5 epochs, AdamW, batch 64, mixed precision, transport-chain augmentation (JPEG, WebP, resize, blur, noise), one Kaggle T4. Seed 42 is the released checkpoint.

Licence

Weights: CC-BY-NC-SA-4.0 (non-commercial, share-alike), inherited from the training data. Code: Apache-2.0.

Measured results

Generated from the run from the run folders; do not edit by hand.

  • Seeds: 42, 43, 44 (ablation: 42, 43). Values are mean ± sample standard deviation over seeds.
  • Training: GenImage Stable Diffusion v1.4 only, 95,000 images (5% more held out for model selection and calibration), 5 epochs, one Kaggle T4, compression history equalized (JPEG quality 96 once for non-JPEG images).
  • Test: GenImage val split, 1,000 generated images per generator against 2,000 pooled real images; robustness on 500 real + 500 generated test images.

Cross-generator AUROC

Generator AUROC, equalized TPR at 5% FPR, equalized AUROC, as stored
stable_diffusion_v_1_4 0.9995 ± 0.0001 1.0000 ± 0.0000 0.9979 ± 0.0005
stable_diffusion_v_1_5 0.9994 ± 0.0001 0.9980 ± 0.0010 0.9973 ± 0.0006
wukong 0.9955 ± 0.0004 0.9777 ± 0.0015 0.9777 ± 0.0054
VQDM 0.9257 ± 0.0057 0.5737 ± 0.0284 0.8466 ± 0.0157
Midjourney 0.9233 ± 0.0078 0.5780 ± 0.0165 0.9279 ± 0.0095
glide 0.8932 ± 0.0001 0.3927 ± 0.0229 0.8475 ± 0.0064
BigGAN 0.8977 ± 0.0076 0.3417 ± 0.0378 0.8337 ± 0.0064
ADM 0.8591 ± 0.0229 0.1877 ± 0.0651 0.7902 ± 0.0216
Mean of 8 0.9367 ± 0.0014 0.9024 ± 0.0015

Robustness (AUROC, equalized)

Condition With coherence Without coherence (ablation)
clean 0.9356 ± 0.0010 0.9263 ± 0.0032
jpeg90 0.8858 ± 0.0057 0.8776 ± 0.0028
jpeg70 0.8677 ± 0.0043 0.8616 ± 0.0042
jpeg50 0.8385 ± 0.0068 0.8226 ± 0.0041
jpeg30 0.7759 ± 0.0090 0.7455 ± 0.0033
down0.75 0.8411 ± 0.0039 0.8206 ± 0.0055
down0.5 0.8348 ± 0.0004 0.8177 ± 0.0052
blur1.0 0.8113 ± 0.0074 0.8054 ± 0.0202

Coherence ablation (AUROC, equalized)

Generator With coherence Without coherence
stable_diffusion_v_1_4 0.9995 ± 0.0001 0.9997 ± 0.0001
stable_diffusion_v_1_5 0.9994 ± 0.0001 0.9994 ± 0.0001
wukong 0.9955 ± 0.0004 0.9960 ± 0.0004
VQDM 0.9257 ± 0.0057 0.9180 ± 0.0054
Midjourney 0.9233 ± 0.0078 0.9291 ± 0.0052
glide 0.8932 ± 0.0001 0.8859 ± 0.0055
BigGAN 0.8977 ± 0.0076 0.8780 ± 0.0022
ADM 0.8591 ± 0.0229 0.8356 ± 0.0269
MEAN 0.9367 ± 0.0014 0.9302 ± 0.0057

Citation

@software{fakeradar2026,
  author = {Jha, Jitendra},
  title  = {fakeradar: local-first AI-generated image detection},
  year   = {2026},
  url    = {https://github.com/JitendraJha98/fakeradar}
}

GenImage: Zhu et al., GenImage: A Million-Scale Benchmark for Detecting AI-Generated Image, NeurIPS 2023 Datasets and Benchmarks.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using JitendraJha98/fakeradar-fast 1