image-classification Β· vision Β· WASM Β· ~89 MB
A Swin Transformer fine-tuned to sort images into artificial (AI-generated /
synthetic) and human (a real photograph). Drop an image and it returns a probability
for each. Treat the number as a signal for triage β a reason to look closer β not
proof of where an image came from. It has real blind spots, and this page shows them. Everything
happens on your device; the image is never uploaded.
| Model | onnx-community/SMOGY-Ai-images-detector-ONNX |
|---|---|
| Task / pipeline | image-classification Β· single-label (softmax over 2 classes) |
| Labels | artificial (AI-generated) / human (real photo) |
| Architecture | Swin Transformer (hierarchical vision transformer) fine-tuned for AI-image detection |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~89 MB, cached after first load |
| License | Apache-2.0 (ONNX conversion by onnx-community) |
| Web APIs | WebAssembly, Web Workers, FileReader β all Baseline widely available |
Pick or drop an image, set how much "AI-generated" probability should raise a flag, and hit Analyse. The verdict is a policy on top of the model's score: flag for review when the AI-generated probability is at or above your threshold.

The model outputs two raw logits; a softmax turns them into two probabilities that sum to 100%. A high number is the model's confidence, and that is not the same as being calibrated β these detectors are notorious for being confidently wrong. A 99% "AI-generated" score is a strong prompt to look closer, never a certificate. The threshold is your policy: lower it to catch more suspected AI images (more real photos wrongly flagged), raise it to only flag the blatant cases (more AI images slip through). There is no universally right value β it depends on what a mistake costs you.
| Class | logit | softmax |
|---|
AI-generated probability along the realβAI scale (needle):
Calibration caveat: softmax confidence is not accuracy. Treat any single score as one weak piece of evidence β corroborate with metadata, reverse image search, and provenance standards (C2PA) before you act.
As generated images flood feeds, marketplaces, and evidence, "was a human behind the camera?" becomes a routine question. A fast, private, offline signal β running before an image is trusted, published, or paid for β is a first triage filter: it decides what to look at harder, not what is true. No API bill, no third party seeing the image, low enough latency to run inline.
All of these are signal, not verdict use cases. Anywhere the cost of a wrong call is high (accusations, takedowns, legal), a probability from one model is never enough on its own.
Analyse one image and read the AI-generated / real probabilities plainly.
Provenance triage: score a batch at a threshold, sort the queue β signal, never an auto-block.
Break it on purpose: crop, recompress and add noise, and watch the "AI-generated" score swing.
Detect, then describe: pair the provenance flag with an image caption for a richer intake card.
The convenience path is two lines with Transformers.js:
import { pipeline } from "@huggingface/transformers";
const detect = await pipeline("image-classification", "onnx-community/SMOGY-Ai-images-detector-ONNX");
const out = await detect(imageURL, { top_k: 2 });
// β [{ label: "human", score: 0.99 }, { label: "artificial", score: 0.01 }]
This page goes one level deeper for "See inside": instead of the pipeline it runs the model's
processor then model() in a single forward pass, so it can read the raw
two-value logits tensor and compute the softmax itself β then apply your
flag threshold. Same weights, same result. Inference runs in a Web Worker so the page never janks.