File size: 11,973 Bytes
b5594cd
 
d520cce
 
 
 
 
 
 
 
 
 
 
 
b5594cd
d520cce
 
 
 
 
 
94d4cc9
d520cce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94d4cc9
d520cce
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
---
license: cc-by-4.0
task_categories:
  - image-to-image
  - text-to-image
language:
  - en
tags:
  - facial-editing
  - benchmark
  - identity-preservation
  - bias
  - multimodal
pretty_name: Face-Edit-Bench
---

# Face-Edit-Bench

**Face-Edit-Bench** is a large-scale benchmark for evaluating text-guided facial image editing models. It is introduced in:

> **A Large-scale Evaluation of Text-guided Models for Facial Editing**
> ACMMM 2026
> GitHub: [https://github.com/rahul1801/Face-Edit-Bench](https://github.com/rahul1801/Face-Edit-Bench)

The benchmark evaluates models on three axes — **identity preservation**, **edit fidelity**, and **unintended attribute changes** — with fine-grained breakdowns by demographic subgroup.

---

## Models Evaluated

| Model | Source |
|-------|--------|
| Gemini Image 2.5 Flash | Google DeepMind |
| BAGEL-Edit | via Replicate |
| FLUX.1-dev | via Replicate |
| FLUX Kontext Pro | via Replicate |
| Qwen-Edit | via Replicate |
| SeedEdit v3 | via Replicate |

---

## Edit Axes

Each model is evaluated across four edit categories:

| Axis | Description |
|------|-------------|
| `accessories` | Adding or changing glasses, hats |
| `hair` | Hair color, type, style, beard, mustache |
| `poses` | Head position / gaze direction |
| `multi_axis` | Combined edits spanning multiple axes |

---

## Dataset Files

| File | Size | Description |
|------|------|-------------|
| `face_edit_results_metadata.tar.gz` | — | All evaluation metadata (scores, state dicts) per session. **Sufficient to reproduce all paper results.** |
| `face_edit_attributes.json` | — | Edit candidate database. Required for OER (unintended change) analysis. |
| `list_attr_celeba.txt` | — | Standard CelebA attribute annotations. Required for demographic analysis. |
| `celebset_unique_images.csv` | — | CelebSet identity annotations (ethnicity, gender, age). Required for demographic analysis. |
| `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. |

---

## Reproducing Paper Results

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:

```bash
pip install huggingface_hub

huggingface-cli download rnair21/Face-Edit-Bench \
    face_edit_results_metadata.tar.gz \
    face_edit_attributes.json \
    list_attr_celeba.txt \
    celebset_unique_images.csv \
    --repo-type dataset \
    --local-dir ./face_edit_bench_data
```

Extract the archive:

```bash
tar -xzf face_edit_bench_data/face_edit_results_metadata.tar.gz -C face_edit_bench_data/
```

After extraction, your directory should look like:

```
face_edit_bench_data/
├── face_edit_bench_results/       ← extracted metadata
├── face_edit_attributes.json
├── list_attr_celeba.txt
└── celebset_unique_images.csv
```

Then follow the instructions in the [GitHub repo](https://github.com/rahul1801/Face-Edit-Bench) to run the analysis scripts.

---

## Metadata Structure

Extracting `face_edit_results_metadata.tar.gz` produces the directory `face_edit_bench_results/` with **44 subfolders**, one per model × dataset × edit axis combination:

```
face_edit_bench_results/
├── celeba_full_gemini-image_2.5-flash_test_set_accessories/
├── celeba_full_gemini-image_2.5-flash_test_set_hair/
├── celeba_full_gemini-image_2.5-flash_test_set_multi_axis/
├── celeba_full_gemini-image_2.5-flash_test_set_poses/
├── celeba_full_replicate_bagel-edit_test_set_accessories/
│   ...
├── celebset_full_replicate_seededit-v3_test_set_accessories/
│   ...
```

**Folder naming convention:** `{dataset}_{model}_test_set_{edit_axis}`
- `dataset`: `celeba_full` or `celebset_full`
- `model`: e.g., `gemini-image_2.5-flash`, `replicate_flux-kontext-pro`
- `edit_axis`: `accessories`, `hair`, `multi_axis`, `poses`

Each experiment folder contains thousands of **session subfolders**, one per identity × sequence:

```
celeba_full_gemini-image_2.5-flash_test_set_accessories/
├── 000245_Accessories_seq0/
│   └── session_results.json
├── 000245_Accessories_seq1/
│   └── session_results.json
├── 000245_Accessories_seq2/
│   └── session_results.json
│   ...
```

**Session folder naming:** `{image_id}_{Axis}_seq{N}`
- `image_id`: CelebA/CelebSet image identifier
- `Axis`: primary edit axis for this session
- `N`: sequence index (multiple sequences may exist per identity)

---

## Understanding `session_results.json`

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.

### Top-level structure

```json
{
  "sequence_info":       { ... },   // what was edited and how
  "step_by_step_metrics": [ ... ],  // scores at each step (base + 4 edits)
  "summary_statistics":  { ... },   // aggregate scores for the session
  "state_tracking":      { ... }    // attribute state evolution across steps
}
```

---

### `sequence_info` — the edit plan

```json
"sequence_info": {
  "sequence_id":    "single_axis_Accessories",
  "identity_id":    "4686",
  "edit_method":    "single_axis",
  "primary_axis":   "Accessories",
  "sub_axes_used":  ["glasses", "hats"],
  "prompts": [
    "Add square glasses",
    "Add a wool hat",
    "Replace their wool hat with a knit hat.",
    "Change to rectangular sunglasses"
  ],
  "total_steps": 5,    // 1 base image + 4 sequential edits
  "edit_steps":  4,
  "instructions_metadata": [
    {
      "instruction":    "Add square glasses",
      "axis":           "accessories",
      "sub_axis":       "glasses",
      "base_candidate": "rectangle-shaped glasses",
      "synonym_used":   "square glasses",
      "edit_index":     0
    },
    ...
  ]
}
```

- `prompts` — the exact text instructions sent to the model, in order
- `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")

---

### `step_by_step_metrics` — scores at each step

One entry for `step=0` (the base image) and one for each of the 4 edits (`step=1` through `step=4`).

```json
{
  "step": 1,
  "image_path": "face_edit_bench_results/.../output_0.png",
  "is_base_image": false,
  "prompt": "Add square glasses",
  "metrics": {
    "identity_preservation": {
      "face_id_score": 0.546,   // ArcFace cosine similarity to the original face
      "dino_i_score":  0.0      // DINOv2 image-level similarity (null for base)
    },
    "edit_alignment": {
      "clip_score":                 0.263,  // CLIP text-image alignment
      "semantic_consistency_score": 1.0    // whether the target attribute is present (0 or 1)
    },
    "naturalness": {
      "pq_score": 1.0   // perceptual quality score
    }
  },
  "state_dict": {
    // full VLM probability distribution over all attribute candidates at this step
    "all_candidate_scores": {
      "rectangle-shaped glasses": { "score": 0.95, "category": "accessories", "subcategory": "glasses" },
      "stubble":                  { "score": 0.90, "category": "hair",        "subcategory": "beard"   },
      ...
    },
    "base_categories_per_subaxis": {
      "hair/color":          "black hair",
      "accessories/glasses": "rectangle-shaped glasses",
      "accessories/hats":    null,
      ...
    }
  }
}
```

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).

