File size: 4,886 Bytes
d37698e
 
 
 
 
 
 
 
 
 
 
 
 
317d0e7
 
 
 
 
 
 
d37698e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317d0e7
d37698e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e9c2cd9
d37698e
e9c2cd9
 
 
 
 
 
 
 
d37698e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-nc-sa-4.0
task_categories:
  - video-classification
  - other
pretty_name: WGO-Bench Localization Given Labels
tags:
  - robotics
  - temporal-localization
  - video
  - wgo-bench
size_categories:
  - n<1K
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train.parquet
      - split: test
        path: data/test.parquet
---

# WGO-Bench — Localization Given Labels

Self-contained eval for **localization given labels**: the model is given the gold event labels (shuffled, with multiplicity) and must return one time interval per occurrence. Videos and gold intervals are embedded in each row.

Derived from [Macrodata Labs' WGO-Bench](https://huggingface.co/datasets/macrodata/WGO-Bench) ([blog](https://macrodata.co/blog/annotating-robot-video-subtasks)). License: **CC-BY-NC-SA-4.0**. Keep downstream use consistent with Macrodata's attribution and non-commercial / share-alike terms.

## Splits

| Split | Source ids | Episodes | Gold events |
|-------|------------|----------|-------------|
| `train` | `dev_80` | 80 | 623 |
| `test` | `heldout_20` | 20 | 120 |

Construction seed is frozen at **0**. Shuffled `label_specs` and `prompt_text` are materialized per row so order is byte-stable without re-running the RNG. Split id lists are also under `meta/splits/`.

**Challenge leakage rule:** train localization models only on `train`. Score free-mode segmentation F1@0.75 on the untouched `test` episodes (or an external set). Do not train on `test`.

## Schema

Each row is one episode:

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Episode id |
| `family` | string | `homer` / `droid` / `galaxea` |
| `instruction` | string | High-level episode instruction |
| `split` | string | `train` or `test` |
| `video` | binary | MP4 bytes |
| `label_specs` | list | `{label, multiplicity}` in **prompt order** (post-shuffle) |
| `gold_segments` | list | `{start_sec, end_sec, label}` in gold order |
| `prompt_text` | string | Exact localization prompt |
| `construction` | struct | `{seed, protocol, source}` |

## Prediction format

```json
{
  "id": "galaxea_002",
  "labels": [
    {
      "label": "pick up the pink stick",
      "intervals": [
        {"label_echo": "pick up the pink stick", "start_sec": 1.2, "end_sec": 3.4}
      ]
    }
  ]
}
```

Return exactly `multiplicity` intervals per listed label. Echo the exact label string in `label_echo`.

## Scoring

No gold-aware snapping. Report **both** layers:

| Layer | Metric | Definition |
|-------|--------|------------|
| **Per event** | **IoU** | Overlap / union of one gold interval vs its matched prediction (within-label 1:1 assignment; unmatched → 0) |
| **Run / split** | **mean IoU** | Mean of those per-event IoUs |
| **Run / split** | **continuous F1** | Same number under this protocol: when the model returns the requested multiplicities, \(N_g = N_p\), so continuous F1 \(= 2S/(N_g+N_p)\) collapses to mean IoU. Emitted as `continuous_f1` (= `mean_iou`) for consistency with free-segmentation continuous F1 |
| **Run / split** | **accuracy@0.5 / @0.75** | Fraction of gold events with IoU ≥ threshold |

**Takeaway:** IoU is the event-level unit; continuous F1 is the run-level summary of those IoUs (not a different scoring rule). Always quote both names when reporting, and keep accuracy@0.75 as the strict headline next to them.

Shipped code (this repo):

```text
localization/construct.py   # rebuild specs + prompt from gold
localization/score.py       # interval IoU, assignment, score_episode, summarize
localization/verify.py      # assert parquet specs/prompts match construct()
scripts/score_predictions.py
```

```bash
# from the dataset root (after cloning or downloading the repo files)
python scripts/score_predictions.py \
  --data data/train.parquet \
  --preds my_preds.jsonl
```

Or with 🤗 Datasets:

```python
from datasets import load_dataset
ds = load_dataset("Nano1337/wgo-bench-localization")
row = ds["train"][0]
print(row["id"], row["label_specs"][:2])
# row["video"] is raw MP4 bytes
```

## Reproduce construction

```python
from localization.construct import label_specs_from_segments, localization_prompt
from localization.schema import GoldSegment
from localization.verify import verify_row

gold = [GoldSegment(**s) for s in row["gold_segments"]]
specs = label_specs_from_segments(row["id"], gold, seed=0)
assert [s.to_dict() for s in specs] == list(row["label_specs"])
assert localization_prompt(row["instruction"], specs) == row["prompt_text"]
verify_row(row)
```

## Attribution

Videos and gold annotations: Macrodata Labs' [WGO-Bench](https://huggingface.co/datasets/macrodata/WGO-Bench), CC-BY-NC-SA-4.0.  
This repository adds the localization-given-labels protocol (frozen shuffled label lists, prompts, splits, and scorer). Model predictions are not included.