#337 · Primary category: Computer Vision

image-to-latex

computer-vision deep-learning encoder-decoder end-to-end-machine-learning latex pytorch streamlit-webapp transformer

Convert images of LaTex math equations into LaTex code.

Project last updated:10/04/22

GitHub Stars

2.2K

Forks

311

Contributors

1

License

MIT

Why we included this project

Anyone who writes LaTeX by hand knows the chore of retyping a formula from a screenshot or PDF. This project automates that: it runs the image through a ResNet encoder and a Transformer decoder and outputs LaTeX source instead of a flat OCR string, so the result keeps the structure between symbols rather than just naming them. Because the decoder generates a token sequence with attention, it handles things like nested fractions and subscripts that plain character recognition tends to mangle. The repo includes a Streamlit app for dropping in an image and copying out the code, and the README documents the training pipeline and preprocessing choices closely enough to double as a reference for building similar image-to-markup models. With roughly three million parameters, it is also a compact end-to-end encoder-decoder example that is easy to follow.

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