ymfl anindya-hf-2002 commited on
Commit
a371edd
·
0 Parent(s):

Duplicate from anindya-hf-2002/pix2tex

Browse files

Co-authored-by: Anindya Mitra <anindya-hf-2002@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ *.mds filter=lfs diff=lfs merge=lfs -text
13
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
+ *.model filter=lfs diff=lfs merge=lfs -text
15
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
16
+ *.npy filter=lfs diff=lfs merge=lfs -text
17
+ *.npz filter=lfs diff=lfs merge=lfs -text
18
+ *.onnx filter=lfs diff=lfs merge=lfs -text
19
+ *.ot filter=lfs diff=lfs merge=lfs -text
20
+ *.parquet filter=lfs diff=lfs merge=lfs -text
21
+ *.pb filter=lfs diff=lfs merge=lfs -text
22
+ *.pickle filter=lfs diff=lfs merge=lfs -text
23
+ *.pkl filter=lfs diff=lfs merge=lfs -text
24
+ *.pt filter=lfs diff=lfs merge=lfs -text
25
+ *.pth filter=lfs diff=lfs merge=lfs -text
26
+ *.rar filter=lfs diff=lfs merge=lfs -text
27
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
28
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar filter=lfs diff=lfs merge=lfs -text
31
+ *.tflite filter=lfs diff=lfs merge=lfs -text
32
+ *.tgz filter=lfs diff=lfs merge=lfs -text
33
+ *.wasm filter=lfs diff=lfs merge=lfs -text
34
+ *.xz filter=lfs diff=lfs merge=lfs -text
35
+ *.zip filter=lfs diff=lfs merge=lfs -text
36
+ *.zst filter=lfs diff=lfs merge=lfs -text
37
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
38
+ # Audio files - uncompressed
39
+ *.pcm filter=lfs diff=lfs merge=lfs -text
40
+ *.sam filter=lfs diff=lfs merge=lfs -text
41
+ *.raw filter=lfs diff=lfs merge=lfs -text
42
+ # Audio files - compressed
43
+ *.aac filter=lfs diff=lfs merge=lfs -text
44
+ *.flac filter=lfs diff=lfs merge=lfs -text
45
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ *.ogg filter=lfs diff=lfs merge=lfs -text
47
+ *.wav filter=lfs diff=lfs merge=lfs -text
48
+ # Image files - uncompressed
49
+ *.bmp filter=lfs diff=lfs merge=lfs -text
50
+ *.gif filter=lfs diff=lfs merge=lfs -text
51
+ *.png filter=lfs diff=lfs merge=lfs -text
52
+ *.tiff filter=lfs diff=lfs merge=lfs -text
53
+ # Image files - compressed
54
+ *.jpg filter=lfs diff=lfs merge=lfs -text
55
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
56
+ *.webp filter=lfs diff=lfs merge=lfs -text
57
+ # Video files - compressed
58
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
59
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: image
5
+ dtype: image
6
+ - name: latex
7
+ dtype: string
8
+ splits:
9
+ - name: train
10
+ num_bytes: 1638732362.625
11
+ num_examples: 377163
12
+ - name: validation
13
+ num_bytes: 545374827.875
14
+ num_examples: 125721
15
+ - name: test
16
+ num_bytes: 544914564.75
17
+ num_examples: 125722
18
+ download_size: 2468946641
19
+ dataset_size: 2729021755.25
20
+ configs:
21
+ - config_name: default
22
+ data_files:
23
+ - split: train
24
+ path: data/train-*
25
+ - split: validation
26
+ path: data/validation-*
27
+ - split: test
28
+ path: data/test-*
29
+ license: apache-2.0
30
+ task_categories:
31
+ - image-to-text
32
+ language:
33
+ - en
34
+ ---
35
+ Here’s a completed dataset card for your **Pix2Tex** dataset based on the provided template:
36
+
37
+ ---
38
+
39
+ # Pix2Tex
40
+
41
+ ## Dataset Details
42
+
43
+ ### Dataset Description
44
+
45
+ The **Pix2Tex Dataset** is a high-quality, curated dataset for training and evaluating Vision-Language Models (VLMs) capable of extracting LaTeX code from images of mathematical formulas. This dataset combines both **printed** and **handwritten** formula images, offering diverse and challenging samples for tasks involving LaTeX recognition.
46
+
47
+ The dataset contains images paired with their LaTeX annotations, enabling researchers and developers to explore various use cases, including mathematical OCR (Optical Character Recognition), multimodal learning, and LaTeX generation from formula images.
48
+
49
+ - **Curated by:** Anindya
50
+ - **Language(s):** English (en)
51
+ - **License:** Apache 2.0
52
+
53
+ ---
54
+
55
+ ## Uses
56
+
57
+ ### Direct Use
58
+
59
+ The **Pix2Tex Dataset** can be used for:
60
+ - Training and evaluation of Vision-Language Models (VLMs).
61
+ - Image-to-Text conversion for LaTeX generation.
62
+ - Research in mathematical OCR and handwriting recognition.
63
+ - Applications involving mathematical document digitization.
64
+
65
+ ### Out-of-Scope Use
66
+
67
+ The dataset should not be used for purposes unrelated to image-to-text conversion, LaTeX generation, or Vision-Language modeling tasks. Misuse of the dataset for malicious purposes, such as creating deceptive content, is strictly prohibited.
68
+
69
+ ---
70
+
71
+ ## Dataset Structure
72
+
73
+ ### Features
74
+
75
+ The dataset contains the following features:
76
+ - **`image`**: The image of the formula (either printed or handwritten).
77
+ - **`latex`**: The corresponding LaTeX code representing the formula.
78
+
79
+ ### Splits
80
+
81
+ The dataset is split into three subsets for easier use in machine learning workflows:
82
+
83
+ | Split | Number of Examples | Size (bytes) |
84
+ |-------------|---------------------|--------------------|
85
+ | **Train** | 377,163 | 1,638,732,362.625 |
86
+ | **Validation** | 125,721 | 545,374,827.875 |
87
+ | **Test** | 125,722 | 544,914,564.75 |
88
+
89
+ ### Configurations
90
+
91
+ The dataset includes a default configuration with the following data files:
92
+ - Train: `data/train-*`
93
+ - Validation: `data/validation-*`
94
+ - Test: `data/test-*`
95
+
96
+ ---
97
+
98
+ ## Dataset Creation
99
+
100
+ ### Curation Rationale
101
+
102
+ The **Pix2Tex Dataset** was created to address the need for diverse, high-quality datasets for training Vision-Language Models (VLMs) that can extract LaTeX from mathematical formula images. By including both printed and handwritten formulas, the dataset provides a robust benchmark for real-world applications.
103
+
104
+ ### Source Data
105
+
106
+ #### Data Collection and Processing
107
+
108
+ The dataset was created by combining two existing datasets:
109
+ - One dataset containing printed formula images with their LaTeX annotations.
110
+ - Another dataset containing handwritten formula images with their LaTeX annotations.
111
+
112
+ Both datasets were preprocessed to ensure consistency in column naming and annotation quality. The resulting dataset was split into training, validation, and test sets.
113
+
114
+ #### Who are the source data producers?
115
+
116
+ The source data was collected from publicly available datasets and curated for the specific purpose of LaTeX extraction tasks.
117
+
118
+ ---
119
+
120
+ ## Bias, Risks, and Limitations
121
+
122
+ ### Risks and Limitations
123
+
124
+ - The dataset includes a mix of printed and handwritten formulas, which might introduce variability in performance for models trained solely on one type of input.
125
+ - The handwritten formulas may contain noise due to variations in handwriting styles, potentially challenging OCR tasks.
126
+
127
+ ### Recommendations
128
+
129
+ Users are advised to preprocess the dataset and evaluate models on both printed and handwritten subsets to better understand their performance across different input types.
130
+
131
+ ---
132
+
133
+ ## Citation
134
+
135
+ If you use this dataset in your research or projects, please cite it as follows:
136
+
137
+
138
+ ## Glossary
139
+
140
+ - **Vision-Language Models (VLMs)**: Machine learning models that combine visual and textual inputs to perform tasks such as image-to-text generation.
141
+ - **LaTeX**: A typesetting system commonly used for mathematical and scientific documents.
142
+
143
+ ---
144
+
145
+ ## Dataset Card Contact
146
+
147
+ For any questions or feedback, feel free to contact:
148
+ - **Hugging Face Profile:** [anindya-hf-2002](https://huggingface.co/anindya-hf-2002)
data/test-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35d1d2a6904d3bcd82a562044c24d633b18852ffd4a68ff243e63e436c516330
3
+ size 245965912
data/test-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6adce8c4d15a460a4a9552a6d37b62c02f801a80550d69f235ba995ad323cfc2
3
+ size 246973493
data/train-00000-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c4072d7067018ecbfd0fefb680d8d0ee64e76321e0af4c7e067436860b9386b
3
+ size 368791002
data/train-00001-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89cc58f144fc4497ada7c0336463c881b934a23f24263a917a35c96621989e9a
3
+ size 370623722
data/train-00002-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:121ee339fa59c2cd022e4f9ab6bf79b4e455264c68e5b512dcc2183b7a332606
3
+ size 372692948
data/train-00003-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d4928e27fa54bb5b3f8f5a89c81d72e1f0491d5859af682552128abefbca404
3
+ size 370572194
data/validation-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:365104afbf4adecf4c79c0a5a3490f20a3a452a4da1612097f3ffc64a5e602cc
3
+ size 246798584
data/validation-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02e4c799021182a4026d96c8bb2737eec289f5f278c711ba5af6521a0d3580c2
3
+ size 246528786