AI-Generated Image Detection Using Pretrained CNN and Vision Transformer Models
The rapid development of Artificial Intelligence (AI) has made it possible to generate highly realistic images using modern generative models. These images are increasingly difficult to distinguish from authentic photographs, creating challenges in digital content verification and image forensics. This study evaluates and compares two pretrained architectures, a Convolutional Neural Network (ResNet50) and a Vision Transformer (ViT-B/16), for detecting AI-generated images. Both models were fine-tuned for binary classification on a balanced subset of the GenImage benchmark containing real images and images generated by the ADM diffusion model (3,500 training, 750 validation and 750 test images per class). They were evaluated on the original test images and under JPEG compression (quality 90, 70 and 50) and image resizing (112 px and 64 px, restored to 224 px). On the original test images, ResNet50 reached 99.00% accuracy and ViT-B/16 reached 100.00%. JPEG compression had little effect on either model: the worst-case accuracy drops were 0.20 points for ResNet50 and 0.07 points for ViT-B/16. In contrast, downsampling the images to 112 px or 64 px and restoring them to 224 px reduced both models to near-chance accuracy (49.67%–50.80%), because almost all AI-generated images were then classified as real. ViT-B/16 was marginally more stable under JPEG compression, while neither architecture was robust to resizing. Because all generated images come from a single generator, the results describe robustness to post-processing and do not establish generalization to unseen generators.
Authors
- Bobhate Grishma
- Atharv Anilrao Kulkarni
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-26
- DOI
- https://doi.org/10.5281/zenodo.24559588
- Primary Topic
- Digital Media Forensic Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00