remake123 commited on
Commit
1cb9eab
·
verified ·
1 Parent(s): 1abc656

re-upload corrected README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -0
README.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ task_categories:
4
+ - visual-question-answering
5
+ language:
6
+ - en
7
+ tags:
8
+ - multimodal
9
+ - vision-language
10
+ - on-policy-distillation
11
+ - dual-world
12
+ - benchmark
13
+ size_categories:
14
+ - 1K<n<10K
15
+ ---
16
+
17
+ # CWBench
18
+
19
+ A **dual-world** VQA benchmark and training set for cross-world aligned
20
+ distillation (CWAD) of vision-language models.
21
+
22
+ Each item is a *pair*: **world A** is an original image, **world B** is a
23
+ counterfactual edit of that same image that flips the answer to the question.
24
+ A model is scored on both members; a pair counts as correct only when **both**
25
+ worlds are answered correctly (cross-world pair accuracy, CWPA).
26
+
27
+ ## Files
28
+
29
+ ```
30
+ train.jsonl 2365 rows training set (dual-world)
31
+ test.jsonl 1188 rows test set = 594 pairs × {A, B}
32
+ train/ 4730 images referenced by train.jsonl
33
+ test/ 1188 images referenced by test.jsonl
34
+ ```
35
+
36
+ Image paths inside the jsonl are relative to this directory, so the tree is
37
+ self-contained.
38
+
39
+ ## Schemas
40
+
41
+ ### `train.jsonl` — one object per training row
42
+
43
+ | field | meaning |
44
+ |---|---|
45
+ | `prompt` | chat messages, `<image>` marks where the image goes |
46
+ | `images` | **world A** — the original image at teacher resolution, matching `test.jsonl` member A |
47
+ | `teacher_images` | **world B** — the counterfactual edit at 1024×1024 |
48
+ | `reward_model.ground_truth` | letter answer for the row |
49
+ | `ability`, `data_source`, `extra_info` | provenance metadata carried over from the source release |
50
+
51
+ ### `test.jsonl` — one object per *member* (two rows per pair, same `pair_id`)
52
+
53
+ | field | meaning |
54
+ |---|---|
55
+ | `pair_id` | join key; `A` and `B` rows share it |
56
+ | `member` | `"A"` (original) or `"B"` (edited) |
57
+ | `images` | single-element list with the image path |
58
+ | `query` | the question, with options |
59
+ | `response` | ground-truth letter |
60
+ | `category` | edit category tag |
61
+ | `world_a_resolution` | resolution mode used for world A |
62
+
63
+ ## Loading
64
+
65
+ ```python
66
+ import json
67
+
68
+ rows = [json.loads(l) for l in open("train.jsonl", encoding="utf-8")]
69
+ row = rows[0]
70
+ print(row["prompt"][0]["content"])
71
+ print(row["images"][0]["image"], row["teacher_images"][0]["image"])
72
+
73
+ # score a submission pair-wise
74
+ test = [json.loads(l) for l in open("test.jsonl", encoding="utf-8")]
75
+ pairs = {}
76
+ for e in test:
77
+ pairs.setdefault(e["pair_id"], {})[e["member"]] = e
78
+ ```
79
+
80
+ `test.jsonl` is not in a format `datasets.load_dataset` can auto-convert (the
81
+ images are plain files, not embedded bytes). Read the jsonl and open the images
82
+ yourself.
83
+
84
+ ## Provenance and licence
85
+
86
+ This release is derived from **RP-OPSD Dataset4.0**, whose questions originate
87
+ from public VQA sources (e.g. A-OKVQA). The images are redistributed as part of
88
+ that derived release. **Check that the upstream licences permit redistribution
89
+ before publishing or reusing this dataset.** The `license` field above is set to
90
+ `other` because the upstream terms, not an SPDX identifier, govern it.
91
+
92
+ ## Splits
93
+
94
+ `train.jsonl` and `test.jsonl` are disjoint:
95
+
96
+ - **0** image files in common (checked across all four A/B combinations)
97
+ - **0** question strings in common
98
+
99
+ The `extra_info.dataset4_source_index` in `train.jsonl` and `source_idx` in
100
+ `test.jsonl` come from **different index namespaces** and must not be joined
101
+ against each other.