File size: 2,618 Bytes
c66d50b
3629bd9
 
 
 
 
 
 
 
 
 
 
 
c66d50b
 
 
 
 
 
3629bd9
c66d50b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3629bd9
c66d50b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2e31282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- ar
- en
- es
- fr
- ru
license: mit
size_categories:
- 1K<n<10K
task_categories:
- visual-question-answering
pretty_name: XVNLI
dataset_info:
  features:
  - name: label
    dtype: string
  - name: caption
    dtype: string
  - name: hypothesis
    dtype: string
  - name: caption_id
    dtype: string
  - name: pair_id
    dtype: string
  - name: flikr30k_id
    dtype: string
  - name: image
    struct:
    - name: bytes
      dtype: binary
    - name: path
      dtype: 'null'
  splits:
  - name: ar
    num_bytes: 45192381
    num_examples: 1164
  - name: en
    num_bytes: 45141859
    num_examples: 1164
  - name: es
    num_bytes: 45162738
    num_examples: 1164
  - name: fr
    num_bytes: 45161740
    num_examples: 1164
  - name: ru
    num_bytes: 45256629
    num_examples: 1164
  download_size: 70974300
  dataset_size: 225915347
configs:
- config_name: default
  data_files:
  - split: ar
    path: data/ar-*
  - split: en
    path: data/en-*
  - split: es
    path: data/es-*
  - split: fr
    path: data/fr-*
  - split: ru
    path: data/ru-*
---

# XVNLI

### This is a copy from the original repo: https://github.com/e-bug/iglue


If you use this dataset, please cite the original authors:
```bibtex
@inproceedings{bugliarello-etal-2022-iglue,
  title = 	 {{IGLUE}: A Benchmark for Transfer Learning across Modalities, Tasks, and Languages},
  author =       {Bugliarello, Emanuele and Liu, Fangyu and Pfeiffer, Jonas and Reddy, Siva and Elliott, Desmond and Ponti, Edoardo Maria and Vuli{\'c}, Ivan},
  booktitle = 	 {Proceedings of the 39th International Conference on Machine Learning},
  pages = 	 {2370--2392},
  year = 	 {2022},
  editor = 	 {Chaudhuri, Kamalika and Jegelka, Stefanie and Song, Le and Szepesvari, Csaba and Niu, Gang and Sabato, Sivan},
  volume = 	 {162},
  series = 	 {Proceedings of Machine Learning Research},
  month = 	 {17--23 Jul},
  publisher =    {PMLR},
  pdf = 	 {https://proceedings.mlr.press/v162/bugliarello22a/bugliarello22a.pdf},
  url = 	 {https://proceedings.mlr.press/v162/bugliarello22a.html},
}
```

### How to read the image
Due to a [bug](https://github.com/huggingface/datasets/issues/4796), the images cannot be stored as PIL.Image.Images directly but need to be converted to dataset.Images-. Hence, to load them, this additional step is required:

```python
from datasets import Image, load_dataset

ds = load_dataset("floschne/xvnli", split="en")
ds.map(
    lambda sample: {
        "image_t": [Image().decode_example(img) for img in sample["image"]],
    },
    remove_columns=["image"],
).rename_columns({"image_t": "image"})

```