rnair21 commited on
Commit
d520cce
·
verified ·
1 Parent(s): ee36257

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +342 -0
README.md CHANGED
@@ -1,3 +1,345 @@
1
  ---
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ task_categories:
4
+ - image-to-image
5
+ - text-to-image
6
+ language:
7
+ - en
8
+ tags:
9
+ - facial-editing
10
+ - benchmark
11
+ - identity-preservation
12
+ - bias
13
+ - multimodal
14
+ pretty_name: Face-Edit-Bench
15
  ---
16
+
17
+ # Face-Edit-Bench
18
+
19
+ **Face-Edit-Bench** is a large-scale benchmark for evaluating text-guided facial image editing models. It is introduced in:
20
+
21
+ > **A Large-scale Evaluation of Text-guided Models for Facial Editing**
22
+ > ACMM 2026
23
+ > GitHub: [https://github.com/rahul1801/Face-Edit-Bench](https://github.com/rahul1801/Face-Edit-Bench)
24
+
25
+ The benchmark evaluates models on three axes — **identity preservation**, **edit fidelity**, and **unintended attribute changes** — with fine-grained breakdowns by demographic subgroup.
26
+
27
+ ---
28
+
29
+ ## Models Evaluated
30
+
31
+ | Model | Source |
32
+ |-------|--------|
33
+ | Gemini Image 2.5 Flash | Google DeepMind |
34
+ | BAGEL-Edit | via Replicate |
35
+ | FLUX.1-dev | via Replicate |
36
+ | FLUX Kontext Pro | via Replicate |
37
+ | Qwen-Edit | via Replicate |
38
+ | SeedEdit v3 | via Replicate |
39
+
40
+ ---
41
+
42
+ ## Edit Axes
43
+
44
+ Each model is evaluated across four edit categories:
45
+
46
+ | Axis | Description |
47
+ |------|-------------|
48
+ | `accessories` | Adding or changing glasses, hats |
49
+ | `hair` | Hair color, type, style, beard, mustache |
50
+ | `poses` | Head position / gaze direction |
51
+ | `multi_axis` | Combined edits spanning multiple axes |
52
+
53
+ ---
54
+
55
+ ## Dataset Files
56
+
57
+ | File | Size | Description |
58
+ |------|------|-------------|
59
+ | `face_edit_results_metadata.tar.gz` | — | All evaluation metadata (scores, state dicts) per session. **Sufficient to reproduce all paper results.** |
60
+ | `face_edit_attributes.json` | — | Edit candidate database. Required for OER (unintended change) analysis. |
61
+ | `list_attr_celeba.txt` | — | Standard CelebA attribute annotations. Required for demographic analysis. |
62
+ | `celebset_unique_images.csv` | — | CelebSet identity annotations (ethnicity, gender, age). Required for demographic analysis. |
63
+ | `face_edit_image_data/*.tar.gz` | ~958 GB total | One tar per model×dataset×axis. Contains all edited images. **Not needed to reproduce paper results**, but critical for advancing image editing research. |
64
+
65
+ ---
66
+
67
+ ## Reproducing Paper Results
68
+
69
+ Download and extract the metadata archive — this is the only file required to reproduce all FSS, SC, Drop_FSS, and OER results from the paper:
70
+
71
+ ```bash
72
+ pip install huggingface_hub
73
+
74
+ huggingface-cli download rnair21/Face-Edit-Bench \
75
+ face_edit_results_metadata.tar.gz \
76
+ face_edit_attributes.json \
77
+ list_attr_celeba.txt \
78
+ celebset_unique_images.csv \
79
+ --repo-type dataset \
80
+ --local-dir ./face_edit_bench_data
81
+ ```
82
+
83
+ Extract the archive:
84
+
85
+ ```bash
86
+ tar -xzf face_edit_bench_data/face_edit_results_metadata.tar.gz -C face_edit_bench_data/
87
+ ```
88
+
89
+ After extraction, your directory should look like:
90
+
91
+ ```
92
+ face_edit_bench_data/
93
+ ├── face_edit_bench_results/ ← extracted metadata
94
+ ├── face_edit_attributes.json
95
+ ├── list_attr_celeba.txt
96
+ └── celebset_unique_images.csv
97
+ ```
98
+
99
+ Then follow the instructions in the [GitHub repo](https://github.com/rahul1801/Face-Edit-Bench) to run the analysis scripts.
100
+
101
+ ---
102
+
103
+ ## Metadata Structure
104
+
105
+ Extracting `face_edit_results_metadata.tar.gz` produces the directory `face_edit_bench_results/` with **44 subfolders**, one per model × dataset × edit axis combination:
106
+
107
+ ```
108
+ face_edit_bench_results/
109
+ ├── celeba_full_gemini-image_2.5-flash_test_set_accessories/
110
+ ├── celeba_full_gemini-image_2.5-flash_test_set_hair/
111
+ ├── celeba_full_gemini-image_2.5-flash_test_set_multi_axis/
112
+ ├── celeba_full_gemini-image_2.5-flash_test_set_poses/
113
+ ├── celeba_full_replicate_bagel-edit_test_set_accessories/
114
+ │ ...
115
+ ├── celebset_full_replicate_seededit-v3_test_set_accessories/
116
+ │ ...
117
+ ```
118
+
119
+ **Folder naming convention:** `{dataset}_{model}_test_set_{edit_axis}`
120
+ - `dataset`: `celeba_full` or `celebset_full`
121
+ - `model`: e.g., `gemini-image_2.5-flash`, `replicate_flux-kontext-pro`
122
+ - `edit_axis`: `accessories`, `hair`, `multi_axis`, `poses`
123
+
124
+ Each experiment folder contains thousands of **session subfolders**, one per identity × sequence:
125
+
126
+ ```
127
+ celeba_full_gemini-image_2.5-flash_test_set_accessories/
128
+ ├── 000245_Accessories_seq0/
129
+ │ └── session_results.json
130
+ ├── 000245_Accessories_seq1/
131
+ │ └── session_results.json
132
+ ├── 000245_Accessories_seq2/
133
+ │ └── session_results.json
134
+ │ ...
135
+ ```
136
+
137
+ **Session folder naming:** `{image_id}_{Axis}_seq{N}`
138
+ - `image_id`: CelebA/CelebSet image identifier
139
+ - `Axis`: primary edit axis for this session
140
+ - `N`: sequence index (multiple sequences may exist per identity)
141
+
142
+ ---
143
+
144
+ ## Understanding `session_results.json`
145
+
146
+ Each session folder contains a single `session_results.json` that captures everything about one sequential editing session: the prompts used, the per-step metric scores, and a full attribute state snapshot at each step.
147
+
148
+ ### Top-level structure
149
+
150
+ ```json
151
+ {
152
+ "sequence_info": { ... }, // what was edited and how
153
+ "step_by_step_metrics": [ ... ], // scores at each step (base + 4 edits)
154
+ "summary_statistics": { ... }, // aggregate scores for the session
155
+ "state_tracking": { ... } // attribute state evolution across steps
156
+ }
157
+ ```
158
+
159
+ ---
160
+
161
+ ### `sequence_info` — the edit plan
162
+
163
+ ```json
164
+ "sequence_info": {
165
+ "sequence_id": "single_axis_Accessories",
166
+ "identity_id": "4686",
167
+ "edit_method": "single_axis",
168
+ "primary_axis": "Accessories",
169
+ "sub_axes_used": ["glasses", "hats"],
170
+ "prompts": [
171
+ "Add square glasses",
172
+ "Add a wool hat",
173
+ "Replace their wool hat with a knit hat.",
174
+ "Change to rectangular sunglasses"
175
+ ],
176
+ "total_steps": 5, // 1 base image + 4 sequential edits
177
+ "edit_steps": 4,
178
+ "instructions_metadata": [
179
+ {
180
+ "instruction": "Add square glasses",
181
+ "axis": "accessories",
182
+ "sub_axis": "glasses",
183
+ "base_candidate": "rectangle-shaped glasses",
184
+ "synonym_used": "square glasses",
185
+ "edit_index": 0
186
+ },
187
+ ...
188
+ ]
189
+ }
190
+ ```
191
+
192
+ - `prompts` — the exact text instructions sent to the model, in order
193
+ - `instructions_metadata` — the ground-truth target attribute for each step, along with the synonym used in the prompt (e.g., "square glasses" is a synonym for the canonical "rectangle-shaped glasses")
194
+
195
+ ---
196
+
197
+ ### `step_by_step_metrics` — scores at each step
198
+
199
+ One entry for `step=0` (the base image) and one for each of the 4 edits (`step=1` through `step=4`).
200
+
201
+ ```json
202
+ {
203
+ "step": 1,
204
+ "image_path": "face_edit_bench_results/.../output_0.png",
205
+ "is_base_image": false,
206
+ "prompt": "Add square glasses",
207
+ "metrics": {
208
+ "identity_preservation": {
209
+ "face_id_score": 0.546, // ArcFace cosine similarity to the original face
210
+ "dino_i_score": 0.0 // DINOv2 image-level similarity (null for base)
211
+ },
212
+ "edit_alignment": {
213
+ "clip_score": 0.263, // CLIP text-image alignment
214
+ "semantic_consistency_score": 1.0 // whether the target attribute is present (0 or 1)
215
+ },
216
+ "naturalness": {
217
+ "pq_score": 1.0 // perceptual quality score
218
+ }
219
+ },
220
+ "state_dict": {
221
+ // full VLM probability distribution over all attribute candidates at this step
222
+ "all_candidate_scores": {
223
+ "rectangle-shaped glasses": { "score": 0.95, "category": "accessories", "subcategory": "glasses" },
224
+ "stubble": { "score": 0.90, "category": "hair", "subcategory": "beard" },
225
+ ...
226
+ },
227
+ "base_categories_per_subaxis": {
228
+ "hair/color": "black hair",
229
+ "accessories/glasses": "rectangle-shaped glasses",
230
+ "accessories/hats": null,
231
+ ...
232
+ }
233
+ }
234
+ }
235
+ ```
236
+
237
+ The `state_dict` captures the full attribute fingerprint of the image at each step. This is the basis for detecting unintended changes — if an attribute that wasn't targeted (e.g., hair color) shifts between steps, that counts as an off-diagonal edit (OER).
238
+
239
+ ---
240
+
241
+ ### `summary_statistics` — session-level rollup
242
+
243
+ ```json
244
+ "summary_statistics": {
245
+ "base_score": 0.956, // face_id_score of the original image
246
+ "final_score": 0.409, // face_id_score after all 4 edits
247
+ "total_degradation": 0.547, // base_score − final_score
248
+ "avg_edit_score": 0.436, // mean face_id_score across edit steps 1–4
249
+ "progressive_failure_step": 1 // first step where identity degradation is detected
250
+ }
251
+ ```
252
+
253
+ ---
254
+
255
+ ### `state_tracking` — attribute state at each step (compact view)
256
+
257
+ A cleaner summary of `step_by_step_metrics`, showing only the top-scoring candidate per sub-axis at each step. Used by the analysis scripts to trace how attributes evolve across the edit sequence.
258
+
259
+ ```json
260
+ "state_tracking": {
261
+ "step_analysis": [
262
+ {
263
+ "step": 0,
264
+ "step_name": "Base Image",
265
+ "top_scores": {
266
+ "accessories/glasses": { "candidate": "round glasses", "score": 0.005 },
267
+ "accessories/hats": { "candidate": "None", "score": 0.97 },
268
+ "hair/color": { "candidate": "black hair", "score": 0.86 },
269
+ ...
270
+ }
271
+ },
272
+ {
273
+ "step": 1,
274
+ "step_name": "After Edit 1",
275
+ "prompt": "Add square glasses",
276
+ "top_scores": {
277
+ "accessories/glasses": { "candidate": "rectangle-shaped glasses", "score": 0.95 },
278
+ ...
279
+ }
280
+ },
281
+ ...
282
+ ]
283
+ }
284
+ ```
285
+
286
+ ---
287
+
288
+ ## Image Data (`face_edit_image_data`)
289
+
290
+ The `face_edit_image_data/` portion of the dataset contains the actual images for every editing session. It is split into one `.tar.gz` per model × dataset × axis, mirroring the metadata structure.
291
+
292
+ Each tar extracts to a single folder with the same naming convention as the metadata:
293
+
294
+ ```
295
+ celeba_full_gemini-image_2.5-flash_test_set_accessories/
296
+ ├── 000245_Accessories_seq0/
297
+ │ ├── input_image.png ← base image from CelebA/CelebSet
298
+ │ ├── output_0.png ← after edit 1: "Add square glasses"
299
+ │ ├── output_1.png ← after edit 2: "Add a wool hat"
300
+ │ ├── output_2.png ← after edit 3: "Replace their wool hat with a knit hat."
301
+ │ ├── output_3.png ← after edit 4: "Change to rectangular sunglasses"
302
+ │ └── session_results.json
303
+ │ ...
304
+ ```
305
+
306
+ - `input_image.png` — the unedited base image drawn from CelebA or CelebSet
307
+ - `output_N.png` — the model's output after the (N+1)-th sequential edit prompt (prompts are in `sequence_info.prompts`)
308
+ - `session_results.json` — same file as in the metadata archive, included here for convenience
309
+
310
+ > **Note:** Downloading the image data is not required to reproduce the paper's quantitative results. All scores are pre-computed and stored in `session_results.json` files within `face_edit_results_metadata.tar.gz`.
311
+
312
+ ---
313
+
314
+ ## Annotation Files
315
+
316
+ ### `list_attr_celeba.txt`
317
+ Standard CelebA attribute file. Required by both `fss_and_sc_analysis.py` and `oer_analysis.py` when running demographic bias analysis over the CelebA subset.
318
+
319
+ ### `celebset_unique_images.csv`
320
+ CelebSet identity-level annotations including gender and ethnicity labels. Required by both analysis scripts when running demographic bias analysis over the CelebSet subset.
321
+
322
+ ### `face_edit_attributes.json`
323
+ The edit candidate database that defines all attribute candidates, categories, and sub-axes used in the benchmark. Required by `oer_analysis.py` for all runs (not just demographic analysis).
324
+
325
+ ---
326
+
327
+ ## License
328
+
329
+ This dataset is released under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).
330
+
331
+ The underlying images derive from **CelebA** and **CelebSet**, which carry their own respective licenses. Please ensure compliance with those licenses when using the image data.
332
+
333
+ ---
334
+
335
+ ## Citation
336
+
337
+ If you use Face-Edit-Bench in your research, please cite our paper:
338
+
339
+ ```bibtex
340
+ @inproceedings{nair2026faceeditbench,
341
+ title = {A Large-scale Evaluation of Text-guided Models for Facial Editing},
342
+ booktitle = {Proceedings of the 34th ACM International Conference on Multimedia},
343
+ year = {2026}
344
+ }
345
+ ```