Skip to content

Spectral-artifact image statistic (azimuthal FFT power ridge), opt-in #42

Description

@mgiovani

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions