Why
Upsampling in GANs and diffusion decoders leaves periodic artifacts in the frequency domain. Three papers show a hand-crafted spectral statistic separates real from synthetic without a trained network; the threshold is the only tuned part.
Sources
Scope
- One rule, Tier B, off by default: decode to grayscale, FFT, azimuthal average of the power spectrum, flag when the high-frequency energy ridge exceeds a threshold.
- Threshold tuned on a labelled real/synthetic corpus and cited in the doc comment. Known false positives: upscaled or resized real photos. Ships on by default only after that rate is measured.
- Dependencies:
png and jpeg-decoder (or image with default features off) and rustfft. Each needs the PR-body line AGENTS.md requires saying what std could not do.
- Depends on the image metadata issue for
Lang::Image and ImageContext.
Why
Upsampling in GANs and diffusion decoders leaves periodic artifacts in the frequency domain. Three papers show a hand-crafted spectral statistic separates real from synthetic without a trained network; the threshold is the only tuned part.
Sources
Scope
pngandjpeg-decoder(orimagewith default features off) andrustfft. Each needs the PR-body line AGENTS.md requires saying what std could not do.Lang::ImageandImageContext.