Datasets:
Make README more succinct
Browse files
README.md
CHANGED
|
@@ -42,110 +42,36 @@ configs:
|
|
| 42 |
|
| 43 |
# WildFake-Sample
|
| 44 |
|
| 45 |
-
A 30,000-image
|
| 46 |
[arXiv:2402.11843](https://arxiv.org/abs/2402.11843);
|
| 47 |
[original dataset](https://modelscope.cn/datasets/hy2628982280/WildFake)),
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
(
|
|
|
|
| 52 |
methodology and results.
|
| 53 |
|
| 54 |
-
**This is a sample, not the full WildFake dataset** (which is ~3.6M images
|
| 55 |
-
across the same generators). All credit for the underlying images and the
|
| 56 |
-
dataset's design goes to WildFake's original authors — see their paper and
|
| 57 |
-
dataset page for licensing/usage terms; this sample exists purely to give
|
| 58 |
-
a fixed, reproducible evaluation slice across machines/checkpoints without
|
| 59 |
-
re-downloading from the ~39 multi-GB source archives every time.
|
| 60 |
-
|
| 61 |
-
## Why this composition
|
| 62 |
-
|
| 63 |
-
The detector this sample was built to evaluate trained on SD-based fakes
|
| 64 |
-
over COCO real images (DDA-Training-Set) and was previously evaluated on
|
| 65 |
-
FLUX fakes (SID). This sample deliberately covers generators and real
|
| 66 |
-
sources **outside** both of those: 26 fake generators spanning GAN-based,
|
| 67 |
-
diffusion-based (non-SD and SD-family), and other architectures, plus 6 real
|
| 68 |
-
sources. WildFake's own COCO real split is deliberately excluded here since
|
| 69 |
-
the detector's training data is COCO-based — including it would risk
|
| 70 |
-
sampling images already seen in training.
|
| 71 |
-
|
| 72 |
## Composition
|
| 73 |
|
| 74 |
-
**Fake
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
| Diffusion (SD family) | SDXL, Original SD, SD+ControlNet, SD+LoRA, SD+LyCORIS, Personalized SD (DreamBooth), Personalized SD (finetune) |
|
| 81 |
-
| Other | MAGE, VQGAN, VQVAE, MAE |
|
| 82 |
-
|
| 83 |
-
**Real — 1,750 images per source (10,500 total):** LAION-5B, ImageNet,
|
| 84 |
-
LSUN-Church, FFHQ, AFHQ, CelebA-HQ.
|
| 85 |
-
|
| 86 |
-
Total: **30,000 images** (19,500 fake / 10,500 real).
|
| 87 |
|
| 88 |
## Files
|
| 89 |
|
| 90 |
-
```
|
| 91 |
-
|
| 92 |
-
image (see columns below)
|
| 93 |
-
manifest.csv / .json same per-image metadata as the parquet's
|
| 94 |
-
columns, as plain CSV/JSON, for anyone who
|
| 95 |
-
wants it without going through `datasets`
|
| 96 |
-
transform_plan.csv / .json the per-image condition assignment on its own
|
| 97 |
-
(see below) — a subset of what's in the parquet
|
| 98 |
-
```
|
| 99 |
-
|
| 100 |
-
### Columns (`data/train-*.parquet`, and equivalently `manifest.csv` joined
|
| 101 |
-
with `transform_plan.csv` by row)
|
| 102 |
-
|
| 103 |
-
`image_bytes` (binary — the original image file's bytes, unmodified: a PNG
|
| 104 |
-
regardless of the image's format inside WildFake, since many of the fakes
|
| 105 |
-
are natively PNG but reals are often JPEG; not JPEG-recompressed at sampling
|
| 106 |
-
time, so any JPEG compression applied during evaluation is the only lossy
|
| 107 |
-
step, applied once, consistently), `split` (real/fake), `group` (generator
|
| 108 |
-
or real-source name), `category` (GAN_based/Diffusion_based/Other_based/
|
| 109 |
-
Real), `source_zip` / `source_path` (which WildFake archive and path inside
|
| 110 |
-
it this image came from), `width`, `height`, `condition` (e.g. "JPEG q=30",
|
| 111 |
-
"Blur sigma=1.0" — see "Transform assignment" below), `family` (JPEG/Blur/
|
| 112 |
-
Resize/Noise/ColorJitter/CenterCrop), `order` (always `transform_first` —
|
| 113 |
-
the condition is applied to the image, then a final standard q=96 JPEG pass
|
| 114 |
-
is applied last, standardizing the final encoding every image ends up in
|
| 115 |
-
regardless of which condition it drew).
|
| 116 |
-
|
| 117 |
-
**Why `image_bytes` is plain binary, not the `datasets` library's `Image`
|
| 118 |
-
feature type**: `Image` hit two separate bugs on this dataset (a crash in
|
| 119 |
-
`push_to_hub`'s internal shard-embedding step, and — after working around
|
| 120 |
-
that — silently-empty bytes from `to_parquet()` skipping the same embedding
|
| 121 |
-
step instead of erroring). Plain bytes have no such embedding step to break.
|
| 122 |
-
Decode with:
|
| 123 |
-
```python
|
| 124 |
-
from PIL import Image
|
| 125 |
-
import io
|
| 126 |
-
img = Image.open(io.BytesIO(row["image_bytes"]))
|
| 127 |
-
```
|
| 128 |
-
|
| 129 |
-
### Transform assignment
|
| 130 |
-
|
| 131 |
-
**How it was made** (no randomness, fully reproducible from the manifest
|
| 132 |
-
alone): within each group independently, images are sorted by pixel area
|
| 133 |
-
ascending, then cycled round-robin through 14 conditions (JPEG q90/70/50/30,
|
| 134 |
-
Gaussian blur σ0.5/1.0/2.0, resize 0.5x/0.25x, Gaussian noise σ.02/.05/.10,
|
| 135 |
-
color jitter, center-crop). Sorting before cycling stratifies the assignment
|
| 136 |
-
across resolution (any 14 consecutive area-sorted images cover every
|
| 137 |
-
condition once, so no condition is systematically biased toward small or
|
| 138 |
-
large images); cycling makes it uniform (every condition gets within 1
|
| 139 |
-
image of an even split per group).
|
| 140 |
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
reading only each archive's central directory (a listing) plus the exact
|
| 146 |
-
compressed bytes of the specific images sampled, never downloading an
|
| 147 |
-
archive in full. First-N selection per generator/source in each archive's
|
| 148 |
-
own listing order (no random sampling). See
|
| 149 |
-
`data_prep/build_wildfake_eval.py`, `data_prep/build_wildfake_transform_plan.py`,
|
| 150 |
-
and `data_prep/push_wildfake_to_hf.py` in the GitHub repo above for the
|
| 151 |
-
exact code.
|
|
|
|
| 42 |
|
| 43 |
# WildFake-Sample
|
| 44 |
|
| 45 |
+
A 30,000-image sample of **WildFake** (Hao et al., AAAI 2025,
|
| 46 |
[arXiv:2402.11843](https://arxiv.org/abs/2402.11843);
|
| 47 |
[original dataset](https://modelscope.cn/datasets/hy2628982280/WildFake)),
|
| 48 |
+
covering generators and real-image sources outside DDA/SID — a held-out
|
| 49 |
+
generalization slice, not a copy of the full ~3.6M-image dataset. All credit
|
| 50 |
+
for the images goes to WildFake's original authors. Built for
|
| 51 |
+
[Buxt-Codes/AIGI-Detection](https://github.com/Buxt-Codes/AIGI-Detection)
|
| 52 |
+
(branch `LoRC-PC`) — see that repo's `HANDOFF.md` for the evaluation
|
| 53 |
methodology and results.
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
## Composition
|
| 56 |
|
| 57 |
+
- **Fake (19,500):** 750 × 26 generators — GANs (BigGAN, StyleGAN, StarGAN,
|
| 58 |
+
DF-GAN, GALIP, GigaGAN), non-SD diffusion (ADM, DDPM, DDIM, Imagen, VQDM,
|
| 59 |
+
DALL-E 2/3, Midjourney v4/v5), SD-family (SDXL, OriginalSD, ControlNet,
|
| 60 |
+
LoRA, LyCORIS, 2x personalized), other (MAGE, VQGAN, VQVAE, MAE).
|
| 61 |
+
- **Real (10,500):** 1,750 × 6 sources — LAION-5B, ImageNet, LSUN-Church,
|
| 62 |
+
FFHQ, AFHQ, CelebA-HQ.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
## Files
|
| 65 |
|
| 66 |
+
`data/train-*.parquet` — one row per image. `manifest.csv`/`.json` and
|
| 67 |
+
`transform_plan.csv`/`.json` — the same metadata as plain CSV/JSON.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
+
**Columns:** `image_bytes` (raw file bytes, undecoded — decode with
|
| 70 |
+
`Image.open(io.BytesIO(row["image_bytes"]))`), `split`, `group`, `category`,
|
| 71 |
+
`source_zip`/`source_path`, `width`/`height`, `condition` (one of 14
|
| 72 |
+
transform-battery conditions, assigned round-robin per group, stratified by
|
| 73 |
+
resolution), `family`, `order` (always `transform_first`: condition applied,
|
| 74 |
+
then a final standardizing JPEG q=96 pass).
|
| 75 |
|
| 76 |
+
Full build methodology (HTTP range-request sampling, transform-assignment
|
| 77 |
+
algorithm, source code): see the GitHub repo linked above.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|