← All guides Under the hood

How AI image detection actually works

What happens between dropping a file in and reading a score: the pixel model, the tiling pass, the file evidence, and how the three are combined.

· 8 min read · Best AI Image Detector

A vision transformer scores the whole frame, the same model scores it again as tiles, a separate reader checks the file's own credentials, and the three results are combined into one calibrated number.

What the model is looking at

A camera records light through a lens onto a sensor. That process leaves a specific kind of noise, a specific pattern of sharpness falling off toward the edges, and a specific relationship between adjacent pixels that comes from the sensor grid and the demosaicing that follows it.

A diffusion model builds an image by repeatedly removing noise from a random field until something coherent emerges. That process also leaves a signature, and it is different. The result can be visually perfect and statistically distinguishable at the same time.

This is why detection survives a screenshot when metadata does not. The signature is in the pixel values themselves rather than in a header, so copying the pixels copies the evidence.

The four stages

  1. 1 Read the file Decoded in the browser, never uploaded
  2. 2 Score the frame Vision transformer at 384 pixels square
  3. 3 Score the tiles The same model on overlapping regions
  4. 4 Read the credentials C2PA and generator markers, if present
Two independent evidence paths that converge. Neither is asked to carry the answer alone.

Stage one: decoding

The file is read from disk by the page and decoded into raw pixels. HEIC, AVIF, TIFF and the rest are handled by the browser's own decoders. Nothing is transmitted, which is a property of where the work happens rather than a policy applied on a server.

Stage two: the whole-frame score

The image is resized to 384 pixels square and passed through a vision transformer. The model returns a raw probability that the frame is synthetic. That number is then calibrated so it maps onto the published bands consistently rather than drifting with the model.

Resizing loses detail, which is the first place accuracy leaks. It is also unavoidable: the model has a fixed input size, and a 4000-pixel photograph has to be reduced to fit it.

Stage three: the tiling pass

The frame is divided into overlapping regions and each one is scored on its own by the same model. This is what separates a fully generated image from a real photograph with something added, and it is the stage a single number cannot replace.

14 11 16 12 88 13 9 15 10

Averaging these gives 21. The tile view keeps the information averaging destroys.

The same model, run nine times on overlapping crops. The whole-frame score for this image was 31.

Tiles need enough pixels to be meaningful, which is why images below roughly 576 pixels on the shorter side get a whole-frame score only. There is not enough detail in a small crop to score it independently.

Stage four: the file's own record

Separately from the pixels, the file is checked for Content Credentials and for generator markers left by some tools. This path is cryptographic rather than statistical: a valid signature is checked against a trust list, not estimated.

How the results are combined

The two paths are not averaged, because they carry different weights. A valid credential declaring a camera capture outranks a moderate pixel score. A credential declaring AI generation settles the question on its own.

How the evidence is weighted
EvidenceTypeWeight
Valid credential declaring AI generationCryptographicDecisive
Valid credential declaring camera captureCryptographicVery strong
Generator marker in the fileDeclarativeStrong, but strippable
Whole-frame pixel scoreStatisticalModerate
Region tile scoresStatisticalModerate, and more specific
No credential presentNothingNo information either way

That last row is the one people misread most often. An absent credential is not a negative signal. The overwhelming majority of images ever made carry none, and almost every platform strips them on upload.

Why it runs in the browser

The model is about 40 MB and runs through WebAssembly on the visitor's own device. That is a deliberate architectural choice with three consequences worth understanding.

  • Nothing is uploaded, so there is no server holding anyone's images and no data processing relationship to document.
  • A check costs nothing to serve, which is why the tool can be free without a usage meter behind it.
  • The first check is slower, because the model downloads once before it can run. Later checks reuse the cached copy.

What the pipeline deliberately does not do

Several techniques that appear in older forensics tools are absent, because they no longer work on images that have travelled through modern platforms.

  • Error level analysis. Popular, widely misread, and unreliable on any image that has been re-saved more than once.
  • Copy-move detection. Finds duplicated regions inside a frame, which catches old-style cloning and not generation.
  • Metadata-based verdicts. EXIF is stripped on upload almost everywhere, so a check that depends on it fails on precisely the images people need to verify.
  • Face-specific analysis. Useful for one narrow class of manipulation, and blind to everything else.

Questions people ask

Does the detector look at what is in the picture?
No. It has no concept of objects, faces or scenes. It measures statistical relationships between neighbouring pixels, which is why it works equally on a portrait, a street scene and a receipt, and why it cannot tell you whether the content of an image is true.
Why does the first check take longer?
The model downloads once, about 40 MB, before anything can run. After that it is cached and subsequent checks start immediately. This is the cost of running on your device rather than on a server, and it buys you the fact that nothing is uploaded.
How is the raw model output turned into a score?
Calibration. The model returns a raw probability, which is mapped onto a fixed scale so a given number always means the same thing. Without that step, scores would shift whenever the model changed and no published band would stay meaningful.
Why overlapping tiles rather than a simple grid?
An edit that straddles a tile boundary would be split between two regions and diluted in both. Overlapping the crops means any edit falls fully inside at least one region, which is what keeps a small insert from being averaged away.
Can it tell which generator made an image?
Only where the file says so. A generator marker or a credential can name the tool; the pixel model cannot. It returns a likelihood that something generative was involved, which is a different question from identification and a much easier one to answer reliably.
Is the same model used for the frame and the tiles?
Yes. Running one model on different crops is what makes the two results comparable. A separate region model would have its own calibration and its own errors, and the two numbers would no longer sit on the same scale.