File size: 2,042 Bytes
d45397a f5b0846 d45397a ef953ef d45397a e33e102 d45397a |
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 |
---
dataset_info:
- config_name: corpus
features:
- name: corpus-id
dtype: string
- name: image
dtype: image
splits:
- name: train
num_bytes: 315479652.451
num_examples: 9593
download_size: 288987711
dataset_size: 315479652.451
- config_name: qrels
features:
- name: query-id
dtype: string
- name: corpus-id
dtype: string
- name: score
dtype: int32
splits:
- name: train
num_bytes: 26962
num_examples: 863
download_size: 14786
dataset_size: 26962
- config_name: queries
features:
- name: query-id
dtype: string
- name: query
dtype: string
- name: answer
dtype: string
- name: options
sequence: string
- name: is_numerical
dtype: int32
splits:
- name: train
num_bytes: 123774
num_examples: 863
download_size: 49623
dataset_size: 123774
configs:
- config_name: corpus
data_files:
- split: train
path: corpus/train-*
- config_name: qrels
data_files:
- split: train
path: qrels/train-*
- config_name: queries
data_files:
- split: train
path: queries/train-*
---
## Dataset Description
This is a VQA dataset based on Scientific Plots from PlotQA dataset from [PlotQA](https://arxiv.org/abs/1909.00997).
### Load the dataset
```python
from datasets import load_dataset
import csv
def load_beir_qrels(qrels_file):
qrels = {}
with open(qrels_file) as f:
tsvreader = csv.DictReader(f, delimiter="\t")
for row in tsvreader:
qid = row["query-id"]
pid = row["corpus-id"]
rel = int(row["score"])
if qid in qrels:
qrels[qid][pid] = rel
else:
qrels[qid] = {pid: rel}
return qrels
corpus_ds = load_dataset("openbmb/VisRAG-Ret-Test-PlotQA", name="corpus", split="train")
queries_ds = load_dataset("openbmb/VisRAG-Ret-Test-PlotQA", name="queries", split="train")
qrels_path = "xxxx" # path to qrels file which can be found under qrels folder in the repo.
qrels = load_beir_qrels(qrels_path)
```
|