ryokamoi commited on
Commit
3a8e817
1 Parent(s): 93ea478

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +139 -0
README.md ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - expert-generated
6
+ language:
7
+ - en
8
+ license: gpl-3.0
9
+ multilinguality:
10
+ - monolingual
11
+ size_categories:
12
+ - 1K<n<10K
13
+ source_datasets:
14
+ - original
15
+ task_categories:
16
+ - multiple-choice
17
+ - question-answering
18
+ - visual-question-answering
19
+ task_ids:
20
+ - multiple-choice-qa
21
+ - visual-question-answering
22
+ - multi-class-classification
23
+ tags:
24
+ - multi-modal-qa
25
+ - figure-qa
26
+ - vqa
27
+ - scientific-figure
28
+ - geometry-diagram
29
+ - chart
30
+ - chemistry
31
+ ---
32
+ # VisOnlyQA
33
+
34
+ This repository contains the code and data for the paper "VisOnlyQA: Large Vision Language Models Still Struggle with Visual Perception of Geometric Information".
35
+
36
+ VisOnlyQA is designed to evaluate the visual perception capability of large vision language models (LVLMs) on geometric information of scientific figures. The evaluation set includes 1,200 mlutiple choice questions in 12 visual perception tasks on 4 categories of scientific figures. We also provide a training dataset consisting of 70k instances.
37
+
38
+ * Datasets:
39
+ * Eval-Real: [https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Eval_Real](https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Eval_Real)
40
+ * Eval-Synthetic: [https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Eval_Synthetic](https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Eval_Synthetic)
41
+ * Train: [https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Train](https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Train)
42
+ * Code: [https://github.com/psunlpgroup/VisOnlyQA](https://github.com/psunlpgroup/VisOnlyQA)
43
+
44
+ <p align="center">
45
+ <img src="readme_figures/accuracy_radar_chart.png" width="500">
46
+ </p>
47
+
48
+ ```bibtex
49
+ @misc{kamoi2024visonlyqa,
50
+ title={VisOnlyQA: Large Vision Language Models Still Struggle with Visual Perception of Geometric Information},
51
+ author={Ryo Kamoi and Yusen Zhang and Sarkar Snigdha Sarathi Das and Ranran Haoran Zhang and Rui Zhang},
52
+ year={2024},
53
+ }
54
+ ```
55
+
56
+ ## Dataset
57
+
58
+ The dataset is provided in Hugging Face Dataset.
59
+
60
+ * Eval-Real: [https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Eval_Real](https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Eval_Real)
61
+ * 500 instances for questions on figures in existing datasets (e.g., MathVista, MMMU, and CharXiv)
62
+ * Eval-Synthetic: [https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Eval_Synthetic](https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Eval_Synthetic)
63
+ * 700 instances for questions on synthetic figures
64
+ * Train: [https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Train](https://huggingface.co/datasets/ryokamoi/VisOnlyQA_Train)
65
+ * 70,000 instances for training (synthetic figures)
66
+
67
+ [dataset](https://github.com/psunlpgroup/VisOnlyQA/tree/main/dataset) folder of the GitHub repository includes identical datasets, except for the training data.
68
+
69
+ ### Examples
70
+
71
+ <p align="center">
72
+ <img src="readme_figures/examples.png" width="800">
73
+ </p>
74
+
75
+ ### Usage
76
+
77
+ ```python
78
+ from datasets import load_dataset
79
+
80
+ real_eval = load_dataset("ryokamoi/VisOnlyQA_Eval_Real")
81
+ real_synthetic = load_dataset("ryokamoi/VisOnlyQA_Eval_Synthetic")
82
+
83
+ # Splits
84
+ print(real_eval.keys())
85
+ # dict_keys(['geometry__triangle', 'geometry__quadrilateral', 'geometry__length', 'geometry__angle', 'geometry__area', 'geometry__diameter_radius', 'chemistry__shape_single', 'chemistry__shape_multi', 'charts__extraction', 'charts__intersection'])
86
+
87
+ print(real_synthetic.keys())
88
+ # dict_keys(['syntheticgeometry__triangle', 'syntheticgeometry__quadrilateral', 'syntheticgeometry__length', 'syntheticgeometry__angle', 'syntheticgeometry__area', '3d__size', '3d__angle'])
89
+
90
+ # Prompt
91
+ print(real_eval['geometry__triangle'][0]['prompt_no_reasoning'])
92
+ # There is no triangle ADP in the figure. True or False?
93
+
94
+ # A triangle is a polygon with three edges and three vertices, which are explicitly connected in the figure.
95
+
96
+ # Your response should only include the final answer (True, False). Do not include any reasoning or explanation in your response.
97
+
98
+ # Image
99
+ print(real_eval['geometry__triangle'][0]['decoded_image'])
100
+ # <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=103x165 at 0x7FB4F83236A0>
101
+
102
+ # Answer
103
+ print(real_eval['geometry__triangle'][0]['answer'])
104
+ # False
105
+ ```
106
+
107
+ ### Data Format
108
+
109
+ Each instance of VisOnlyQA dataset has the following attributes:
110
+
111
+ #### Features
112
+ * `decoded_image`: [PIL.Image] Input image
113
+ * `question`: [string] Question (without instruction)
114
+ * `prompt_reasoning`: [string] Prompt with intstruction to use chain-of-thought
115
+ * `prompt_no_reasoning`: [string] Prompt with intstruction **not** to use chain-of-thought
116
+ * `answer`: [string] Correct answer (e.g., `True`, `a`)
117
+
118
+ #### Metadata
119
+ * `image_path`: [string] Path to the image file
120
+ * `image_category`: [string] Category of the image (e.g., `geometry`, `chemistry`)
121
+ * `question_type`: [string] `single_answer` or `multiple answers`
122
+ * `task_category`: [string] Category of the task (e.g., `triangle`)
123
+ * `response_options`: [List[string]] Multiple choice options (e.g., `['True', 'False']`, `['a', 'b', 'c', 'd', 'e']`)
124
+ * `source`: [string] Source dataset
125
+ * `id`: [string] Unique ID
126
+
127
+ ### Statistics
128
+
129
+ <p align="center">
130
+ <img src="readme_figures/stats.png" width="800">
131
+ </p>
132
+
133
+ ## License
134
+
135
+ Please refer to [LICENSE.md](./LICENSE.md).
136
+
137
+ ## Contact
138
+
139
+ If you have any questions, feel free to open an issue or reach out directly to [Ryo Kamoi](https://ryokamoi.github.io/) (ryokamoi@psu.edu).