---

### `summary_statistics` — session-level rollup

```json
"summary_statistics": {
  "base_score":            0.956,   // face_id_score of the original image
  "final_score":           0.409,   // face_id_score after all 4 edits
  "total_degradation":     0.547,   // base_score − final_score
  "avg_edit_score":        0.436,   // mean face_id_score across edit steps 1–4
  "progressive_failure_step": 1     // first step where identity degradation is detected
}
```

---

### `state_tracking` — attribute state at each step (compact view)

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.

```json
"state_tracking": {
  "step_analysis": [
    {
      "step": 0,
      "step_name": "Base Image",
      "top_scores": {
        "accessories/glasses":  { "candidate": "round glasses", "score": 0.005 },
        "accessories/hats":     { "candidate": "None",          "score": 0.97  },
        "hair/color":           { "candidate": "black hair",    "score": 0.86  },
        ...
      }
    },
    {
      "step": 1,
      "step_name": "After Edit 1",
      "prompt": "Add square glasses",
      "top_scores": {
        "accessories/glasses":  { "candidate": "rectangle-shaped glasses", "score": 0.95 },
        ...
      }
    },
    ...
  ]
}
```

---

## Image Data (`face_edit_image_data`)

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.

Each tar extracts to a single folder with the same naming convention as the metadata:

```
celeba_full_gemini-image_2.5-flash_test_set_accessories/
├── 000245_Accessories_seq0/
│   ├── input_image.png    ← base image from CelebA/CelebSet
│   ├── output_0.png       ← after edit 1: "Add square glasses"
│   ├── output_1.png       ← after edit 2: "Add a wool hat"
│   ├── output_2.png       ← after edit 3: "Replace their wool hat with a knit hat."
│   ├── output_3.png       ← after edit 4: "Change to rectangular sunglasses"
│   └── session_results.json
│   ...
```

- `input_image.png` — the unedited base image drawn from CelebA or CelebSet
- `output_N.png` — the model's output after the (N+1)-th sequential edit prompt (prompts are in `sequence_info.prompts`)
- `session_results.json` — same file as in the metadata archive, included here for convenience

> **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`.

---

## Annotation Files

### `list_attr_celeba.txt`
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.

### `celebset_unique_images.csv`
CelebSet identity-level annotations including gender and ethnicity labels. Required by both analysis scripts when running demographic bias analysis over the CelebSet subset.

### `face_edit_attributes.json`
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).

---

## License

This dataset is released under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).

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.

---

## Citation

If you use Face-Edit-Bench in your research, please cite our paper:

```bibtex
@inproceedings{nair2026faceeditbench,
  title     = {A Large-scale Evaluation of Text-guided Models for Facial Editing},
  booktitle = {Proceedings of the 34th ACM International Conference on Multimedia (ACM MM)},
  year      = {2026}
}
```