You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Robustness of AI-Generated Image Detection Against Localized Inpainting Attacks

This repository hosts the detector-ready datasets and mask packs used in the thesis:

Robustness of AI-Generated Image Detection Against Localized Inpainting Attacks
Oguz Akin, Saarland University, CISPA Helmholtz Center for Information Security (2025)

It provides standardized evaluation splits for six state-of-the-art AI-generated image (AIGI) detectors across watermarking, passive, and training-free paradigms, tested under LaMa and ZITS inpainting attacks.

Everything is packaged as .tar.xz archives to ensure reproducibility and easy transfer.


πŸ“‚ Repository Structure

. β”œβ”€ detectors/ β”‚ β”œβ”€ ufd_datasets.tar.xz β”‚ β”œβ”€ dimd_datasets.tar.xz β”‚ β”œβ”€ warpad_datasets.tar.xz β”‚ β”œβ”€ aeroblade_datasets.tar.xz β”‚ β”œβ”€ stablesig_datasets.tar.xz β”‚ └─ treering_datasets.tar.xz β”œβ”€ masks/ β”‚ β”œβ”€ masks_stablesig.tar.xz β”‚ β”œβ”€ robust_randblob_bins.tar.xz β”‚ β”œβ”€ robust_randrect.tar.xz β”‚ └─ masks_treering_wm.tar.xz └─ checksums.sha256

  • detectors/ β€” per-detector dataset β€œviews,” already resized/re-encoded into the formats expected by each model.
  • masks/ β€” random-rectangle and random-blob object masks (area-binned), used to generate inpainting attacks.
  • checksums.sha256 β€” SHA-256 integrity hashes for all archives.

πŸ”Ž Dataset Details

Detector Views

Each archive expands into the exact layout expected by that detector. All splits contain 200 images per split (e.g. LaMa Inpainted Rand-Blob on SEMI-TRUTHS real images).

Typical layout: baseline/ reals/ fakes/ [fakes_inpainted_lama/, fakes_inpainted_zits/]

robustness/ inpainted_lama/ randrect/ randblob_bins/bin{1..4}/ inpainted_zits/ randrect/ randblob_bins/bin{1..4}/ [reals_inpainted/]


Detector Input Handling

On disk: All datasets are stored with their preprocessed versions for each detector to match their original paper/training setup.

  • UFD β†’ 224
    (Resized + center-cropped to 224Γ—224, CLIP normalization.)
  • DIMD β†’ JPEG-256
    (Resized to 256Γ—256, with JPEG round-trip to mimic training distribution.)
  • AEROBLADE / WaRPAD / StableSig / Tree-Ring β†’ 512
    (All evaluated directly at 512Γ—512 without JPEG compression.)

Why this split? To eliminate the effect of compression or size on classification, ensuring scientifically fair evaluation.


Mask Packs

  • masks_stablesig.tar.xz
  • masks_treering_wm.tar.xz

Contain random rectangle and random blob masks, binned by area ratio:

  • bin1_0-3 β†’ 0–3% of image area
  • bin2_3-10 β†’ 3–10%
  • bin3_10-25 β†’ 10–25%
  • bin4_25-40 β†’ 25–40%

Used with LaMa and ZITS to create controlled inpainting attacks.


πŸ“ Metrics

Datasets are organized to support a fixed-threshold robustness evaluation.

  • Baseline AUC
    Distinguish clean reals vs fakes. Threshold t* chosen via Youden’s J.
  • Robustness AUC
    Distinguish clean vs inpainted on correctly classified baseline samples.
  • Ξ”AUC = Baseline – Robustness
  • ASR_inpainted (primary):
    % of inpainted reals classified as Real at baseline t*.
  • ASR_fakeβ†’real (secondary):
    % of baseline-detected fakes that flip to Real after inpainting.

πŸ“¦ Archive Sizes

  • detectors/aeroblade_datasets.tar.xz β€” 1.5 GB
  • detectors/dimd_datasets.tar.xz β€” 117 MB
  • detectors/warpad_datasets.tar.xz β€” 1.5 GB
  • detectors/stablesig_datasets.tar.xz β€” 924 MB
  • detectors/treering_datasets.tar.xz β€” 1.6 GB
  • detectors/ufd_datasets.tar.xz β€” 442 MB
  • masks/masks_stablesig.tar.xz β€” 2.2 MB
  • masks/masks_treering_wm.tar.xz β€” 1.2 MB

βš™οΈ Usage

Download & Extract

from huggingface_hub import hf_hub_download
import tarfile, os

REPO = "eoguzakin/Robustness of AI-Generated Image Detection Against Localized Inpainting Attacks"

def fetch_and_extract(filename, target_dir):
    path = hf_hub_download(repo_id=REPO, filename=filename, repo_type="dataset")
    os.makedirs(target_dir, exist_ok=True)
    with tarfile.open(path, "r:xz") as tar:
        tar.extractall(target_dir)
    print("Extracted:", target_dir)

# Example: UFD view + StableSig masks
fetch_and_extract("detectors/ufd_datasets.tar.xz", "/tmp/ufd")
fetch_and_extract("masks/masks_stablesig.tar.xz", "/tmp/masks_stablesig")

Integrity check

sha256sum -c checksums.sha256

πŸ§ͺ Provenance Reals: SEMI-TRUTHS (Pal et al. 2024), OpenImages subset.

Fakes: GenImage diverse generator set.

Inpainting attacks: LaMa (Suvorov et al. 2022), ZITS (Dong et al. 2022).

Watermarks: Stable Signature (Fernandez et al. 2023), Tree-Ring (Wen et al. 2023).

Detector-specific preprocessing applied before runtime, ensuring comparability.


πŸ“Έ Sample Images

Baseline (Real vs Fake)

Real Fake
Real Fake

Inpainted reals (LaMa, ZITS & SEMI-TRUTHS)

LaMa ZITS SEMI-TRUTHS
LaMa ZITS SEMI-TRUTHS
LaMa ZITS
LaMa ZITS

Watermarks (StableSig vs Tree-Ring)

StableSig LaMa ZITS
StableSig LaMa ZITS
Tree-Ring LaMa ZITS
Tree-Ring LaMa ZITS

Generated sample mask images. Upper and middle rows are composed of masks with sizes 0-3%, 3-10%, 10-25% and 25-40% from left to right. Last row is composed of random samples of geometric masks with different sizes.

An example semantic mask used in Semi-Truths dataset.


πŸ“š Citations If you use this dataset, please cite:

  • Pal et al., 2024 β€” Semi-Truths: A Large-Scale Dataset of AI-Augmented Images for Evaluating Robustness of AI-Generated Image Detectors.
  • Zhu et al., 2023 β€” GenImage: A Million-Scale Benchmark for Detecting AI-Generated Image.
  • Ojha et al., 2023 β€” Universal Fake Image Detectors.
  • Corvi et al., 2023 β€” On the Detection of Synthetic Images Generated by Diffusion Models.
  • Choi et al., 2025 β€” Training-free Detection of AI-generated images via Cropping Robustness (WaRPAD)
  • Ricker et al., 2024 β€” AEROBLADE.
  • Fernandez et al., 2023 β€” Stable Signature.
  • Wen et al., 2023 β€” Tree-Ring Watermarks.
  • Suvorov et al., 2022 β€” LaMa Inpainting.
  • Dong et al., 2022 β€” ZITS Inpainting.

πŸ“ License Derived datasets for research use only. Upstream datasets (SEMI-TRUTHS, GenImage, LaMa, ZITS, etc.) retain their original licenses. This packaging (scripts + archive structure) is released under CC BY-NC 4.0 unless otherwise specified.

πŸ‘€ Maintainer Oguz Akin β€” Saarland University Contact: [email protected]

Downloads last month
191