The rapid growth of generative AI has made it increasingly difficult to tell AI-generated images from real photographs, and a single detection model often fails on images from generators it was not trained on. This paper presents the AI Image Authenticator, a web-based system that combines a six-model neural ensemble with a five-layer forensic suite to decide whether an uploaded image is AI-generated or real. Six pretrained Vision Transformer and Swin Transformer classifiers each output a probability, and a weighted democratic consensus with uncertainty tracking merges them into one verdict. In parallel, five forensic layers—C2PA Content Credentials, EXIF hardware verification, Error Level Analysis, 2D Fast Fourier Transform spectral analysis and sensor noise residual analysis—supply evidence that does not depend on any trained classifier. The system uses React.js on the front end and Flask with Hugging Face Transformers on the back end, and all models run locally on a CPU, so no paid API is needed. For every image it reports a verdict, a confidence score, each model’s vote and five forensic metric cards, so the decision is explainable rather than a single opaque number. Tests on a DALL-E 3 image shared through WhatsApp, a Gemini image carrying C2PA credentials and real smartphone photographs, including WhatsApp-compressed copies, were all classified correctly. The results show that combining diverse classifiers with forensic evidence removes the blind spots of any single detector.
Introduction
The study proposes an AI Image Authenticator, a web-based system designed to identify AI-generated images and distinguish them from genuine photographs. With tools such as DALL-E, Midjourney, Stable Diffusion, Flux and Gemini producing increasingly realistic images, detecting manipulated or synthetic content has become important for preventing misinformation, identity fraud and deepfake misuse.
1. Background and Objectives
Traditional AI-image detectors often depend on a single trained classifier. Such detectors may fail to recognise images from newer generators and can incorrectly classify genuine photographs after WhatsApp compression.
To overcome these problems, the proposed system combines six pretrained AI-detection models with five digital forensic techniques. Its main objectives are to:
Improve detection across different AI image generators.
Reduce false positives on compressed real photographs.
Use C2PA provenance and image metadata as supporting evidence.
Provide explainable results through individual model votes and forensic measurements.
Run locally on CPU hardware without paid external services.
2. Literature Review and Research Gap
Existing research focuses mainly on two approaches: watermark-based detection and passive image analysis.
Watermarking methods identify images containing embedded marks but cannot reliably detect images from generators that do not use those marks. Passive detectors analyse image patterns but often struggle with unseen generators and image compression.
The study identifies three major research gaps:
Dependence on individual classifiers limits generalisation to new AI generators.
Watermark-based approaches cannot detect all unmarked AI images.
Many detectors provide a single confidence score without explaining their decisions.
The proposed system addresses these gaps through a six-model ensemble, five forensic layers and an explainable results interface.
3. Proposed System and Architecture
The system uses a React.js and Vite frontend with a Python Flask backend. Users upload JPG, JPEG, PNG or WEBP images through a web interface, and the backend analyses them before returning a classification result.
It consists of two main components:
A. Six-model neural ensemble
The system uses six pretrained Vision Transformer (ViT) and Swin Transformer models from Hugging Face. Each model analyses the image independently, and its output is converted into a common AI-versus-real probability scale.
Weighted democratic voting combines their predictions. A low voting margin indicates uncertainty and reduces confidence rather than forcing a definite decision.
B. Five-layer forensic analysis
C2PA verification: Checks cryptographically signed content credentials for declarations of AI generation.
EXIF analysis: Examines camera details such as make, model, lens, ISO and shutter speed, along with possible AI-generator metadata.
2D-FFT analysis: Detects unusual frequency patterns that may result from generative-model up-sampling.
Sensor noise analysis: Examines image noise and RGB-channel correlations to identify differences between camera-captured and generated images.
The C2PA declaration of AI generation acts as an authoritative override. Otherwise, neural predictions and forensic evidence are combined to produce the final verdict.
4. Implementation and Technologies
The system is developed using the following technologies:
Component
Technology
Front end
React.js, Vite
Back end
Python, Flask, Flask-CORS
Deep learning
PyTorch, Hugging Face Transformers
Image processing
Pillow, NumPy
Detection models
ViT and Swin Transformer
Provenance analysis
C2PA
Version control
Git and GitHub
All six models are loaded and cached locally. After the initial model download, the application can operate offline without sending uploaded images to external services.
5. Results and Discussion
The system was tested using AI-generated images from different sources and genuine smartphone photographs, including WhatsApp-compressed images.
The reported test results were:
Test image
Classification
Confidence
DALL-E 3 image shared through WhatsApp
AI-Generated
99.7%
Real smartphone photograph after WhatsApp compression
Real / Authentic
87.5%
Gemini image containing C2PA credentials
AI-Generated
99.9%
The ensemble successfully identified the DALL-E 3 image even when WhatsApp compression removed some metadata and image artefacts. It also correctly classified the tested compressed smartphone photograph as real.
For the DALL-E 3 image, five of six models voted AI-generated, while the Dima806 model incorrectly leaned towards real. For the real photograph, four models voted real, although two models leaned towards AI-generated. This demonstrates how ensemble voting can reduce dependence on an individual model's prediction.
The Gemini image was identified through its C2PA manifest, which provided cryptographic evidence of AI generation even though the classifiers alone had previously failed to recognise it.
6. Functional Testing and Advantages
Functional testing confirmed that:
Valid JPG, PNG and WEBP images were accepted.
Unsupported files and corrupted images were rejected.
Files larger than 10 MB were blocked.
C2PA-based AI declarations triggered immediate detection.
Uncertain model votes were handled appropriately.
The system continued operating when an individual model failed to load.
The interface displayed verdicts, confidence levels, individual model votes and forensic metrics.
Major advantages include improved detection through multiple models, explainable results, local image processing, privacy protection and free operation without a GPU.
7. Limitations and Future Scope
The system has several limitations:
New AI generators may remain undetected until the models are updated.
Screenshots and messaging applications can remove C2PA and EXIF information.
ELA, FFT and sensor-noise techniques are heuristic methods and can be affected by resizing, compression and editing.
Fusion weights and decision thresholds require further calibration.
Testing was qualitative and based on a small image set; large-scale accuracy, precision, recall and F1-score have not been established.
CPU-based processing may be slow when multiple users scan images simultaneously.
Future work should include testing on larger and more diverse labelled datasets, evaluating unseen generators, calibrating the fusion method and measuring performance on heavily compressed and edited images.
Conclusion
This paper showed that reliable detection of AI-generated images needs more than one trained classifier. By combining six specialised Vision Transformer and Swin models through weighted democratic consensus, and by adding a five-layer forensic suite of C2PA Content Credentials, EXIF hardware verification, Error Level Analysis, 2D-FFT spectral analysis and sensor noise residual analysis, the AI Image Authenticator removed the failures observed with a single model: DALL-E 3 images that a single detector missed are now detected, real smartphone photographs compressed by WhatsApp are classified as real, and images carrying C2PA credentials are identified with cryptographic certainty. Every result shows the verdict, the confidence, each model’s vote and the five forensic metrics, and the application runs on ordinary CPU hardware with locally cached models, needs no paid API and keeps the user’s images on the local machine.
References
[1] A. Müller, D. Lukovnikov, J. Thietke, A. Fischer, and E. Quiring, “Black-box forgery attacks on semantic watermarks for diffusion models,” in Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition (CVPR), 2025, pp. 20937–20946.
[2] J. Duan, J. Guang, W. Yang, and R. He, “Visual watermarking in the era of diffusion models: Advances and challenges,” 2025.
[3] K. Zhang, Z. Hou, Z. Hua, Y. Zheng, and L. Y. Zhang, “Boosting deepfake detection generalizability via expansive learning and confidence judgement,” IEEE Trans. Circuits Syst. Video Technol., 2025.
[4] R. Xu et al., “InvisMark: Invisible and robust watermarking for AI-generated image provenance,” in Proc. IEEE/CVF Winter Conf. Applications of Computer Vision (WACV), 2025, pp. 909–918.
[5] Y. Chen, J. Vice, N. Akhtar, N. Haldar, and A. Mian, “Dynamic watermarks in images generated by diffusion models,” in Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition Workshops (CVPRW), 2025, pp. 5271–5277, doi: 10.1109/CVPRW67362.2025.00523.
[6] D. Tariang et al., “Synthetic image verification in the era of generative artificial intelligence: What works and what isn’t there yet,” IEEE Security & Privacy, 2024.
[7] M. Guo et al., “AI-generated image detection: Passive or watermark?,” 2024.
[8] R. Corvi, D. Cozzolino, G. Zingarini, G. Poggi, K. Nagano, and L. Verdoliva, “On the detection of synthetic images generated by diffusion models,” in Proc. IEEE Int. Conf. Acoustics, Speech and Signal Processing (ICASSP), 2023.
[9] A. Dosovitskiy et al., “An image is worth 16x16 words: Transformers for image recognition at scale,” in Proc. Int. Conf. Learning Representations (ICLR), 2021.
[10] Z. Liu et al., “Swin Transformer: Hierarchical vision transformer using shifted windows,” in Proc. IEEE/CVF Int. Conf. Computer Vision (ICCV), 2021.
[11] J. Frank, T. Eisenhofer, L. Schönherr, A. Fischer, D. Kolossa, and T. Holz, “Leveraging frequency analysis for deep fake image recognition,” in Proc. Int. Conf. Machine Learning (ICML), 2020.
[12] R. Durall, M. Keuper, and J. Keuper, “Watch your up-convolution: CNN based generative deep neural networks are failing to reproduce spectral distributions,” in Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition (CVPR), 2020.
[13] N. Krawetz, “A picture’s worth: Digital image analysis and forensics,” Black Hat Briefings, 2007.
[14] Coalition for Content Provenance and Authenticity (C2PA), Content Credentials Technical Specification.