This repository is the official implementation of SpottingDiffusion : A CNN-based method of detecting AI generated images.
This study aims to present a novel method of detecting images made by “Latent Diffusion Models” as described by Rombach et al. The issue of differentiating AI generated images from real ones has recently become one of great importance and debate; as extremely realistic AI generated images are rapidly becoming easier to make and disseminate.
The need of detecting these images arises when these technologies will inevitably be used to make misleading material with the intent of deceiving the human viewer. The authors of this study present a solution, an algorithmic way of differentiating images made by “Latent Diffusion Models” from real ones. In specific, we detail our research on detecting images produced by the “Stable Diffusion Latent Diffusion Model”.
You may also easily use the Google Colab version of the trainer, which has training and downloading automatically built in.
pip install -r requirements.txt
Login with kaggle API, and then,
kaggle datasets download sahalmulki/stable-diffusion-generated-images
kaggle datasets download sahalmulki/spottingdiffusion-testing-dataset
mkdir testing
unzip /content/spottingdiffusion-testing-dataset.zip -d /testing/
python train.py 12 0.3 0.00001
python evaluate.py /full-path-to-dir/testing pretrained/pretrained-spotting-diffusion
Google Colab Notebook for Evaluation: