--- pretty_name: AIGI Inpainting Robustness dataset_name: aigi-inpainting-robustness tags: - ai-generated-images - inpainting - robustness - diffusion - watermarking license: cc-by-nc-4.0 task_categories: - image-classification - other size_categories: - 1K **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 β”‚ β”œβ”€ dire_datasets.tar.xz β”‚ β”œβ”€ aeroblade_datasets.tar.xz β”‚ β”œβ”€ stablesig_datasets.tar.xz β”‚ └─ treering_datasets.tar.xz β”œβ”€ masks/ β”‚ β”œβ”€ masks_stablesig.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.) - **DIRE β†’ 256** (Resized to 256Γ—256, matching the ADM ImageNet-256 diffusion prior.) - **AEROBLADE / 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**. - **Ξ”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. **Watermarking detectors:** - Thresholds fixed at **t90** and **t99** on clean watermarked images together with another threshold that is determined at baseline to reflect a real life setting. - **ASR** = % attacked watermarked images where watermark is not detected. - **AUC(clean vs attacked)** sanity check. --- ## πŸ“¦ Archive Sizes - `detectors/aeroblade_datasets.tar.xz` β€” **1.5 GB** - `detectors/dimd_datasets.tar.xz` β€” **117 MB** - `detectors/dire_datasets.tar.xz` β€” **468 MB** - `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 ```python 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 ```bash 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](samples/001a695ad732152b.jpg) | ![Fake](samples/ai_00003.png) | Inpainted reals (LaMa, ZITS & SEMI-TRUTHS) | LaMa | ZITS | SEMI-TRUTHS | |------|------|-------------| | ![LaMa](samples/001a695ad732152b_lama.png) | ![ZITS](samples/001a695ad732152b_zits.png) | ![SEMI-TRUTHS](samples/001a695ad732152b_m02wbtzl_9b6e60b8_semantic.png) | | LaMa | ZITS | |------|------| | ![LaMa](samples/ai_00003_lama.png) | ![ZITS](samples/ai_00003_zits.png) | Watermarks (StableSig vs Tree-Ring) | StableSig | LaMa | ZITS | |------|------|------| | ![StableSig](samples/stsig_0007.png) | ![LaMa](samples/stsig_0007_lama.png) | ![ZITS](samples/stsig_0007_zits.png) | | Tree-Ring | LaMa | ZITS | |------|------|------| | ![Tree-Ring](samples/0031_1671041020.png) | ![LaMa](samples/0031_1671041020_lama.png) | ![ZITS](samples/0031_1671041020_zits.png) | --- πŸ“š 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. - Ojha et al., 2023 β€” Universal Fake Image Detectors. - Corvi et al., 2023 β€” On the Detection of Synthetic Images Generated by Diffusion Models. - Wang et al., 2023 β€” DIRE for Diffusion-Generated Image Detection. - Ricker et al., 2024 β€” AEROBLADE. Fernandez et al., 2023 β€” Stable Signature. - Wen et al., 2023 β€” Tree-Ring Watermarks. - Suvorov et al., 2022 β€” LaMa Inpainting. - Rombach et al., 2022 β€” Latent Diffusion Models. 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: ogak00001@stud.uni-saarland.de πŸ—“οΈ Changelog v1.0 β€” Initial release with detector views + masks for LaMa and ZITS inpainting.