kingyiusuen/image-to-latex
A PyTorch-based model that takes images of LaTeX math equations and generates corresponding LaTeX source code using a ResNet-18 encoder and Transformer decoder.

This repository implements an image-to-markup system that converts images of LaTeX formulas into editable LaTeX code. The model uses a ResNet-18 CNN encoder with 2D positional encoding to extract visual features from input images, which are then decoded by a Transformer to produce LaTeX markup. Trained on the arXiv LaTeX dataset of approximately 100K rendered math equations. The model has approximately 3 million parameters and is provided with a Streamlit web interface for end-to-end inference.
Frequently asked
- What is kingyiusuen/image-to-latex?
- A PyTorch-based model that takes images of LaTeX math equations and generates corresponding LaTeX source code using a ResNet-18 encoder and Transformer decoder.
- Is image-to-latex open source?
- Yes — kingyiusuen/image-to-latex is open source, released under the MIT license.
- What language is image-to-latex written in?
- kingyiusuen/image-to-latex is primarily written in Python.
- How popular is image-to-latex?
- kingyiusuen/image-to-latex has 2.2k stars on GitHub.
- Where can I find image-to-latex?
- kingyiusuen/image-to-latex is on GitHub at https://github.com/kingyiusuen/image-to-latex.