← all repositories

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.

2.2k stars Python Computer VisionML Frameworks
image-to-latex
Velocity · 7d
+1.2
★ / day
Trend
steady
star history

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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.