LocateEdit-Bench / README.md
MoeNew's picture
Update BibTeX author format
602e040 verified
|
Raw History Blame Contribute Delete
10.1 kB
---
pretty_name: LocateEdit-Bench
license: cc-by-nc-4.0
language:
- en
task_categories:
- image-segmentation
- image-to-image
tags:
- image-editing
- instruction-based-editing
- forgery-localization
- manipulation-localization
- benchmark
configs:
- config_name: all
data_files:
- split: train
path: train/*/*.parquet
- split: validation
path: val/*/*.parquet
- config_name: BAGEL
data_files:
- split: train
path: train/BAGEL/*.parquet
- split: validation
path: val/BAGEL/*.parquet
- config_name: Flux-Kontext
data_files:
- split: train
path: train/Flux-Kontext/*.parquet
- split: validation
path: val/Flux-Kontext/*.parquet
- config_name: Qwen-Image-Edit
data_files:
- split: train
path: train/Qwen-Image-Edit/*.parquet
- split: validation
path: val/Qwen-Image-Edit/*.parquet
- config_name: Step1X-Edit
data_files:
- split: train
path: train/Step1X-Edit/*.parquet
- split: validation
path: val/Step1X-Edit/*.parquet
dataset_info:
- config_name: all
features: &features
- name: img_name
dtype: string
- name: model
dtype: string
- name: split
dtype: string
- name: row_index
dtype: int32
- name: edit_type
dtype: string
- name: edit_subtype
dtype: string
- name: edit_prompt
dtype: string
- name: sam_prompt
dtype: string
- name: boxes
sequence:
sequence: float64
- name: scores
sequence: float64
- name: image
dtype: image
- name: edited_image
dtype: image
- name: mask
dtype: image
- config_name: BAGEL
features: *features
- config_name: Flux-Kontext
features: *features
- config_name: Qwen-Image-Edit
features: *features
- config_name: Step1X-Edit
features: *features
---
# LocateEdit-Bench
**A Benchmark for Instruction-Based Editing Localization**
LocateEdit-Bench is a large-scale benchmark for localizing the regions modified by
*instruction-based* image editors. Unlike inpainting-based manipulations, where the
edited area is given by an explicit mask, instruction-based editors (e.g., MMDiT-based
models) produce semantically coherent and visually seamless edits without any
predefined region. LocateEdit-Bench provides **231K edited images from four
state-of-the-art editors**, each paired with its original image, the editing
instruction, and a pixel-level ground-truth mask.
> Paper: [arXiv:2602.05577](https://arxiv.org/abs/2602.05577)
## Highlights
- **231,092 edited images** from four instruction-based editors: Qwen-Image-Edit,
Flux-Kontext, Step1X-Edit, and BAGEL.
- **Three object-level edit types**: object addition, object swap, and attribute
modification — edits with a well-defined, object-localized region.
- **High-quality masks**: target object identified by ChatGPT, segmented by SAM3,
filtered at confidence > 0.5.
- **5,504 distinct object types**; source images drawn from LAION-5B and
OpenImages V6 (via [OmniEdit](https://huggingface.co/datasets/codefuse-ai/OmniEdit)).
- **Dedicated train/validation splits per editor**: the validation split is the
paper's 24K test set (6,000 images per editor, stratified by edit type).
## Dataset structure
```
LocateEdit-Bench/
├── manifest.json # per-shard split, row-index range, relative path
├── splits.json # {model: {train: [files], val: [files]}}
├── stats.json # rows / edit-type counts / sizes per model
├── summary.json # global totals
├── train/
│ ├── BAGEL/BAGEL_train_00001.parquet ...
│ ├── Flux-Kontext/Flux-Kontext_train_00001.parquet ...
│ ├── Qwen-Image-Edit/Qwen-Image-Edit_train_00001.parquet ...
│ └── Step1X-Edit/Step1X-Edit_train_00001.parquet ...
└── val/
├── BAGEL/BAGEL_val_00001.parquet ...
└── ...
```
Each parquet file targets ~1 GiB (roughly 370–560 samples). Filenames are
`<editor>_<split>_<5-digit index>.parquet`; numbering restarts at `00001` for each
split and each editor. Shards never mix splits, so a file can be assigned to a split
by its path alone. `splits.json` lists every file explicitly.
## Schema
One row per edited image. All images are stored as **raw PNG bytes** (lossless,
no re-encoding) with width 1024. The dataset card declares the three image columns
as `Image`, so the Hub viewer and `datasets` decode them automatically.
| Column | Type | Description |
|---|---|---|
| `img_name` | string | Unique sample name / original filename, e.g. `addition_100005_4_0.png` |
| `model` | string | Editing model: `BAGEL`, `Flux-Kontext`, `Qwen-Image-Edit`, `Step1X-Edit` |
| `split` | string | `train` or `val` |
| `row_index` | int32 | 0-based position within the split's original sample list |
| `edit_type` | string | `addition`, `swap`, or `attribute_modification` |
| `edit_subtype` | string | `facial` for facial attribute edits (BAGEL only), otherwise null |
| `edit_prompt` | string | Natural-language editing instruction |
| `sam_prompt` | string | Short phrase describing the edited target, used for segmentation |
| `boxes` | list<list<float64>> | Bounding boxes `[x1, y1, x2, y2]` of the edited target(s) |
| `scores` | list<float64> | Segmentation confidence per box |
| `image` | binary | Original image, PNG bytes |
| `edited_image` | binary | Edited image, PNG bytes |
| `mask` | binary | Pixel-level mask of the edited region, PNG bytes |
Notes:
- `boxes` / `scores` are the raw segmentation outputs; boxes may extend slightly
beyond the image boundary.
- Masks are 8-bit PNGs with the same spatial size as their images.
## Splits
| Editor | Train | Validation | Total |
|---|---:|---:|---:|
| BAGEL | 47,320 | 6,000 | 53,320 |
| Flux-Kontext | 52,707 | 6,000 | 58,707 |
| Qwen-Image-Edit | 55,681 | 6,000 | 61,681 |
| Step1X-Edit | 51,384 | 6,000 | 57,384 |
| **All** | **207,092** | **24,000** | **231,092** |
Edit-type distribution (all splits):
| Editor | Addition | Swap | Attribute Mod. |
|---|---:|---:|---:|
| BAGEL | 25,530 | 16,983 | 10,807 |
| Flux-Kontext | 26,138 | 18,365 | 14,204 |
| Qwen-Image-Edit | 27,381 | 18,798 | 15,502 |
| Step1X-Edit | 26,070 | 17,370 | 13,944 |
| **All** | **105,119** | **71,516** | **54,457** |
The validation split follows the paper's protocol: 6,000 images are sampled from each
editor's outputs, stratified to preserve that editor's edit-type composition.
## Construction
1. **Source data.** Real images and editing instructions are selected from OmniEdit
(itself built from LAION-5B and OpenImages V6). Instructions were produced with
GPT-4o. Roughly 400K image–instruction pairs were retained after filtering.
2. **Edit-type selection.** Only object addition, object swap, and attribute
modification are kept. Style transfer, background swap, environment change and
holistic edits are excluded because they lack a unique object-localized region.
3. **Editing.** Each edit-type subset is evenly divided among the four editors.
All images are resized to width ~1024 before editing; generation follows each
model's recommended inference settings.
4. **Quality filtering.** Edited images are scored for editing accuracy and
background consistency; low-confidence samples are discarded.
5. **Mask generation.** ChatGPT identifies the edited target; SAM3 produces a
promptable segmentation for it. Samples with segmentation confidence <= 0.5 are
dropped, yielding the final pixel-level masks.
## Usage
### Option A — `datasets` (recommended)
```python
from datasets import load_dataset, Image
# One editor (config name = editor name); image columns are decoded automatically
ds = load_dataset("MoeNew/LocateEdit-Bench", "BAGEL")
train, val = ds["train"], ds["validation"]
# All four editors merged (distinguish by the `model` column)
ds_all = load_dataset("MoeNew/LocateEdit-Bench", "all")
# If you want raw PNG bytes instead of decoded PIL images:
raw = ds["train"].cast_column("image", Image(decode=False))
```
### Option B — explicit files (no config), e.g. for local copies
```python
from datasets import load_dataset
ds = load_dataset("parquet", data_files={
"train": "train/Qwen-Image-Edit/*.parquet",
"validation": "val/Qwen-Image-Edit/*.parquet",
})
```
### Option C — pyarrow / Parquet directly
```python
import pyarrow.dataset as pads
d = pads.dataset("LocateEdit-Bench", format="parquet", partitioning=None)
tbl = d.to_table(filter=(pads.field("split") == "val"))
```
Because each shard contains exactly one split (and one editor), filtering on
`split` or `model` prunes whole row groups without reading image bytes. Note that
`split`/`model` live in the path rather than as partition columns, so the quickest
selection is by file path (`splits.json` / `manifest.json`) or by a column filter.
## Evaluation protocols
The paper defines two protocols and reports pixel-level and region-level metrics:
- **Protocol 1 — Full-set evaluation.** Train on the composite training set
(all four editors) and test on each editor's validation split.
- **Protocol 2 — Cross-editor generalization.** Train on a single editor's data and
test on every editor, measuring transfer to unseen editing models.
- **Metrics.** Accuracy, AUC and F1 treat each pixel as a binary decision; Dice and
mIoU measure region overlap. Pixel-level accuracy/AUC are dominated by the large
untouched background, so Dice/mIoU are the more informative scores.
## License and citation
LocateEdit-Bench is released under the **Creative Commons Attribution-NonCommercial
4.0 International (CC BY-NC 4.0)** license. The source images originate from LAION-5B
and OpenImages V6 via OmniEdit, and the edited images were generated with the
corresponding editing models; please also respect the terms of those upstream
sources and model licenses.
```bibtex
@article{wu2026locateeditbench,
title = {LocateEdit-Bench: A Benchmark for Instruction-Based Editing Localization},
author = {Shiyu Wu and Shuyan Li and Jing Li and Jing Liu and Yequan Wang},
journal = {arXiv preprint arXiv:2602.05577},
year = {2026}
}
```