#44 · Primary category: Computer Vision

LaTeX-OCR

dataset deep-learning im2latex im2markup im2text image-processing image2text latex latex-ocr machine-learning math-ocr ocr python pytorch transformer vision-transformer vit

pix2tex: Using a ViT to convert images of equations into LaTeX code.

Project last updated:01/18/25

GitHub Stars

16.5K

Forks

1.3K

Contributors

23

License

MIT

Why we included this project

Math-heavy writing in LaTeX or Markdown usually means retyping formulas you've seen elsewhere, which is tedious and error-prone. LaTeX-OCR (pix2tex) skips that step: point it at a screenshot or photo of an equation and it returns compilable LaTeX, using a vision transformer encoder paired with a transformer decoder. The pip package gives you several ways in: a command-line tool that handles image files or clipboard content, a PyQt5 GUI that grabs a screen region and copies the rendered result to your clipboard, and a small API with a Docker image for embedding in your own tools. It also preprocesses images to pick a sensible resolution, which helps when the input is a real-world photo rather than a clean render. Since the output is plain LaTeX, it drops straight into document pipelines and note-taking workflows, and the included training scripts let you fine-tune it on your own formula styles if the pretrained weights don't cover what you need.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category