File size: 3,283 Bytes
b5edd6c
 
 
 
 
 
 
 
 
9546f35
 
b5edd6c
 
 
 
 
 
 
 
 
9546f35
 
 
b5edd6c
 
9546f35
 
b5edd6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9546f35
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
---
language:
  - en
task_categories:
  - question-answering
  - visual-question-answering
pretty_name: VSR (Parquet)
dataset_info:
  features:
    - name: index
      dtype: string
    - name: question
      dtype: string
    - name: question_type
      dtype: string
    - name: answer
      dtype: string
    - name: image
      sequence:
        dtype: image
    - name: image_file
      sequence:
        dtype: string
    - name: id
      dtype: string
    - name: text
      dtype: string
    - name: gt_value
      dtype: bool
    - name: relation
      dtype: string
    - name: subj
      dtype: string
    - name: obj
      dtype: string
  splits:
    - name: test
configs:
  - config_name: default
    data_files:
      - split: test
        path: VSR_Zero_Shot_Test.parquet
---

## VSR (Parquet + TSV)

This repo provides a Parquet-converted [VSR](https://github.com/cambridgeltl/visual-spatial-reasoning) dataset and a TSV formatted for vlmevalkit.

### Contents

- `VSR_Zero_Shot_Test.parquet`
  - Columns:
    - `question` (string) — adds `<image>` placeholders (from the original `text`) and appends options + post prompt (see below)
    - `question_type` (string)
    - `answer` (string; `"A"` for True, `"B"` for False)
    - `image` (list[image]) — image bytes aligned with the `<image>` order
    - `id` (string)
    - `gt_value` (bool; original True/False)
    - `relation` (string)
    - `subj` (string)
    - `obj` (string)
    - `image_file` (list[string]; original image file names)

- `VSR_Zero_Shot_Test.tsv` (for vlmevalkit)
  - Columns:
    - `index` (string; from `id`)
    - `category` (string; from `question_type`)
    - `image` (string)
      - single image → base64 string
      - multiple images → JSON array string of base64 strings
      - no image → empty string
    - `question` (string)
    - `answer` (string; `"A"` or `"B"`)
    - `A` (string; literal `"True"`)
    - `B` (string; literal `"False"`)
    - other fields mirrored from jsonl: `id`, `question_type`, `relation`, `subj`, `obj`, `image_file`, etc.

### How we build `question` from the original VSR

Each original record contains:
```json
{"id": "...", "image": ["000000085637.jpg"], "text": "<image>\nThe bed is under the suitcase.", "gt_value": true, "question_type": "vsr", "relation": "under", "subj": "bed", "obj": "suitcase"}
```

We construct the final `question` as:
1) Take the original `text` (which already contains `<image>` placeholders).  
2) Append the fixed options block:
```
Options:
A. True
B. False
```
3) Append the post prompt (default):
```
Is this statement True or False? Answer with the option's letter.
```

So, the final `question` looks like:
```
<image>
The bed is under the suitcase.

Options:
A. True
B. False
Is this statement True or False? Answer with the option's letter.
```

The `answer` is `"A"` if `gt_value` is `true`, otherwise `"B"`.

### Notes
- `<image>` placeholders are preserved in `question` and used to interleave images and text inside vlmevalkit prompts.
- Options (`A. True`, `B. False`) and the post prompt are embedded into `question`, so dataset consumers do not need to add choices externally.
- TSV uses base64-encoded images (string or JSON array string), while Parquet stores raw image bytes (`list[image]`).