Skip to main content

UniMERNet: A Universal Network for Real-World Mathematical Expression Recognition

Project description

UniMERNet: A Universal Network for Real-World Mathematical Expression Recognition

Paper Hugging Face Spaces

This is the official repository for UniMERNet, a math recogition model that can be used for image to LaTeX conversion for a wide range of senarios.

Project page: https://gitlab.pjlab.org.cn/fdc/mllm/unimernet

Installation

conda create -n unimernet python=3.10

conda activate unimernet

pip install unimernet

For Mac

brew install freetype imagemagick
export MAGICK_HOME=/opt/homebrew/opt/imagemagick

Quickstart

python demo.py

or

jupyter-lab ./demo.ipynb

Training

To train or finetune UniMERNet model, run

torchrun --nproc-per-node 4 --master_port 29500 train.py --cfg-path configs/unimernet_train.yaml

or

bash scripts/train.sh

Evaluation

To evalate the model, run

python test.py --cfg configs/unimernet_eval.yaml

Performance Comparison (BLEU) with SOTA Methods.

BLEU

Visualization Result with Different Methods.

Visualization

Citation

If you find our models / code / papers useful in your research, please consider giving ⭐ and citations 📝, thx :)


Acknowledgement

Contact us

If you have any questions, comments or suggestions, please do not hesitate to contact us at wangbin@pjlab.org.cn.

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

unimernet-0.0.4-py2.py3-none-any.whl (2.2 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page