Simple-LaTeX-OCR
Performance
| BLEU score | normed edit distance | token accuracy |
|---|---|---|
| 0.92 | 0.05 | 0.75 |
Online experience
https://huggingface.co/spaces/chaodreaming/Simple-LaTeX-OCR
https://www.modelscope.cn/studios/chaodreaming/Simple-LaTeX-OCR/summary
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
Using flask you can copy the formula directly
python flask_app.py
Contribution
Contributions of any kind are welcome.
Acknowledgment
Code taken and modified from lukas-blecher, RapidAI,ultralytics
Metadata
Release files for simple-latex-ocr 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simple_latex_ocr-0.0.9.tar.gz | 18.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_latex_ocr-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.5 kB
Release files / simple_latex_ocr-0.0.9.tar.gz
| Download URL | simple_latex_ocr-0.0.9.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1dd635d80f413263da040b986585aea97181f332b3ad0a3d5797d1145cbb57d5
|
|
BLAKE2b-256 checksum How to use checksums |
fecf0a44a09b6b098ec818b32c519429a252eff9fb56241f304bd053336bdeb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|
Release files / simple_latex_ocr-0.0.9-py3-none-any.whl
| Download URL | simple_latex_ocr-0.0.9-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4bdb46db36c1b42699ca1e6c7224e6cb32fd5b40f78c8a378c6af77d13a5790
|
|
BLAKE2b-256 checksum How to use checksums |
0d35f9ecf9f0912f66e2e7e1a95aa0b12756aa9c4b6b67aabde0f8b078dfb93f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|