A simple LaTeX OCR package
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_latex_ocr-0.0.9.tar.gz.
File metadata
- Download URL: simple_latex_ocr-0.0.9.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dd635d80f413263da040b986585aea97181f332b3ad0a3d5797d1145cbb57d5
|
|
| MD5 |
a331eb0be847f02bd6a4c1bfb96aa20d
|
|
| BLAKE2b-256 |
fecf0a44a09b6b098ec818b32c519429a252eff9fb56241f304bd053336bdeb5
|
File details
Details for the file simple_latex_ocr-0.0.9-py3-none-any.whl.
File metadata
- Download URL: simple_latex_ocr-0.0.9-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4bdb46db36c1b42699ca1e6c7224e6cb32fd5b40f78c8a378c6af77d13a5790
|
|
| MD5 |
a09779a4605358d415452ab858525f78
|
|
| BLAKE2b-256 |
0d35f9ecf9f0912f66e2e7e1a95aa0b12756aa9c4b6b67aabde0f8b078dfb93f
|