File size: 2,979 Bytes
25cbcc2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
pretty_name: EditJudge-Bench Evaluation Code
tags:
- benchmark
- evaluation
- vision-language-models
- image-editing
- vlm-as-a-judge
---

# EditJudge-Bench Evaluation Code

This repository contains lightweight, anonymous evaluation utilities for the
EditJudge-Bench dataset release. The code validates a local dataset snapshot, expands
edit-level rows into verification triplets, and computes the AUROC metrics used
to audit VLM-as-a-judge behaviour.

Dataset URL: `https://huggingface.co/datasets/EDAnonSubmission/benchmark`

## Install

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```

## Dataset Layout

The scripts expect a local dataset snapshot with:

```text
benchmark.parquet
images/<sample_id>/before.jpg
images/<sample_id>/after.jpg
```

Each parquet row is one edit pair. A positive verification triplet is created
from `instruction_pos`; negative triplets are created from
`instruction_neg_list` and `instruction_neg_types`.

## Validate the Dataset

```bash
python scripts/validate_dataset.py \
  --dataset-root /path/to/benchmark
```

The validator checks row count, image coverage, negative-instruction alignment,
edit-type balance, and that image paths are portable and repo-relative.

## Prediction Schema

Prediction files may be CSV, JSONL, JSON, or Parquet. The simplest schema is:

```text
sample_id,example_type,negative_index,score
```

For positives, set `example_type=positive` and `negative_index=-1`. For negatives,
set `example_type=negative` and use the index in `instruction_neg_list`.

The scripts also accept `parquet_row_index` instead of `sample_id`, or an
expanded table that already contains `label`, `edit_type`, `negative_type`, and
`score`.

## Compute Main Metrics

```bash
python scripts/compute_benchpress_metrics.py \
  --dataset-root /path/to/benchmark \
  --predictions /path/to/predictions.parquet \
  --out-dir outputs/judge_name
```

Outputs:

- `overall_metrics.csv`: global AUROC and macro edit-type AUROC.
- `per_edit_type_auc.csv`: AUROC for each edit type.

## Negative-Type Breakdown

```bash
python scripts/compute_negative_type_breakdown.py \
  --dataset-root /path/to/benchmark \
  --predictions /path/to/predictions.parquet \
  --out-dir outputs/judge_name
```

Outputs:

- `per_negative_type_auc.csv`
- `semantic_vs_noedit_summary.csv`

## Ground-Truth Salience Tables

```bash
python scripts/make_salience_tables.py \
  --dataset-root /path/to/benchmark \
  --predictions /path/to/predictions.parquet \
  --out-dir outputs/judge_name \
  --bins 5
```

This conditions no-edit rejection AUROC on saved Blender parameters such as
shape delta, articulation delta, scale delta, movement distance, rotation angle,
lighting magnitude, and camera changes.

## Notes

This code release evaluates judge scores; it does not run VLM inference. The
paper's model-specific prompts and inference wrappers are implementation details
around producing the prediction files consumed here.