{"id":18273592,"url":"https://github.com/rapidai/rapidlatexocr","last_synced_at":"2025-05-15T11:02:56.683Z","repository":{"id":181233493,"uuid":"665997566","full_name":"RapidAI/RapidLaTeXOCR","owner":"RapidAI","description":"Formula recognition based on LaTeX-OCR and ONNXRuntime.","archived":false,"fork":false,"pushed_at":"2024-11-03T14:41:54.000Z","size":99,"stargazers_count":343,"open_issues_count":1,"forks_count":32,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-21T18:49:17.881Z","etag":null,"topics":["equation","im2text","image-processing","img2latex","latex","latex-ocr","math-formula","math-formula-recognition","math-ocr","ocr","onnxruntime","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RapidAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":"https://raw.githubusercontent.com/RapidAI/.github/6db6b6b9273f3151094a462a61fbc8e88564562c/assets/Sponsor.png"}},"created_at":"2023-07-13T13:20:25.000Z","updated_at":"2025-04-18T05:54:48.000Z","dependencies_parsed_at":"2023-12-09T04:20:39.843Z","dependency_job_id":"c6453cd8-5b01-40e9-a1a3-69c17df7ab3c","html_url":"https://github.com/RapidAI/RapidLaTeXOCR","commit_stats":null,"previous_names":["rapidai/rapidlatexocr"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAI%2FRapidLaTeXOCR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAI%2FRapidLaTeXOCR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAI%2FRapidLaTeXOCR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAI%2FRapidLaTeXOCR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RapidAI","download_url":"https://codeload.github.com/RapidAI/RapidLaTeXOCR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328385,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["equation","im2text","image-processing","img2latex","latex","latex-ocr","math-formula","math-formula-recognition","math-ocr","ocr","onnxruntime","python"],"created_at":"2024-11-05T12:06:59.599Z","updated_at":"2025-05-15T11:02:56.614Z","avatar_url":"https://github.com/RapidAI.png","language":"Python","funding_links":["https://raw.githubusercontent.com/RapidAI/.github/6db6b6b9273f3151094a462a61fbc8e88564562c/assets/Sponsor.png","https://www.buymeacoffee.com/SWHL"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cdiv align=\"center\"\u003e\n   \u003ch1\u003e\u003cb\u003eRapid ⚡︎ LaTeX OCR\u003c/b\u003e\u003c/h1\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\u0026nbsp;\u003c/div\u003e\n\n\u003ca href=\"https://huggingface.co/spaces/SWHL/RapidLaTeXOCRDemo\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/%F0%9F%A4%97 Hugging Face-Demo-blue\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.modelscope.cn/studios/liekkas/RapidLatexOCRDemo/summary\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/魔搭-Demo-blue\"\u003e\u003c/a\u003e\n\u003ca href=\"https://aistudio.baidu.com/application/detail/23590\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/百度AI%20Studio-Demo-blue\"\u003e\u003c/a\u003e\n\u003ca href=\"\"\u003e\u003cimg src=\"https://img.shields.io/badge/Python-\u003e=3.6,\u003c3.13-aff.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"\"\u003e\u003cimg src=\"https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pepy.tech/project/rapid_latex_ocr\"\u003e\u003cimg src=\"https://static.pepy.tech/personalized-badge/rapid_latex_ocr?period=total\u0026units=abbreviation\u0026left_color=grey\u0026right_color=blue\u0026left_text=Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/rapid_latex_ocr/\"\u003e\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/rapid_latex_ocr\"\u003e\u003c/a\u003e\n\u003ca href=\"https://semver.org/\"\u003e\u003cimg alt=\"SemVer2.0\" src=\"https://img.shields.io/badge/SemVer-2.0-brightgreen\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n### Introduction\n\n`rapid_latex_ocr` is a tool to convert formula images to latex format.\n\n**The reasoning code in the repo is modified from [LaTeX-OCR](https://github.com/lukas-blecher/LaTeX-OCR), the model has all been converted to ONNX format, and the reasoning code has been simplified, Inference is faster and easier to deploy.**\n\nThe repo only has codes based on `ONNXRuntime` or `OpenVINO` inference in onnx format, and does not contain training model codes. If you want to train your own model, please move to [LaTeX-OCR](https://github.com/lukas-blecher/LaTeX-OCR).\n\nIf it helps you, please give a little star ⭐ or sponsor a cup of coffee (click the link in Sponsor at the top of the page)\n\n🔥 Model Conversion Notes 👉 [ConvertLaTeXOCRToONNX](https://github.com/SWHL/ConvertLaTeXOCRToONNX)\n\n### [Online Demo](https://swhl-rapidlatexocrdemo.hf.space)\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/RapidAI/RapidLatexOCR/releases/download/v0.0.0/demo.gif\" width=\"100%\" height=\"100%\"\u003e\n\u003c/div\u003e\n\n### Framework\n\n```mermaid\nflowchart LR\n\nA(Preprocess Formula\\n ProcessLaTeXFormulaTools) --\u003e B(Train\\n LaTeX-OCR) --\u003e C(Convert \\n ConvertLaTeXOCRToONNX) --\u003e D(Deploy\\n RapidLaTeXOCR)\n\nclick A \"https://github.com/SWHL/ProcessLaTeXFormulaTools\" _blank\nclick B \"https://github.com/lukas-blecher/LaTeX-OCR\" _blank\nclick C \"https://github.com/SWHL/ConvertLaTeXOCRToONNX\" _blank\nclick D \"https://github.com/RapidAI/RapidLaTeXOCR\" _blank\n```\n\n### Installation\n\u003e\n\u003e [!NOTE]\n\u003e When installing the package through pip, the model file will be automatically downloaded and placed under models in the installation directory.\n\u003e\n\u003e If the Internet speed is slow, you can download it separately through [Google Drive](https://drive.google.com/drive/folders/1e8BgLk1cPQDSZjgoLgloFYMAQWLTaroQ?usp=sharing) or [Baidu NetDisk](https://pan.baidu.com/s/1rnYmmKp2HhOkYVFehUiMNg?pwd=dh72).\n\n```bash\npip install rapid_latex_ocr\n```\n\n### Usage\n\n#### Used by python script\n\n```python\nfrom rapid_latex_ocr import LaTeXOCR\n\nmodel = LaTeXOCR()\n\nimg_path = \"tests/test_files/6.png\"\nwith open(img_path, \"rb\") as f:\n    data = f.read()\n\nres, elapse = model(data)\n\nprint(res)\nprint(elapse)\n```\n\n#### Used by command line\n\n```bash\n$ rapid_latex_ocr tests/test_files/6.png\n\n# {\\\\frac{x^{2}}{a^{2}}}-{\\\\frac{y^{2}}{b^{2}}}=1\n# 0.47902780000000034\n```\n\n### Code Contributors\n\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://github.com/RapidAI/RapidLatexOCR/graphs/contributors\"\u003e\n    \u003cimg src=\"https://contrib.rocks/image?repo=RapidAI/RapidLatexOCR\" width=\"20%\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n### Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n### [Sponsor](https://swhl.github.io/RapidVideOCR/docs/sponsor/)\n\nIf you want to sponsor the project, you can directly click the **Buy me a coffee** image, please write a note (e.g. your github account name) to facilitate adding to the sponsorship list below.\n\n\u003cdiv align=\"left\"\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/SWHL\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/RapidAI/.github/main/assets/buymeacoffe.png\" width=\"30%\" height=\"30%\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n### License\n\nThis project is released under the [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidai%2Frapidlatexocr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapidai%2Frapidlatexocr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidai%2Frapidlatexocr/lists"}