Add task category and link dataset to paper
#6
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
license: cc-by-nc-nd-4.0
|
| 3 |
language:
|
| 4 |
- zh
|
| 5 |
- en
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
|
|
|
| 7 |
# 🚩 RedBench (REDEdit-Bench)
|
| 8 |
|
| 9 |
|
|
@@ -17,14 +20,17 @@ language:
|
|
| 17 |
<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode">
|
| 18 |
<img src="https://img.shields.io/badge/License-CC%20BY--NC--ND%204.0-lightgrey.svg" alt="License" style="vertical-align: middle;">
|
| 19 |
</a>
|
| 20 |
-
<a href="https://
|
| 21 |
<img src="https://img.shields.io/badge/Report-arXiv-b5212f.svg?logo=arxiv" alt="Technical Report" style="vertical-align: middle;">
|
| 22 |
</a>
|
| 23 |
</p>
|
|
|
|
| 24 |
## 🔥 Introduction
|
| 25 |
|
| 26 |
**RedBench** (also known as REDEdit-Bench) is a comprehensive benchmark designed to evaluate the capabilities of current image editing models.
|
| 27 |
|
|
|
|
|
|
|
| 28 |
Our main goal is to build more diverse scenarios and editing instructions that better align with human language. We collected over 3,000 images from the internet, and after careful expert-designed selection, we constructed **1,673 bilingual (Chinese–English) editing pairs** across **15 categories**.
|
| 29 |
|
| 30 |
📢 **Note on Dataset Size**: The original benchmark described in the paper consists of 1,673 image pairs. However, due to strict redistribution licensing restrictions on certain commercial assets, the public release version has been curated to **1,542 pairs**. This ensures full compliance with copyright laws while maintaining the diversity and quality of the benchmark.
|
|
@@ -114,58 +120,6 @@ accelerate launch --num_processes 8 redbench_infer.py \
|
|
| 114 |
--lang cn
|
| 115 |
```
|
| 116 |
|
| 117 |
-
## Example Input/Output
|
| 118 |
-
|
| 119 |
-
### Input
|
| 120 |
-
|
| 121 |
-
A JSONL file containing image edit instructions (`redbench.jsonl`):
|
| 122 |
-
|
| 123 |
-
```jsonl
|
| 124 |
-
{"id": "1", "source": "redbench/add/add-1.png", "a_to_b_instructions": "在图片中绿色植物上增加一只七星瓢虫", "a_to_b_instructions_eng": "Add a seven-spotted ladybug on the green plant in the picture", "task": "add"}
|
| 125 |
-
{"id": "2", "source": "redbench/add/add-2.png", "a_to_b_instructions": "在咖啡杯里加一个白色心形拉花", "a_to_b_instructions_eng": "Add a white heart-shaped latte art in the coffee cup", "task": "add"}
|
| 126 |
-
{"id": "3", "source": "redbench/adjust/adjust-144.png", "a_to_b_instructions": "将天空的颜色调成更深的蓝色", "a_to_b_instructions_eng": "Change the sky color to a deeper blue", "task": "adjust"}
|
| 127 |
-
```
|
| 128 |
-
|
| 129 |
-
A folder containing original images:
|
| 130 |
-
|
| 131 |
-
```folder
|
| 132 |
-
├── redbench
|
| 133 |
-
│ ├── add
|
| 134 |
-
│ │ ├── add-1.png
|
| 135 |
-
│ │ ├── add-2.png
|
| 136 |
-
│ │ ├── ...
|
| 137 |
-
│ ├── adjust
|
| 138 |
-
│ │ ├── adjust-144.png
|
| 139 |
-
│ │ ├── ...
|
| 140 |
-
│ ├── ...
|
| 141 |
-
```
|
| 142 |
-
|
| 143 |
-
### Output
|
| 144 |
-
|
| 145 |
-
A folder containing edited images:
|
| 146 |
-
|
| 147 |
-
```folder
|
| 148 |
-
# Without --multi-folder option:
|
| 149 |
-
├── edited_images
|
| 150 |
-
│ ├── 1.png
|
| 151 |
-
│ ├── 2.png
|
| 152 |
-
│ ├── 3.png
|
| 153 |
-
│ ...
|
| 154 |
-
│ ├── result.jsonl
|
| 155 |
-
|
| 156 |
-
# With --multi-folder option:
|
| 157 |
-
├── edited_images
|
| 158 |
-
│ ├── add
|
| 159 |
-
│ │ ├── 1.png
|
| 160 |
-
│ │ ├── 2.png
|
| 161 |
-
│ │ ├── ...
|
| 162 |
-
│ ├── adjust
|
| 163 |
-
│ │ ├── 144.png
|
| 164 |
-
│ │ ├── ...
|
| 165 |
-
│ ...
|
| 166 |
-
│ ├── result.jsonl
|
| 167 |
-
```
|
| 168 |
-
|
| 169 |
# Image Editing Evaluation using Gemini-3-Flash
|
| 170 |
|
| 171 |
This project evaluates image editing processes using the **Gemini-3-Flash API**. The system processes a set of original and edited images, comparing them according to a predefined set of criteria, such as instruction adherence, image-editing quality, and detail preservation.
|
|
@@ -179,20 +133,6 @@ The goal of this project is to evaluate the quality of image editing processes u
|
|
| 179 |
- **Image-editing Quality**: The edit should appear seamless and natural.
|
| 180 |
- **Detail Preservation**: Regions not specified for editing should remain unchanged.
|
| 181 |
|
| 182 |
-
## Evaluation Criteria by Task Category
|
| 183 |
-
|
| 184 |
-
Different task categories use different evaluation metrics:
|
| 185 |
-
|
| 186 |
-
| Task Category | Metrics |
|
| 187 |
-
|---------------|---------|
|
| 188 |
-
| add, remove, replace, compose, extract | Prompt Compliance, Visual Seamlessness, Physical & Detail Fidelity |
|
| 189 |
-
| adjust, color, lowlevel | Prompt Compliance, Visual Seamlessness, Physical & Detail Fidelity |
|
| 190 |
-
| background, viewpoint | Prompt Compliance, Visual Seamlessness, Physical & Detail Fidelity |
|
| 191 |
-
| beauty, portrait | Prompt Compliance, Visual Seamlessness, Physical & Detail Fidelity |
|
| 192 |
-
| stylize | Style Fidelity, Content Preservation, Rendering Quality |
|
| 193 |
-
| motion | Prompt Compliance, Motion Realism, Visual Seamlessness |
|
| 194 |
-
| text | Text Fidelity, Visual Consistency, Background Preservation |
|
| 195 |
-
|
| 196 |
## Dependencies
|
| 197 |
|
| 198 |
```bash
|
|
@@ -219,102 +159,6 @@ To run the evaluation script, use the following command:
|
|
| 219 |
python redbench_eval.py --result_img_folder <path_to_edited_images> --edit_json <path_to_redbench_jsonl> --prompts_json <path_to_prompts_json> --lang <language>
|
| 220 |
```
|
| 221 |
|
| 222 |
-
### Arguments:
|
| 223 |
-
- `--result_img_folder`: The directory containing the edited images (required).
|
| 224 |
-
- `--edit_json`: Path to the JSONL file containing edit instructions and metadata (required).
|
| 225 |
-
- `--prompts_json`: Path to the JSON file containing evaluation prompts for each task category (required).
|
| 226 |
-
- `--num_threads`: Number of concurrent threads. Default is 50.
|
| 227 |
-
- `--lang`: Instruction language, cn or eng (default: cn).
|
| 228 |
-
|
| 229 |
-
### Example:
|
| 230 |
-
|
| 231 |
-
```bash
|
| 232 |
-
python redbench_eval.py \
|
| 233 |
-
--result_img_folder ./edited_images \
|
| 234 |
-
--edit_json ./redbench.jsonl \
|
| 235 |
-
--prompts_json ./prompts.json \
|
| 236 |
-
--num_threads 50 \
|
| 237 |
-
--lang cn
|
| 238 |
-
```
|
| 239 |
-
|
| 240 |
-
## Example Input/Output
|
| 241 |
-
|
| 242 |
-
### Input
|
| 243 |
-
|
| 244 |
-
A JSONL file containing image edit instructions (`redbench.jsonl`):
|
| 245 |
-
|
| 246 |
-
```jsonl
|
| 247 |
-
{"id": "1", "source": "redbench/add/add-1.png", "a_to_b_instructions": "在图片中绿色植物上增加一只七星瓢虫", "a_to_b_instructions_eng": "Add a seven-spotted ladybug on the green plant in the picture", "task": "add"}
|
| 248 |
-
{"id": "2", "source": "redbench/add/add-2.png", "a_to_b_instructions": "在咖啡杯里加一个白色心形拉花", "a_to_b_instructions_eng": "Add a white heart-shaped latte art in the coffee cup", "task": "add"}
|
| 249 |
-
{"id": "3", "source": "redbench/adjust/adjust-144.png", "a_to_b_instructions": "将天空的颜色调成更深的蓝色", "a_to_b_instructions_eng": "Change the sky color to a deeper blue", "task": "adjust"}
|
| 250 |
-
```
|
| 251 |
-
|
| 252 |
-
A JSON file containing evaluation prompts for each task category (`prompts_json`):
|
| 253 |
-
|
| 254 |
-
```json
|
| 255 |
-
{
|
| 256 |
-
"add": "\nYou are a data rater specializing in grading object addition edits. You will be given two images ...",
|
| 257 |
-
"remove": "\nYou are a data rater specializing in grading object removal edits. You will be given two images ...",
|
| 258 |
-
"adjust": "\nYou are a data rater specializing in grading attribute alteration edits. You will be given two images ....",
|
| 259 |
-
"stylize": "\nYou are a data rater specializing in grading style transfer edits. You will be given an input image, a reference style...",
|
| 260 |
-
...
|
| 261 |
-
}
|
| 262 |
-
```
|
| 263 |
-
|
| 264 |
-
A folder containing edited images (with `--multi-folder` option from inference):
|
| 265 |
-
|
| 266 |
-
```folder
|
| 267 |
-
├── edited_images
|
| 268 |
-
│ ├── add
|
| 269 |
-
│ │ ├── 1.png
|
| 270 |
-
│ │ ├── 2.png
|
| 271 |
-
│ │ ├── ...
|
| 272 |
-
│ ├── adjust
|
| 273 |
-
│ │ ├── 144.png
|
| 274 |
-
│ │ ...
|
| 275 |
-
│ ...
|
| 276 |
-
```
|
| 277 |
-
|
| 278 |
-
### Output
|
| 279 |
-
|
| 280 |
-
The script automatically computes and saves results in the result folder:
|
| 281 |
-
|
| 282 |
-
1. `result.json` - Detailed evaluation for each image:
|
| 283 |
-
```json
|
| 284 |
-
{
|
| 285 |
-
"0": "Brief reasoning: A seven-spotted ladybug was successfully added on the green plant with natural color and placement.\nPrompt Compliance: 5\nVisual Seamlessness: 4\nPhysical & Detail Fidelity: 5",
|
| 286 |
-
"1": "Brief reasoning: A white heart-shaped latte art was added in the coffee cup with good blending.\nPrompt Compliance: 5\nVisual Seamlessness: 4\nPhysical & Detail Fidelity: 4",
|
| 287 |
-
"2": "Brief reasoning: The sky color was changed to a deeper blue with smooth transition.\nPrompt Compliance: 5\nVisual Seamlessness: 4\nPhysical & Detail Fidelity: 5",
|
| 288 |
-
...
|
| 289 |
-
}
|
| 290 |
-
```
|
| 291 |
-
|
| 292 |
-
2. `score.json` - Final scores including per-category averages and overall score:
|
| 293 |
-
```json
|
| 294 |
-
{
|
| 295 |
-
"final_score": 4.3,
|
| 296 |
-
"averaged_result": {
|
| 297 |
-
"add": 4.5,
|
| 298 |
-
"adjust": 4.2,
|
| 299 |
-
"background": 3.8,
|
| 300 |
-
...
|
| 301 |
-
},
|
| 302 |
-
"averaged_data": {
|
| 303 |
-
"0": 4.67,
|
| 304 |
-
"1": 4.33,
|
| 305 |
-
"2": 4.67,
|
| 306 |
-
...
|
| 307 |
-
}
|
| 308 |
-
}
|
| 309 |
-
```
|
| 310 |
-
|
| 311 |
-
The `redbench_eval.py` script automatically computes:
|
| 312 |
-
1. Individual image scores (extracted from Gemini responses)
|
| 313 |
-
2. Per-category averages (averaged_result)
|
| 314 |
-
3. Overall final score (average of all category scores)
|
| 315 |
-
|
| 316 |
-
See the Output section above for the complete score.json structure.
|
| 317 |
-
|
| 318 |
## 🧩 License
|
| 319 |
**REDEdit-Bench** is released under the [Creative Commons Attribution–NonCommercial–NoDerivatives (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/) license.
|
| 320 |
|
|
@@ -323,8 +167,6 @@ See the Output section above for the complete score.json structure.
|
|
| 323 |
|
| 324 |
🖼️ **Data Source:** All images included in REDEdit-Bench were legally purchased and obtained through official channels to ensure copyright compliance.
|
| 325 |
|
| 326 |
-
*By using this dataset, you agree to comply with the applicable license terms.*
|
| 327 |
-
|
| 328 |
## 🖊️ Citation
|
| 329 |
|
| 330 |
We kindly encourage citation of our work if you find it useful.
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
- zh
|
| 4 |
- en
|
| 5 |
+
license: cc-by-nc-nd-4.0
|
| 6 |
+
task_categories:
|
| 7 |
+
- image-to-image
|
| 8 |
---
|
| 9 |
+
|
| 10 |
# 🚩 RedBench (REDEdit-Bench)
|
| 11 |
|
| 12 |
|
|
|
|
| 20 |
<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode">
|
| 21 |
<img src="https://img.shields.io/badge/License-CC%20BY--NC--ND%204.0-lightgrey.svg" alt="License" style="vertical-align: middle;">
|
| 22 |
</a>
|
| 23 |
+
<a href="https://huggingface.co/papers/2602.13344">
|
| 24 |
<img src="https://img.shields.io/badge/Report-arXiv-b5212f.svg?logo=arxiv" alt="Technical Report" style="vertical-align: middle;">
|
| 25 |
</a>
|
| 26 |
</p>
|
| 27 |
+
|
| 28 |
## 🔥 Introduction
|
| 29 |
|
| 30 |
**RedBench** (also known as REDEdit-Bench) is a comprehensive benchmark designed to evaluate the capabilities of current image editing models.
|
| 31 |
|
| 32 |
+
This dataset was introduced in the [FireRed-Image-Edit-1.0 Technical Report](https://huggingface.co/papers/2602.13344).
|
| 33 |
+
|
| 34 |
Our main goal is to build more diverse scenarios and editing instructions that better align with human language. We collected over 3,000 images from the internet, and after careful expert-designed selection, we constructed **1,673 bilingual (Chinese–English) editing pairs** across **15 categories**.
|
| 35 |
|
| 36 |
📢 **Note on Dataset Size**: The original benchmark described in the paper consists of 1,673 image pairs. However, due to strict redistribution licensing restrictions on certain commercial assets, the public release version has been curated to **1,542 pairs**. This ensures full compliance with copyright laws while maintaining the diversity and quality of the benchmark.
|
|
|
|
| 120 |
--lang cn
|
| 121 |
```
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
# Image Editing Evaluation using Gemini-3-Flash
|
| 124 |
|
| 125 |
This project evaluates image editing processes using the **Gemini-3-Flash API**. The system processes a set of original and edited images, comparing them according to a predefined set of criteria, such as instruction adherence, image-editing quality, and detail preservation.
|
|
|
|
| 133 |
- **Image-editing Quality**: The edit should appear seamless and natural.
|
| 134 |
- **Detail Preservation**: Regions not specified for editing should remain unchanged.
|
| 135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
## Dependencies
|
| 137 |
|
| 138 |
```bash
|
|
|
|
| 159 |
python redbench_eval.py --result_img_folder <path_to_edited_images> --edit_json <path_to_redbench_jsonl> --prompts_json <path_to_prompts_json> --lang <language>
|
| 160 |
```
|
| 161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
## 🧩 License
|
| 163 |
**REDEdit-Bench** is released under the [Creative Commons Attribution–NonCommercial–NoDerivatives (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/) license.
|
| 164 |
|
|
|
|
| 167 |
|
| 168 |
🖼️ **Data Source:** All images included in REDEdit-Bench were legally purchased and obtained through official channels to ensure copyright compliance.
|
| 169 |
|
|
|
|
|
|
|
| 170 |
## 🖊️ Citation
|
| 171 |
|
| 172 |
We kindly encourage citation of our work if you find it useful.
|