A desktop application which takes an image of math formula and return corresponding LaTeX code.
This project used the following open source projects:
- Mathematical Formula Recognition Model (MFR): breezedeus/pix2text-mfr (For formula recognition)
- Imgui: ocornut/imgui (For GUI)
- chromium embedded framework: chromiumembedded/cef (For rendering math formula in html)
- Katex: Khan/KaTeX (For rendering math formula)
- zeromq: zeromq/libzmq (For inter-process communication)
- Download the release version from Releases
- Run the executable file
- Capture an image of the math formula into clipboard (shift + win + S on windows platform)
- Click the "Convert formula from clipboard" button and wait for the result
- Copy the Tex result to the clipboard.
This application is really quick dirty hack based on hendradarwin/imgui cef-support branch. It's not a well-structured project.
build step:
- Clone the project
- install python dependencies: follow the instructions from hugging face
pip install pyinstaller
- step into example_sdl_opengl2 folder, run
python export_onnx.py
to save the onnx model in local folder - run
pyinstaller texocr_pix2tex.spec
to package up the python script and onnx model - download
cef_binary_3.3578.1860.g36610bd
version cef prebuild archive from Chromium Embedded Framework (CEF) Automated Builds, and unzip it intothirdparty/cef
- use cmake build the project with vcpkg
- copy the packaged texocr_pix2tex program into target build folder
- hotkey
- support rendering math formula in other font
- support other platforms
- trim down the dependencies and python package size
This project is licensed under the MIT License - see the LICENSE.txt file for details.