VSR / README.md
RunsenXu's picture
Update README.md
9546f35 verified
---
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]`).