🚀 为了打假:用于检测生成和合成图像的一组模型
近期,网络上许多人被教皇方济各穿外套或唐纳德·特朗普被捕的虚假图像所误导。为助力解决这一问题,我们提供了可检测由Midjourney和Stable Diffusion等流行工具生成的此类图像的检测器。
✨ 主要特性
- 提供针对Midjourney和Stable Diffusion等工具生成图像的检测器。
- 可有效识别虚假图像,助力解决网络虚假图像误导问题。
📦 安装指南
使用以下代码开始使用该模型:
git lfs install
git clone https://huggingface.co/Sumsub/Sumsub-ffs-synthetic-1.0_sd_200 sumsub_synthetic_sd_200
你可能需要安装以下先决条件:
pip install -r requirements.txt
pip install "git+https://github.com/rwightman/pytorch-image-models"
pip install "git+https://github.com/huggingface/huggingface_hub"
💻 使用示例
基础用法
from sumsub_synthetic_sd_200.pipeline import PreTrainedPipeline
from PIL import Image
pipe = PreTrainedPipeline("sumsub_synthetic_sd_200/")
img = Image.open("sumsub_synthetic_sd_200/images/2.jpg")
result = pipe(img)
print(result)
📚 详细文档
模型详情
模型描述
- 开发者:Sumsub AI团队
- 模型类型:图像分类
- 许可证:CC-By-SA-3.0
- 类型:diffusions_200m(大小:2亿参数,描述:旨在检测使用不同版本的Stable Diffusion(1.4、1.5、2.1)创建的照片)
- 微调自模型:convnext_large_mlp.clip_laion2b_soup_ft_in12k_in1k_384
演示
演示页面可在此处找到。
训练详情
训练数据
这些模型在以下数据集上进行训练:
Stable Diffusion数据集:
训练过程
为提高性能指标,我们使用了旋转、裁剪、Mixup和CutMix等数据增强方法。每个模型使用早停法训练30个epoch,批量大小为32。
评估
在评估中,我们使用了以下数据集:
Stable Diffusion数据集:
真实图像:
指标
局限性
- 需注意,无法达到100%的准确率。因此,模型输出仅应作为图像可能(但并非肯定)是人工生成的指示。
- 我们的模型在准确预测极其鲜艳且质量极高的真实世界示例的类别时可能会面临挑战。在这种情况下,丰富的颜色和精细的细节可能会因输入的复杂性而导致误分类。这可能会使模型关注不一定能指示真实类别的视觉方面。

🔧 技术细节
引用
如果您觉得此项目有用,请按以下方式引用:
@misc{sumsubaiornot,
publisher = {Sumsub},
url = {https://huggingface.co/Sumsub/Sumsub-ffs-synthetic-1.0_sd_200},
year = {2023},
author = {Savelyev, Alexander and Toropov, Alexey and Goldman-Kalaydin, Pavel and Samarin, Alexey},
title = {For Fake's Sake: a set of models for detecting deepfakes, generated images and synthetic images}
}
参考文献
- Stöckl, Andreas. (2022). Evaluating a Synthetic Image Dataset Generated with Stable Diffusion. 10.48550/arXiv.2211.01777.
- Lin, Tsung-Yi & Maire, Michael & Belongie, Serge & Hays, James & Perona, Pietro & Ramanan, Deva & Dollár, Piotr & Zitnick, C.. (2014). Microsoft COCO: Common Objects in Context.
- Howard, Andrew & Zhu, Menglong & Chen, Bo & Kalenichenko, Dmitry & Wang, Weijun & Weyand, Tobias & Andreetto, Marco & Adam, Hartwig. (2017). MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications.
- Liu, Zhuang & Mao, Hanzi & Wu, Chao-Yuan & Feichtenhofer, Christoph & Darrell, Trevor & Xie, Saining. (2022). A ConvNet for the 2020s.
- Wang, Zijie & Montoya, Evan & Munechika, David & Yang, Haoyang & Hoover, Benjamin & Chau, Polo. (2022). DiffusionDB: A Large-scale Prompt Gallery Dataset for Text-to-Image Generative Models. 10.48550/arXiv.2210.14896.
📄 许可证
本项目采用CC-By-SA-3.0许可证。