buxtcodes commited on
Commit
3b2b469
·
verified ·
1 Parent(s): 18725e5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +53 -43
README.md CHANGED
@@ -8,8 +8,8 @@ tags:
8
  - wildfake
9
  dataset_info:
10
  features:
11
- - name: image
12
- dtype: image
13
  - name: split
14
  dtype: string
15
  - name: group
@@ -32,10 +32,7 @@ dataset_info:
32
  dtype: string
33
  splits:
34
  - name: train
35
- num_bytes: 10562437
36
- num_examples: 200
37
- download_size: 10544758
38
- dataset_size: 10562437
39
  configs:
40
  - config_name: default
41
  data_files:
@@ -91,42 +88,55 @@ Total: **30,000 images** (19,500 fake / 10,500 real).
91
  ## Files
92
 
93
  ```
94
- real/<source>/*.png 10,500 real images, 6 sources
95
- fake/<generator>/*.png 19,500 fake images, 26 generators
96
- manifest.csv / .json one row per image: which archive/path it came
97
- from inside WildFake, category, split, resolution
98
- transform_plan.csv / .json a fixed, deterministic per-image assignment of
99
- one of 14 corruption conditions (JPEG/blur/resize/
100
- noise/color-jitter/center-crop at various
101
- severities) — see below
102
  ```
103
 
104
- Every image is a PNG regardless of its original format inside WildFake (many
105
- of the fakes are natively PNG; reals are often JPEG) — deliberately not
106
- JPEG-recompressed at sampling time, so any JPEG compression applied during
107
- evaluation is the only lossy step, applied once, consistently.
108
-
109
- ### `manifest.csv` columns
110
- `split` (real/fake), `group` (generator or real-source name), `category`
111
- (GAN_based/Diffusion_based/Other_based/Real), `source_zip` (which WildFake
112
- archive), `source_path` (path inside that archive), `local_path` (path in
113
- this dataset), `width`, `height`.
114
-
115
- ### `transform_plan.csv` columns
116
- `local_path`, `group`, `split`, `category`, `width`, `height`, `area`
117
- (width×height), `condition` (e.g. "JPEG q=30", "Blur sigma=1.0"), `family`
118
- (JPEG/Blur/Resize/Noise/ColorJitter/CenterCrop), `order` (always
119
- `transform_first` the condition is applied to the image, then a final
120
- standard q=96 JPEG pass is applied last, standardizing the final encoding
121
- every image ends up in regardless of which condition it drew).
122
-
123
- **How the assignment was made** (no randomness, fully reproducible from
124
- `manifest.csv` alone): within each group independently, images are sorted
125
- by pixel area ascending, then cycled round-robin through the 14 conditions.
126
- Sorting before cycling stratifies the assignment across resolution (any 14
127
- consecutive area-sorted images cover every condition once, so no condition
128
- is systematically biased toward small or large images); cycling makes it
129
- uniform (every condition gets within 1 image of an even split per group).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
  ## How this was built
132
 
@@ -136,6 +146,6 @@ reading only each archive's central directory (a listing) plus the exact
136
  compressed bytes of the specific images sampled, never downloading an
137
  archive in full. First-N selection per generator/source in each archive's
138
  own listing order (no random sampling). See
139
- `data_prep/build_wildfake_eval.py` and
140
- `data_prep/build_wildfake_transform_plan.py` in the GitHub repo above for
141
- the exact code.
 
8
  - wildfake
9
  dataset_info:
10
  features:
11
+ - name: image_bytes
12
+ dtype: binary
13
  - name: split
14
  dtype: string
15
  - name: group
 
32
  dtype: string
33
  splits:
34
  - name: train
35
+ num_examples: 30000
 
 
 
36
  configs:
37
  - config_name: default
38
  data_files:
 
88
  ## Files
89
 
90
  ```
91
+ data/train-*.parquet the dataset itself — 8 shards, one row per
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
  ## How this was built
142
 
 
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.