Anonymous723 commited on
Commit
bc2fc73
·
verified ·
1 Parent(s): c8152f6

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,3 +1,146 @@
1
  ---
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ language:
4
+ - zh
5
+ - en
6
+ tags:
7
+ - multimodal-mathematical-reasoning
8
+ - geometry
9
+ - tikz
10
+ - latex
11
+ - image-to-tikz
12
+ - benchmark
13
+ size_categories:
14
+ - 10K<n<100K
15
+ task_categories:
16
+ - image-to-text
17
+ - visual-question-answering
18
+ - text-generation
19
+ pretty_name: TriGeoBench
20
  ---
21
+
22
+ # TriGeoBench
23
+
24
+ TriGeoBench is a geometry-centric multimodal mathematics benchmark designed for evaluating mathematical reasoning with visual diagrams and image-to-TikZ generation. The dataset contains mathematical problems, solutions, diagram images, and corresponding TikZ annotations.
25
+
26
+ This repository is anonymized for peer review. Author and institution information will be added upon acceptance.
27
+
28
+ ## Dataset Files
29
+
30
+ The dataset contains four Parquet files:
31
+
32
+ ```text
33
+ image2tikz_train.parquet
34
+ image2tikz_test.parquet
35
+ question_train.parquet
36
+ question_test.parquet
37
+ ````
38
+
39
+ The dataset supports two tasks:
40
+
41
+ 1. **Image-to-TikZ generation**: generating TikZ code from a geometric diagram image.
42
+ 2. **Multimodal mathematical reasoning**: solving math problems with textual questions, solutions, and associated figures.
43
+
44
+ ## Image-to-TikZ Data
45
+
46
+ Files:
47
+
48
+ ```text
49
+ image2tikz_train.parquet
50
+ image2tikz_test.parquet
51
+ ```
52
+
53
+ Each row corresponds to one diagram image and its ground-truth TikZ code.
54
+
55
+ ### Fields
56
+
57
+ | Field | Description |
58
+ | ------------ | ------------------------------------------------------------ |
59
+ | `key` | Unique figure identifier. It is composed of `<problem_id>_<position>_<figure_index>`, where `position` indicates whether the figure appears in the question or the solution. This key can be linked to the corresponding problem in the question-level data. |
60
+ | `image` | Base64-encoded image. |
61
+ | `latex_gt` | Ground-truth TikZ code corresponding to the image. |
62
+ | `difficulty` | Figure complexity level. Possible values are `容易`, `中等`, and `困难`. |
63
+
64
+ ## Question-Level Data
65
+
66
+ Files:
67
+
68
+ ```text
69
+ question_train.parquet
70
+ question_test.parquet
71
+ ```
72
+
73
+ Each row corresponds to one mathematical problem, including the problem text, solution, metadata, and associated figures.
74
+
75
+ ### Fields
76
+
77
+ | Field | Description |
78
+ | ----------------- | ------------------------------------------------------------ |
79
+ | `sample_id` | Unique problem identifier. It can be linked to the `key` field in the image-to-TikZ data. |
80
+ | `difficulty` | Problem difficulty level. Possible values are `容易`, `中等`, and `困难`. |
81
+ | `question_type` | Problem type. Possible values include `选择题`, `填空题`, `解答题`, and `证明题`. |
82
+ | `knowledge_point` | Main mathematical knowledge area. Possible values include `向量`, `函数`, `平面几何`, `立体几何`, and `解析几何`. |
83
+ | `question` | Problem statement in LaTeX format. |
84
+ | `solution` | Solution or answer in LaTeX format. |
85
+ | `q_figX` | Base64-encoded image of the X-th figure appearing in the question. |
86
+ | `q_figX_latex_gt` | Ground-truth TikZ code of the X-th question figure. |
87
+ | `s_figY` | Base64-encoded image of the Y-th figure appearing in the solution. |
88
+ | `s_figY_latex_gt` | Ground-truth TikZ code of the Y-th solution figure. |
89
+
90
+ Here, `X` and `Y` denote figure indices. A problem may contain different numbers of question-side and solution-side figures.
91
+
92
+ ## Data Splits
93
+
94
+ The dataset is split into training and test sets for both tasks:
95
+
96
+ | Task | Train File | Test File |
97
+ | ---------------------- | -------------------------- | ------------------------- |
98
+ | Image-to-TikZ | `image2tikz_train.parquet` | `image2tikz_test.parquet` |
99
+ | Mathematical Reasoning | `question_train.parquet` | `question_test.parquet` |
100
+
101
+ ## Loading the Dataset
102
+
103
+ The Parquet files can be loaded with `pandas`:
104
+
105
+ ```python
106
+ import pandas as pd
107
+
108
+ image2tikz_train = pd.read_parquet("image2tikz_train.parquet")
109
+ image2tikz_test = pd.read_parquet("image2tikz_test.parquet")
110
+
111
+ question_train = pd.read_parquet("question_train.parquet")
112
+ question_test = pd.read_parquet("question_test.parquet")
113
+ ```
114
+
115
+ Base64-encoded images can be decoded as follows:
116
+
117
+ ```python
118
+ import base64
119
+ from io import BytesIO
120
+ from PIL import Image
121
+
122
+ def decode_base64_image(image_base64):
123
+ image_bytes = base64.b64decode(image_base64)
124
+ return Image.open(BytesIO(image_bytes)).convert("RGB")
125
+
126
+ img = decode_base64_image(image2tikz_train.iloc[0]["image"])
127
+ img.show()
128
+ ```
129
+
130
+ ## Intended Use
131
+
132
+ TriGeoBench is intended for research on:
133
+
134
+ * multimodal mathematical reasoning;
135
+ * geometry-centric visual question answering;
136
+ * image-to-TikZ generation;
137
+ * evaluating whether models can reason over precise geometric structures;
138
+ * studying the interaction between textual math problems, visual diagrams, and symbolic diagram representations.
139
+
140
+ ## Limitations
141
+
142
+ The dataset focuses on geometry-centric middle- and high-school mathematics problems. The annotations include LaTeX-formatted problem texts and TikZ code for figures. Although the dataset has been processed and checked, residual annotation errors may remain.
143
+
144
+ ## Anonymous Review Notice
145
+
146
+ This repository is anonymized for peer review. Please do not attempt to identify the authors during the review process.
image2tikz/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:412e401d47c53ac11cbfa4e4550eb64bb744b0bbcff5f99c5aa27ad3d69b483a
3
+ size 24449284
image2tikz/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a611966a4dfa73ab35899752ef108b05ecffc23f473f4a1cb55ca8e5d829fde4
3
+ size 291980989
question/test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2997981d411b80a9a461dbe28f24b00691429aeeed257306f1b61401538082f0
3
+ size 43536953
question/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:334112f79b9e8de865203bfa57b646f7176567d7b8e8763a8496a4d5e189cf0e
3
+ size 273919361