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.
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
Generators
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:
- EXIF-transpose → convert to RGB → center-crop square → Lanczos resize to 512
- 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.
Loading
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
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.jsonfor 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.
