CoolFace
Datasetpublic

Shanmuk4622/ai-detection-dataset-v2

---dataset_info: features: - name: image # use the exact column name from your parquet schema dtype: image # this forces Hugging Face to render it as an image - name: label dtype: string license: other task_categories: - image-classification language: - en tags: - ai-generated-image-detection - synthetic-image-detection - diffusion-models pretty_name: AI-Generated Image Detection Dataset v2 size_categories: - 10K<n<100K AI-Generated… See the full description on the dataset page: https://huggingface.co/datasets/Shanmuk4622/ai-detection-dataset-v2.

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes516downloads
Dataset Card

license: other task_categories:

  • image-classification language:
  • en tags:
  • ai-generated-image-detection
  • synthetic-image-detection
  • diffusion-models prettyname: AI-Generated Image Detection Dataset v2 sizecategories:
  • 10K<n<100K ---

AI-Generated Image Detection Dataset v2

Paired real / AI images for training and evaluating AI-generated image detectors. Every real image has one AI partner per generator, and the pair shares a single image-grounded caption — so detectors are pushed toward the synthesis fingerprint (texture, frequency, rendering artefacts) rather than scene content.

At a glance

Real images10,000 (COCO + ImageNet-1k), label 0
AI images60,000 across 6 generators, label 1
Pairs10,000 (each real has 6 AI partners)
Resolution512×512 RGB PNG
PreprocessingIdentical canonical pipeline for real and AI (pipeline_version=1.2)
Master seed42 — controls generation seeds and split assignment
Split70/15/15 pair-level train/val/test

Generators

keymodel idnative resstepsguidance
sd15stable-diffusion-v1-5/stable-diffusion-v1-5512207.0
sdxlstabilityai/stable-diffusion-xl-base-1.0102487.0
flux_schnellblack-forest-labs/FLUX.1-schnell102440.0
kandinsky22kandinsky-community/kandinsky-2-2-decoder768254.0
pixart_sigmaPixArt-alpha/PixArt-Sigma-XL-2-1024-MS1024204.5
wuerstchenwarp-ai/wuerstchen1024[20, 10][4.0, 0.0]

Pairing and captions

Real images were captioned with Salesforce/blip2-opt-2.7b, cleaned and capped to 75 CLIP tokens, then reused byte-identically by all six generators. source_real_id links every AI image back to its real partner (source_real_id == image_id for real rows).

Canonical preprocess (leak-free)

Both real and AI images go through the same pipeline:

  1. 1.EXIF-transpose → convert to RGB → center-crop square → Lanczos resize to 512
  2. 2.JPEG-equalise (quality 95, 4:4:4) → PNG (compress level 6, no EXIF/ICC)

Applying an identical transform to both classes eliminates all resolution, colour-space, and JPEG-artefact shortcuts that would let a model cheat.

Splits

Deterministic pair-level split keyed on source_real_id (seed 42): every real image and all six of its AI partners land in the same fold. The split map is in splits.parquet; the full index is in manifest.parquet.

SplitImages
train49392
val10122
test10486

Loading

python
from huggingface_hub import hf_hub_download
import pyarrow.parquet as pq
from PIL import Image
import io

# Read the manifest (no image bytes — fast)
man = pq.read_table(hf_hub_download("Shanmuk4622/ai-detection-dataset-v2", "manifest.parquet", repo_type="dataset"))

# Read image bytes from a shard
shard = hf_hub_download("Shanmuk4622/ai-detection-dataset-v2", "real/real-xxxxx-00000.parquet", repo_type="dataset")
tbl   = pq.read_table(shard)
img   = Image.open(io.BytesIO(tbl["image"][0].as_py()))

Schema

columntypedescription
image_idstringglobally unique, e.g. real_000001 / sdxl_000001
source_real_idstringpairing key; equals image_id for real rows
labelint80 = real, 1 = AI
generatorstringreal or sd15 or sdxl or flux_schnell or kandinsky22 or pixart_sigma or wuerstchen
source_datasetstringcoco or imagenet or <generator>
promptstringcaption used (AI rows); null for real
imagebinarycanonical 512×512 RGB PNG bytes
width / heightint16always 512
orig_width / orig_heightint32provenance only — never use as a training feature
gen_model_idstringHF model id
gen_steps / gen_guidance / gen_native_resint16/float32/int16generation params
seedint64hash(master_seed, generator, source_real_id)
caption_modelstringcaptioner used
pipeline_versionstring1.2
sha256stringhex digest of the PNG bytes
created_utcstringISO-8601 UTC timestamp

Provenance, license and intended use

  • ImageNet content is non-commercial research only (ILSVRC terms).
  • COCO images are Flickr-sourced (Creative Commons).
  • AI images are synthetic outputs of the models listed above, each under its own license.
  • This dataset inherits the most restrictive applicable term: non-commercial research use. Not legal advice.
  • Intended for training / evaluating AI-image detectors. See validation_report.json for the leak-audit results.

Limitations and caveats

  • Core set is text-to-image only (no img2img / reference conditioning). Detectors trained here target the text-to-image threat model.
  • Caption quality (BLIP-2 concise sentences) bounds prompt diversity.
  • FLUX.1-schnell and Würstchen run with cpu offload on T4; generation conditions are otherwise consistent with standard inference settings.
  • Per-model step counts were reduced for speed (SDXL 8 steps, SD 1.5 20 steps); this is representative of real-world fast inference.