Simple-LaTeX-OCR

我要开发同款
匿名用户2024年07月31日
31阅读
所属分类ai、其他
开源地址https://modelscope.cn/models/chaodreaming/Simple-LaTeX-OCR

作品详情

Simple-LaTeX-OCR

The encoder is resnetv2+simplevit, the decoder is transformer, the attention mechanism uses flashattention2.0 from pytorch2.0, and the dataset size is 112 million

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

Contribution

Contributions of any kind are welcome.

Acknowledgment

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

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论