# Exploring techniques to distinguish between real images and those generated using stable diffusion XL

**Authors:** Benjamin Sanders, David Morrison, David Harris-Birtill

PMC · DOI: 10.1371/journal.pone.0339917 · 2026-01-27

## TL;DR

This paper explores methods to detect images generated by Stable Diffusion XL using a custom CNN and a new dataset.

## Contribution

The paper introduces a novel CNN and a large public dataset of Stable Diffusion XL-generated images for synthetic image detection.

## Key findings

- A custom CNN achieved 97.24% accuracy in distinguishing real and synthetic images.
- The dataset is the largest public collection of Stable Diffusion XL-generated images.
- ResNet-18 baseline achieved 98.38% accuracy in synthetic image detection.

## Abstract

The recent development of text-to-image diffusion models has allowed us to quickly generate realistic images from textual prompts. Despite enabling innovation in particular domains, concerns have been raised over the prospect of malicious users posing synthetic images as genuine. To assess if it is possible to discern between real images and those generated using diffusion models, a novel convolutional neural network was built, trained and tested on a bespoke dataset formed of authentic images from the ImageNet dataset and corresponding synthetic images generated using Stable Diffusion XL: an open-source text-to-image diffusion model. With the public release of this dataset, it is currently the largest publicly accessible collection of images generated using Stable Diffusion XL, significantly contributing to future research in this area. The positive results from our experiment performing a binary classification of synthetic and real images demonstrate the effectiveness in detecting synthetic images, with up to 98.38% accuracy using a ResNet-18 baseline, and 97.24% with the proposed CNN.

## Figures

17 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12844535/full.md

---
Source: https://tomesphere.com/paper/PMC12844535