RunsenXu commited on
Commit
b5edd6c
·
verified ·
1 Parent(s): 417dd9c

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +112 -0
README.md ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ task_categories:
5
+ - question-answering
6
+ - visual-question-answering
7
+ pretty_name: VSR (Parquet)
8
+ dataset_info:
9
+ features:
10
+ - name: question
11
+ dtype: string
12
+ - name: question_type
13
+ dtype: string
14
+ - name: answer
15
+ dtype: string
16
+ - name: image
17
+ sequence:
18
+ dtype: image
19
+ - name: id
20
+ dtype: string
21
+ - name: gt_value
22
+ dtype: bool
23
+ - name: relation
24
+ dtype: string
25
+ - name: subj
26
+ dtype: string
27
+ - name: obj
28
+ dtype: string
29
+ - name: image_file
30
+ sequence:
31
+ dtype: string
32
+ splits:
33
+ - name: test
34
+ configs:
35
+ - config_name: default
36
+ data_files:
37
+ - split: test
38
+ path: VSR_Zero_Shot_Test.parquet
39
+ ---
40
+
41
+ ## VSR (Parquet + TSV)
42
+
43
+ This repo provides a Parquet-converted [VSR](https://github.com/cambridgeltl/visual-spatial-reasoning) dataset and a TSV formatted for vlmevalkit.
44
+
45
+ ### Contents
46
+
47
+ - `VSR_Zero_Shot_Test.parquet`
48
+ - Columns:
49
+ - `question` (string) — adds `<image>` placeholders (from the original `text`) and appends options + post prompt (see below)
50
+ - `question_type` (string)
51
+ - `answer` (string; `"A"` for True, `"B"` for False)
52
+ - `image` (list[image]) — image bytes aligned with the `<image>` order
53
+ - `id` (string)
54
+ - `gt_value` (bool; original True/False)
55
+ - `relation` (string)
56
+ - `subj` (string)
57
+ - `obj` (string)
58
+ - `image_file` (list[string]; original image file names)
59
+
60
+ - `VSR_Zero_Shot_Test.tsv` (for vlmevalkit)
61
+ - Columns:
62
+ - `index` (string; from `id`)
63
+ - `category` (string; from `question_type`)
64
+ - `image` (string)
65
+ - single image → base64 string
66
+ - multiple images → JSON array string of base64 strings
67
+ - no image → empty string
68
+ - `question` (string)
69
+ - `answer` (string; `"A"` or `"B"`)
70
+ - `A` (string; literal `"True"`)
71
+ - `B` (string; literal `"False"`)
72
+ - other fields mirrored from jsonl: `id`, `question_type`, `relation`, `subj`, `obj`, `image_file`, etc.
73
+
74
+ ### How we build `question` from the original VSR
75
+
76
+ Each original record contains:
77
+ ```json
78
+ {"id": "...", "image": ["000000085637.jpg"], "text": "<image>\nThe bed is under the suitcase.", "gt_value": true, "question_type": "vsr", "relation": "under", "subj": "bed", "obj": "suitcase"}
79
+ ```
80
+
81
+ We construct the final `question` as:
82
+ 1) Take the original `text` (which already contains `<image>` placeholders).
83
+ 2) Append the fixed options block:
84
+ ```
85
+ Options:
86
+ A. True
87
+ B. False
88
+ ```
89
+ 3) Append the post prompt (default):
90
+ ```
91
+ Is this statement True or False? Answer with the option's letter.
92
+ ```
93
+
94
+ So, the final `question` looks like:
95
+ ```
96
+ <image>
97
+ The bed is under the suitcase.
98
+
99
+ Options:
100
+ A. True
101
+ B. False
102
+ Is this statement True or False? Answer with the option's letter.
103
+ ```
104
+
105
+ The `answer` is `"A"` if `gt_value` is `true`, otherwise `"B"`.
106
+
107
+ ### Notes
108
+ - `<image>` placeholders are preserved in `question` and used to interleave images and text inside vlmevalkit prompts.
109
+ - Options (`A. True`, `B. False`) and the post prompt are embedded into `question`, so dataset consumers do not need to add choices externally.
110
+ - TSV uses base64-encoded images (string or JSON array string), while Parquet stores raw image bytes (`list[image]`).
111
+
112
+