Research
AI image detection
AI image detection is the process of determining whether a photograph or visual was captured by a camera or generated by an artificial intelligence model. With billions of AI-generated images produced each year, the ability to distinguish real photographs from synthetic visuals has become essential for journalism, law, e-commerce, academic publishing, and everyday media consumption. This page explains the forensic science behind AI image detection, how different generation models leave different traces, and what the current state of accuracy actually looks like in practice.
The challenge of AI-generated images
Current state of image generation technology
Image generation has reached a level where individual AI-generated photos frequently pass casual human inspection. Models like Midjourney v6, DALL-E 3, Stable Diffusion XL, Adobe Firefly, and Google Imagen produce images with photorealistic detail, accurate lighting, coherent composition, and natural-looking textures. The latest generation models have addressed many of the artifacts that earlier models were known for, including the notorious hand and finger errors that once served as reliable visual tells.
Why detection is getting harder
Three trends are making AI image detection progressively more challenging. First, generation models are trained specifically to produce output that is indistinguishable from photographs, and each model generation reduces the visible artifacts that previous detection methods relied on. Second, the diversity of generation architectures (GANs, diffusion models, autoregressive models, flow-based models) means that a single detection approach tuned for one architecture may miss images from another. Third, post-processing steps like JPEG compression, resizing, and social media re-encoding destroy subtle forensic signals.
The scale of AI-generated imagery online
Estimates suggest that AI-generated images account for a rapidly growing share of visual content online. Stock photography databases, social media feeds, news articles, product listings, and dating profiles all contain AI-generated imagery. Much of this content is not labeled as AI-generated, and users frequently encounter synthetic images without any indication that what they are seeing was never captured by a camera. The scale of the problem demands automated detection solutions that can operate at the speed and volume of online content distribution.
How AI image detection works
GAN fingerprints - spectral peaks in frequency domain
Generative Adversarial Networks produce images through a generator network that includes upsampling layers. These upsampling operations (transposed convolutions, nearest-neighbor upsampling followed by convolution, or pixel shuffling) create characteristic periodic patterns in the frequency domain of the generated image. When you apply a Fast Fourier Transform (FFT) to a GAN-generated image, you can observe spectral peaks at frequencies determined by the upsampling factor that are absent from photographs captured by cameras.
This discovery, published in influential papers by Marra et al. and Frank et al., provided the first reliable technical basis for detecting GAN-generated images. The spectral fingerprints persist across different content (faces, landscapes, objects) generated by the same architecture, and they survive moderate JPEG compression. Different GAN architectures produce peaks at different frequency positions, enabling not just detection but attribution to a specific model family.
Diffusion model artifacts - texture and semantic anomalies
Diffusion models (Stable Diffusion, DALL-E, Midjourney, Imagen) do not produce the same spectral peaks as GANs because they use a fundamentally different generation process. Instead of upsampling, diffusion models iteratively denoise a random noise field into a coherent image. The resulting artifacts are more subtle and appear in different forensic channels.
Key diffusion model artifacts include noise residual patterns that differ from camera sensor noise, texture regularity that lacks the organic variation of optical capture, and edge characteristics that show the influence of the denoising process. Research has also identified that diffusion models produce images with slightly different local image statistics (such as the distribution of pixel value differences between adjacent pixels) compared to photographs.
VAE-based generation artifacts
Variational Autoencoders (VAEs) and models that use VAE components (including Stable Diffusion's image decoder) produce their own set of characteristic artifacts. The encoding-decoding process introduces reconstruction errors that appear as subtle blurring, loss of high-frequency detail, and specific patterns in the image's color distribution. These artifacts are particularly evident in regions with fine detail like hair, fabric textures, and text.
Cross-model universal detection methods
The holy grail of AI image detection is a method that works across all generation architectures without needing to be retrained for each new model. Research in this direction focuses on features that distinguish the process of image generation (regardless of the specific algorithm) from the process of optical capture. CLIP-based detection, which uses features from large vision-language models, has shown surprisingly strong cross-model performance. The UniversalFakeDetect paper demonstrated that features learned for image-text alignment naturally capture differences between generated and real images.
Detection techniques in depth
Frequency domain analysis (FFT/DCT)
Frequency domain analysis transforms an image from the spatial domain (pixels arranged in a grid) into the frequency domain (a representation of the image's frequency components). This transformation reveals patterns that are invisible in the pixel representation. For AI-generated images, frequency domain analysis can reveal the spectral fingerprints left by upsampling operations, the frequency distribution differences between generated and captured images, and the absence of optical system artifacts (lens blur, chromatic aberration) that authentic photographs contain.
Both the Fast Fourier Transform (FFT) and the Discrete Cosine Transform (DCT) are used in detection. DCT-based analysis is particularly useful because JPEG compression operates in the DCT domain, allowing detection methods to analyze the JPEG coefficients directly for signs of double compression or generation artifacts. For a deeper explanation of frequency domain forensics, see our image forensics research page.
Noise pattern analysis
Every camera sensor produces a characteristic noise pattern, influenced by the sensor's physical properties, the ISO setting, and environmental conditions. This noise follows predictable statistical distributions (primarily Poisson-Gaussian) and contains a component known as Photo Response Non-Uniformity (PRNU) that is unique to each individual sensor. AI-generated images do not contain authentic sensor noise. Instead, their noise characteristics reflect the generation process, typically showing more spatially uniform noise with a distribution that differs from camera noise.
Detection methods extract the noise residual from an image (by subtracting a denoised version) and analyze its statistical properties. The presence of authentic sensor noise patterns is a strong indicator of camera capture, while their absence or replacement by generation-characteristic noise patterns indicates AI generation.
Metadata and EXIF examination
While not a forensic technique in the signal analysis sense, metadata examination provides valuable context. Authentic photographs from digital cameras contain detailed EXIF data including camera model, lens information, exposure settings, timestamp, and sometimes GPS coordinates. AI-generated images either lack EXIF data entirely or contain metadata that was artificially added after generation. The absence of camera-specific metadata in a supposedly photographic image is a useful, though not conclusive, indicator of AI generation.
Steganographic trace detection
Some AI generation platforms embed invisible identification signals in their output, either as digital watermarks or as statistical signatures. Google's SynthID, for example, embeds an invisible watermark in images generated by Imagen. Detection of these embedded signals provides a high-confidence identification of AI-generated content, but only for images produced by platforms that implement such marking. Since embedding is voluntary and can be circumvented, steganographic detection complements rather than replaces forensic signal analysis.
Pixel-level statistical analysis
At the pixel level, AI-generated images show statistical patterns that differ from photographs in measurable ways. These include differences in the distribution of pixel value histograms, the relationship between neighboring pixel values (co-occurrence matrices), the variance of pixel values within local regions, and the distribution of edges and gradients. Ensemble methods that combine many such statistical features into a single classifier have shown strong detection performance because they capture multiple independent signals that AI generation models would need to match simultaneously.
Detection across AI models
Detecting DALL-E and GPT-4o generated images
OpenAI's image generation models produce images that are well-composed and often photorealistic. DALL-E 3 and GPT-4o images can be detected through analysis of their characteristic noise patterns, which differ from camera sensor noise, and through texture analysis that reveals the influence of the model's latent space resolution. OpenAI also adds C2PA Content Credentials to generated images, though these can be stripped during sharing.
Detecting Midjourney outputs
Midjourney images are known for their distinctive aesthetic quality, often producing images with a specific color grading and composition style. From a forensic perspective, Midjourney images can be detected through frequency domain analysis (they show characteristic spectral patterns distinct from both GANs and other diffusion models), noise residual analysis, and texture analysis. The model's tendency to produce images with particularly smooth gradients and specific color palette choices also provides detection cues.
Detecting Stable Diffusion and SDXL
Stable Diffusion and its variants are the most widely deployed open-source generation models, which means the detection community has extensive training data for these architectures. The VAE decoder used in Stable Diffusion introduces specific reconstruction artifacts, and the model's latent space resolution creates texture characteristics that forensic analysis can identify. Open-source availability also means that fine-tuned and custom versions exist with varying artifact profiles, adding complexity to detection.
Detecting Adobe Firefly content
Adobe Firefly embeds Content Credentials (C2PA manifests) in generated images by default, providing a self-declaration of AI generation. When these credentials are present and intact, identification is straightforward. When they have been stripped (which occurs on most social media platforms), forensic detection falls back to signal analysis. Firefly images show diffusion model characteristics similar to other latent diffusion architectures, with some distinctive patterns related to Adobe's specific model training and post-processing pipeline.
Cross-model and zero-shot detection
The most promising approach to cross-model detection uses features from large pretrained vision models (like CLIP) as input to a lightweight binary classifier. Research from Wang et al. (CNNDetection) and Ojha et al. (UniversalFakeDetect) showed that a simple linear probe on CLIP features achieves surprisingly strong zero-shot detection, correctly identifying images from generation models it was never trained on. This suggests that large vision models learn representations that inherently distinguish generated from captured visual content.
Accuracy, limitations, and adversarial robustness
Current detection accuracy rates
| Scenario | Accuracy range | Primary challenge |
|---|---|---|
| Known GAN models (benchmark) | 97-99% | Low real-world relevance |
| Known diffusion models (benchmark) | 93-97% | Variant-specific fine-tuning needed |
| Cross-model (unseen generators) | 70-85% | Generalization gap |
| JPEG compressed (quality 75-90) | 80-92% | Signal degradation |
| Heavily compressed (quality <50) | 60-75% | Most forensic signals lost |
| AI-edited photos (partial generation) | 55-75% | Mixed real/generated regions |
| Adversarial AI images | 40-65% | Deliberately crafted evasion |
The JPEG compression challenge
JPEG compression is the single largest practical obstacle to AI image detection. Most images shared online undergo at least one round of JPEG compression, and social media platforms often apply aggressive compression that reduces file sizes by 70-80%. Each compression cycle destroys a portion of the forensic signal, replacing generation-specific artifacts with compression artifacts. Detection methods that perform at 97% accuracy on raw PNG images may drop to 80% or lower on the same images after social media compression.
Adversarial attacks against detectors
Adversarial attacks add imperceptible perturbations to an AI-generated image that cause detection models to classify it as authentic. Research has demonstrated both white-box attacks (where the attacker knows the detector's architecture) and black-box attacks (where the attacker can only observe the detector's output) that significantly degrade detection accuracy. Ensemble methods that combine multiple independent detectors are more robust to adversarial attacks than single-model approaches because an adversarial perturbation optimized for one detector often has limited effect on others.
Human-edited AI images - the hybrid problem
Increasingly common is the workflow where a user generates an AI image and then edits it in software like Photoshop, compositing AI-generated elements with photographed elements or applying transformations that alter the statistical characteristics of the generated content. These hybrid images pose a particular challenge because the forensic signals of AI generation may be partially overwritten by the editing process, and the image may contain regions with genuinely different provenance.
Short-content and small-sample limitations
Forensic detection methods are statistical in nature, which means they require sufficient signal for reliable classification. Very small images (thumbnails, icons), heavily cropped images, and images with minimal visual complexity provide less statistical signal, reducing detection confidence. Detection tools should always report confidence levels that reflect the available signal, and results on small or low-quality images should be treated as preliminary.
AI image detection tools
Free online detection tools
Several free tools allow anyone to check whether an image was AI-generated. These range from simple web upload interfaces to browser extensions that provide quick assessments. The accuracy of free tools varies significantly, and most are optimized for specific generation models, meaning they may perform well on Midjourney images but poorly on Stable Diffusion output or vice versa. Using multiple tools and comparing results provides more reliable conclusions than relying on any single tool.
AFIP forensic image analysis
AFIP's image analysis applies multiple forensic methods in parallel: frequency domain analysis, noise residual examination, pixel-level statistics, metadata evaluation, and cross-layer consistency checks. The results from these independent analyses are combined through evidence weighting that accounts for each method's reliability under the observed conditions (image resolution, compression level, content type). This ensemble approach provides better cross-model generalization and more honest uncertainty reporting than single-method detectors.
Enterprise API solutions
Organizations processing large volumes of images (news agencies, stock photo services, e-commerce platforms, social media companies) require API access for automated detection at scale. AFIP's developer program provides API endpoints for batch image analysis, returning structured forensic reports that integrate into existing content management and moderation workflows. Enterprise users can configure analysis depth based on their accuracy-throughput tradeoff requirements.
Best practices for verification
Multi-tool verification approach
Given the limitations of any single detection method, the most reliable approach to verifying image authenticity uses multiple tools and methods. Check for Content Credentials or other provenance markers first. Run the image through forensic analysis tools (AFIP and others). Perform a reverse image search to check for prior publication or the original unmanipulated version. Examine the image manually for the visual artifacts described in our deepfake detection guide. When multiple independent methods agree, confidence is high.
Combining automated and manual analysis
Automated tools catch statistical and mathematical signals that humans cannot perceive. Manual inspection catches semantic and contextual issues that automated tools miss. An AI-generated image of a "protest in Paris" might pass every forensic test but show a building that does not exist at the claimed location. Combining automated forensic analysis with human contextual evaluation provides the strongest overall verification.
When detection is uncertain
Honest uncertainty reporting is critical. When forensic analysis produces low or middling confidence scores, the appropriate response is to acknowledge the uncertainty rather than forcing a binary verdict. Many detection failures come not from the analysis being wrong, but from people treating low-confidence results as definitive. If AFIP reports a confidence score of 55%, that means the forensic evidence is genuinely ambiguous, and additional verification methods should be used before drawing conclusions.
The future of AI image detection
The trajectory of AI image detection research points toward several developments that will shape the field over the coming years. Foundation model detectors, large models pretrained on diverse datasets of real and generated images, are showing the most promise for cross-model generalization. These models develop broad representations of what distinguishes camera-captured from generated visual content, rather than memorizing artifacts specific to individual architectures.
Multimodal verification that combines image forensics with text analysis (evaluating AI-generated captions or descriptions), source verification, and content provenance checking will provide more robust overall authenticity assessment than image analysis alone. Integration of forensic detection into camera hardware and operating system image viewers could provide provenance information at the point of consumption.
Perhaps most importantly, the field is moving toward explainable detection, systems that not only classify images but identify and visualize the specific forensic evidence that supports their determination. This shift from black-box classification to evidence-based reporting is essential for applications where detection findings must withstand legal, journalistic, or academic scrutiny.
Check any image with AFIP forensic analysis
Upload images for multi-method forensic detection with evidence-based confidence scoring.
Analyze an image nowFrequently asked questions
Can AI image detectors tell which tool generated an image?
In many cases, yes. Different generation architectures (GANs, diffusion models) and specific platforms (Midjourney, DALL-E, Stable Diffusion) leave distinct forensic fingerprints. GAN attribution is more reliable than diffusion model attribution because GAN spectral fingerprints are more architecturally distinct. For diffusion models, attribution to a specific platform is possible when the detector has been trained on that platform's output but becomes less reliable for fine-tuned or customized model variants.
Does screenshotting an AI image make it undetectable?
Screenshots introduce additional processing (screen capture compression, display color profile, potential resolution change) that can degrade forensic signals. However, screenshots do not eliminate all detection signals. Noise pattern analysis, frequency domain features, and pixel-level statistics retain useful information even after screenshotting, though detection confidence will be lower than for the original file. The most resilient detection signals survive moderate quality degradation.
Are AI images getting too good to detect?
Visual detection by humans is becoming increasingly difficult as generation quality improves. However, forensic detection operates on mathematical and statistical properties that are not accessible to human perception. Even images that look perfectly photorealistic to human eyes contain statistical differences from camera-captured images. Research suggests that fundamental differences between optical capture and algorithmic generation may persist regardless of visual quality improvements, though the forensic signals become more subtle and harder to extract.
How do I check if a product photo is AI-generated?
Upload the image to AFIP's forensic analysis tool for automated detection. Additionally, check for reverse image search results (AI product photos often have no prior web presence), examine the image for telltale artifacts in text, reflections, or background details, and look for whether the product page includes other product views that are geometrically consistent with each other. AI-generated product photography often struggles with maintaining consistent product proportions across multiple views.
Is AFIP image detection free?
Yes. AFIP offers free image analysis through the AFIP Verify tool. Upload any image for multi-method forensic analysis with a confidence score and evidence report. API access for batch processing and enterprise integration is available through AFIP's developer program.