alexchen777 imirandam commited on
Commit
8b0d113
·
verified ·
0 Parent(s):

Duplicate from imirandam/BiVLC

Browse files

Co-authored-by: Imanol Miranda <imirandam@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ size_categories:
6
+ - 1K<n<10K
7
+ pretty_name: BiVLC
8
+ dataset_info:
9
+ features:
10
+ - name: image
11
+ dtype: image
12
+ - name: caption
13
+ dtype: string
14
+ - name: negative_caption
15
+ dtype: string
16
+ - name: negative_image
17
+ dtype: image
18
+ - name: type
19
+ dtype: string
20
+ - name: subtype
21
+ dtype: string
22
+ splits:
23
+ - name: test
24
+ num_bytes: 567921772.034
25
+ num_examples: 2933
26
+ download_size: 536810200
27
+ dataset_size: 567921772.034
28
+ configs:
29
+ - config_name: default
30
+ data_files:
31
+ - split: test
32
+ path: data/test-*
33
+ ---
34
+
35
+ # Dataset Card for BiVLC
36
+
37
+ ## Dataset Description
38
+ - **Homepage:** https://imirandam.github.io/BiVLC_project_page/
39
+ - **Repository:** https://github.com/IMirandaM/BiVLC
40
+ - **Paper:** https://arxiv.org/abs/2406.09952
41
+ - **Point of Contact:** [Imanol Miranda](mailto:imanol.miranda@ehu.eus)
42
+
43
+ ### Dataset Summary
44
+
45
+ BiVLC is a benchmark for Bidirectional Vision-Language Compositionality evaluation. Each instance consists of two images and two captions. Using each of the images and captions as a base, a model is asked to select the pair that correctly represents the base versus the hard negative distractor with minor compositional changes. Thus, we can measure image-to-text and text-to-image retrieval with hard negative pairs. To obtain good results on the dataset, it is necessary that the model performs well in both directions for the same instance.
46
+
47
+ <p align="center">
48
+ <img width="1200" src="https://raw.githubusercontent.com/IMirandaM/BiVLC/main/misc/BiVLC-Examples.svg">
49
+ </p>
50
+
51
+ #### Dataset instances
52
+
53
+ Each instance of the dataset consists of six fields:
54
+ * image: COCO 2017 validation image.
55
+ * caption: COCO 2017 validation text describing the COCO image.
56
+ * negative_caption: Negative caption generated from the COCO 2017 validation text description by SugarCrepe.
57
+ * negative_image: Negative image generated from the negative caption by BiVLC.
58
+ * type: Category of the negative instances: Replace, Swap or Add.
59
+ * subtype: Subcategory of the negative instances: Object, Attribute or Relation.
60
+
61
+ #### How to use
62
+
63
+ To load data with datasets:
64
+ ```python
65
+ >>> data = load_dataset("imirandam/BiVLC", split = "test")
66
+ ```
67
+
68
+ #### Instance example
69
+
70
+ Each instance has the following structure:
71
+ ```
72
+ {
73
+ 'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x332 at 0x7F9BFC0C5430>,
74
+ 'caption': 'A man throwing a ball while smiling and on a field.',
75
+ 'negative_caption': 'A man throwing a ball while a child is smiling on a field.',
76
+ 'negative_image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=512x512 at 0x7F9BE45571C0>,
77
+ 'type': 'add',
78
+ 'subtype': 'obj',
79
+ }
80
+ ```
81
+
82
+ ### Dataset statistics
83
+ test: 2,933 instances formed by 2 images and 2 captions. 11,732 retrieval instances, 50% text-to-image and 50% image-to-text.
84
+
85
+ <p align="center">
86
+ <img width="900" src="https://raw.githubusercontent.com/IMirandaM/BiVLC/main/misc/BiVLC-Comb-3.svg">
87
+ </p>
88
+
89
+
90
+ ### Source Data
91
+ - image and caption are from [COCO 2017](https://cocodataset.org/#home) validation split.
92
+ - negative_caption is a text description generated from the COCO caption by [SugarCrepe](https://github.com/RAIVNLab/sugar-crepe).
93
+
94
+ ### Dataset curation
95
+ <p align="center">
96
+ <img width="900" src="https://raw.githubusercontent.com/IMirandaM/BiVLC/main/misc/BiVLC-Process.svg">
97
+ </p>
98
+
99
+
100
+ Step 1 - Uniformly format positive and hard negative captions
101
+
102
+ Step 2 - Generate hard negative images
103
+
104
+ Step 3 - Ask to human annotators to choose the best generated image
105
+
106
+ Step 4 - Filter ambiguous instances
107
+
108
+ ### More examples
109
+ <p align="center">
110
+ <img width="1200" src="https://raw.githubusercontent.com/IMirandaM/BiVLC/main/misc/more_examples.svg">
111
+ </p>
112
+
113
+ ### Training Data
114
+ If you need training and validation data, you can use the datasets proposed in the paper in the following links, [TROHN-Text](https://huggingface.co/datasets/imirandam/TROHN-Text) and [TORHN-Img](https://huggingface.co/datasets/imirandam/TROHN-Img).
115
+
116
+ ### Licensing Information
117
+
118
+ This work is licensed under a MIT License.
119
+
120
+ ## Citation Information
121
+ If you find this dataset useful, please consider citing our paper:
122
+ ```
123
+ @misc{miranda2024bivlc,
124
+ title={BiVLC: Extending Vision-Language Compositionality Evaluation with Text-to-Image Retrieval},
125
+ author={Imanol Miranda and Ander Salaberria and Eneko Agirre and Gorka Azkune},
126
+ year={2024},
127
+ eprint={2406.09952},
128
+ archivePrefix={arXiv},
129
+ primaryClass={cs.CV}
130
+ }
131
+ ```
data/test-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:664a1c3e6a76af239ccaec06c8b9bc137c6582f3ff9bb7bd14f728814d940a10
3
+ size 270932756
data/test-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7de5c244dbdae3e230ee64173cedfacb5c0667aeab5bf12993af08fa71bc063
3
+ size 265877444