This paper explores the task of detecting images generated by text-to-image diffusion models. To evaluate this, we consider images generated from captions in the MSCOCO and Wikimedia datasets using two state-of-the-art models: Stable Diffusion and GLIDE. Our experiments show that it is possible to detect the generated images using simple Multi-Layer Perceptrons (MLPs), starting from features extracted by CLIP, or traditional Convolutional Neural Networks (CNNs). We also observe that models trained on images generated by Stable Diffusion can detect images generated by GLIDE relatively well, however, the reverse is not true. Lastly, we find that incorporating the associated textual information with the images rarely leads to significant improvement in detection results but that the type of subject depicted in the image can have a significant impact on performance. This work provides insights into the feasibility of detecting generated images, and has implications for security and privacy concerns in real-world applications. The code to reproduce our results is available at: https://github.com/davide-coccomini/Detecting-Images-Generated-by-Diffusers
翻译:本文探讨了检测由文本到图像扩散模型生成图像的任务。为评估该任务,我们使用了基于MSCOCO和Wikimedia数据集中的描述性文本,通过两种先进模型——Stable Diffusion和GLIDE生成的图像进行实验。实验结果表明,利用CLIP提取的特征或传统卷积神经网络(CNN),通过简单的多层感知机(MLP)即可检测出生成图像。我们还观察到,在Stable Diffusion生成图像上训练的模型能够相对良好地检测出GLIDE生成的图像,反之则不成立。最后,我们发现将相关文本信息与图像结合通常不会显著提升检测结果,但图像描绘的主题类型对性能有显著影响。本研究为检测生成图像的可行性提供了见解,并对实际应用中的安全与隐私问题具有启示意义。复现结果的代码已发布于:https://github.com/davide-coccomini/Detecting-Images-Generated-by-Diffusers