Skip to content

Large scale training of Latex formula recognition model, currently being organized and open source

License

Notifications You must be signed in to change notification settings

chaodreaming/Simple-LaTeX-OCR

Repository files navigation

Simple-LaTeX-OCR

Performance

BLEU score normed edit distance token accuracy
0.92 0.05 0.75

Online experience

Install the package simple_latex_ocr:

pip install simple_latex_ocr

Use from within Python

from simple_latex_ocr.models import Latex_OCR
model = Latex_OCR()
img_path = "tests/test_files/5.png"
result = model.predict(img_path)
print(result['formula'])
print(result['confidence'])
print(result['elapse'])

Used by command line

$ simple_latex_ocr tests/test_files/2.png

Used by api

$ python -m simple_latex_ocr.api.run

#You can use test.py to initiate a request for verification

Using streamlit has a nice interface, but you can only select files locally.

streamlit run streamlit_app.py

img.png

A simple interface for uploading files can be used to edit the results using latexlive.```

python flask_app.py

img_1.png

Contribution

Contributions of any kind are welcome.

Acknowledgment

Code taken and modified from lukas-blecher, RapidAI,ultralytics

About

Large scale training of Latex formula recognition model, currently being organized and open source

Resources

License

Stars

Watchers

Forks

Packages

No packages published