MathLLMs/Img2Code

Dataset

24

stars

15

commits

1

linked in READMEs

Oct 11, 2025

updated

Charts
Diagrams
Figures
Geometry
Graphs
Math
Plots
Tables

README

MathCoder-VL: Bridging Vision and Code for Enhanced Multimodal Mathematical Reasoning

Repo: https://github.com/mathllm/MathCoder

Paper: https://huggingface.co/papers/2505.10557

Introduction

We introduce MathCoder-VL, a series of open-source large multimodal models (LMMs) specifically tailored for general math problem-solving. We also introduce FigCodifier-8B, an image-to-code model.

Usage

from PIL import Image
from io import BytesIO
from datasets import load_dataset

dataset = load_dataset("parquet", data_files="MathLLMs/Img2Code/TikZ/train-00000-of-00020.parquet", split="train")
print(dataset)
print(dataset[0])
img = Image.open(BytesIO(dataset[0]['image']))
img.show()

Distribution

We randomly extracted 1% samples from our Img2Code data and manually classified them. As shown in the table below, we observe that plane geometry images constitute the largest portion (approximately 48.6%), with triangle-related images making up 14.19%. Various chart types (13.0%) are the second-largest category.

CategorySubcategoryPercentage
Plane Geometry (48.6%)Triangle-related14.19%
Quadrilateral-related11.74%
Circle-related9.77%
Line-related5.12%
Other7.79%
Solid Geometry (4.5%)4.53%
Analytical Geometry (7.9%)7.91%
Charts & Plots (13.0%)Bar Chart5.12%
Line Graph5.35%
Pie Chart1.05%
Scatter Plot0.47%
Box Plot0.23%
3D Plot0.81%
Function-related Figures (4.7%)4.65%
Diagrams (4.5%)Flow Chart1.74%
Relationship Diagram2.79%
Equations & Texts (7.9%)7.91%
Tables (2.7%)2.67%
Grid-based Graphs (3.8%)3.84%
Other Figures (2.3%)2.33%

Citation

Please cite the paper if you use our data, model or code.

@inproceedings{
wang2025mathcodervl,
title={MathCoder-{VL}: Bridging Vision and Code for Enhanced Multimodal Mathematical Reasoning},
author={Ke Wang and Junting Pan and Linda Wei and Aojun Zhou and Weikang Shi and Zimu Lu and Han Xiao and Yunqiao Yang and Houxing Ren and Mingjie Zhan and Hongsheng Li},
booktitle={The 63rd Annual Meeting of the Association for Computational Linguistics},
year={2025},
url={https://openreview.net/forum?id=nuvtX1imAb}
}


@inproceedings{
wang2024mathcoder,
title={MathCoder: Seamless Code Integration in {LLM}s for Enhanced Mathematical Reasoning},
author={Ke Wang and Houxing Ren and Aojun Zhou and Zimu Lu and Sichun Luo and Weikang Shi and Renrui Zhang and Linqi Song and Mingjie Zhan and Hongsheng Li},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=z8TW0ttBPp}
}

Contributors

scikkk

15 commits

MathLLMs/Img2Code

Dataset

24

stars

15

commits

1

linked in READMEs

Oct 11, 2025

updated

Charts
Diagrams
Figures
Geometry
Graphs
Math
Plots
Tables

README

MathCoder-VL: Bridging Vision and Code for Enhanced Multimodal Mathematical Reasoning

Repo: https://github.com/mathllm/MathCoder

Paper: https://huggingface.co/papers/2505.10557

Introduction

We introduce MathCoder-VL, a series of open-source large multimodal models (LMMs) specifically tailored for general math problem-solving. We also introduce FigCodifier-8B, an image-to-code model.

Usage

from PIL import Image
from io import BytesIO
from datasets import load_dataset

dataset = load_dataset("parquet", data_files="MathLLMs/Img2Code/TikZ/train-00000-of-00020.parquet", split="train")
print(dataset)
print(dataset[0])
img = Image.open(BytesIO(dataset[0]['image']))
img.show()

Distribution

We randomly extracted 1% samples from our Img2Code data and manually classified them. As shown in the table below, we observe that plane geometry images constitute the largest portion (approximately 48.6%), with triangle-related images making up 14.19%. Various chart types (13.0%) are the second-largest category.

CategorySubcategoryPercentage
Plane Geometry (48.6%)Triangle-related14.19%
Quadrilateral-related11.74%
Circle-related9.77%
Line-related5.12%
Other7.79%
Solid Geometry (4.5%)4.53%
Analytical Geometry (7.9%)7.91%
Charts & Plots (13.0%)Bar Chart5.12%
Line Graph5.35%
Pie Chart1.05%
Scatter Plot0.47%
Box Plot0.23%
3D Plot0.81%
Function-related Figures (4.7%)4.65%
Diagrams (4.5%)Flow Chart1.74%
Relationship Diagram2.79%
Equations & Texts (7.9%)7.91%
Tables (2.7%)2.67%
Grid-based Graphs (3.8%)3.84%
Other Figures (2.3%)2.33%

Citation

Please cite the paper if you use our data, model or code.

@inproceedings{
wang2025mathcodervl,
title={MathCoder-{VL}: Bridging Vision and Code for Enhanced Multimodal Mathematical Reasoning},
author={Ke Wang and Junting Pan and Linda Wei and Aojun Zhou and Weikang Shi and Zimu Lu and Han Xiao and Yunqiao Yang and Houxing Ren and Mingjie Zhan and Hongsheng Li},
booktitle={The 63rd Annual Meeting of the Association for Computational Linguistics},
year={2025},
url={https://openreview.net/forum?id=nuvtX1imAb}
}


@inproceedings{
wang2024mathcoder,
title={MathCoder: Seamless Code Integration in {LLM}s for Enhanced Mathematical Reasoning},
author={Ke Wang and Houxing Ren and Aojun Zhou and Zimu Lu and Sichun Luo and Weikang Shi and Renrui Zhang and Linqi Song and Mingjie Zhan and Hongsheng Li},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=z8TW0ttBPp}
}

Contributors

scikkk

15 commits