/ Модель

Характеристики

Лицензия
AGPL 3.0
Библиотека
onnx
Опубликована
3 ноя 2026

formula-recognition-onnx

Описание изображенийИзображение → текст5 профессий
0скачиваний за 30 дней0лайковвеса обновлены3 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

ONNX-модель PDFluent распознаёт отображаемые математические формулы на изображениях и преобразует их в LaTeX для PDF-to-Markdown-конвейеров.

PDFluent Formula Recognition — модель для распознавания отображаемых математических формул на изображениях и преобразования их в LaTeX. Разработчики PDFluent подготовили её в формате ONNX для локального инференса и интеграции в SDK PDFluent, где формулы можно включать в Markdown как блоки $$...$$ и использовать в конвейерах преобразования PDF в Markdown и подготовки документов для RAG.

Модель принимает тесно обрезанное изображение одной формулы в оттенках серого и выдаёт последовательность токенов LaTeX. Обработка изображения и декодирование реализованы в SDK; для самостоятельного использования доступны encoder.onnx, decoder.onnx и vocab.json. Обучающие примеры получены из статей arXiv с лицензиями CC BY 4.0 и CC0 1.0; авторы сообщают о сравнении с другими движками на опубликованном бенчмарке, но результат зависит от условий оценки.

Модель рассчитана на отображаемые формулы, а не на встроенные в строку выражения; поиск формул на странице выполняет SDK. Точные результаты не гарантируются: ошибки вероятны для незнакомой нотации, необычных шрифтов и плохих сканов. Метаданные указывают лицензию AGPL-3.0, а README также предлагает коммерческую лицензию PDFluent.

Сценарии применения

  • Преобразование вырезанных формул из PDF в LaTeX
  • Вставка отображаемых формул в Markdown при разборе научных статей
  • Подготовка формул из PDF для последующего поиска и RAG
  • Локальное распознавание математических формул через ONNX Runtime

Ограничения

Модель распознаёт только отображаемые формулы в плотном кадрировании; поиск областей с формулами выполняет SDK. Результат может содержать ошибки, особенно при незнакомой нотации, необычных шрифтах и низком качестве скана.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

PDFluent Formula Recognition (ONNX): Math Formula to LaTeX for PDF to Markdown

Convert cropped images of PDF display math formulas into LaTeX with this ONNX model. For developers building PDF-to-Markdown and RAG pipelines, it plugs into the PDFluent SDK. PDFluent 1.3.0 ranks above every engine on the published opendataloader-bench leaderboard (as of 3 November 2026)*. Formulas output as $$...$$ blocks in your Markdown.

*Overall score 0.9168 (quality="auto", keep_furniture=True, Linux) against the engines listed in the benchmark README on 3 November 2026; submitted as pull request #37 (https://github.com/opendataloader-project/opendataloader-bench/pull/37). Other engines have submissions open that are not yet on the leaderboard.

Use it in two lines

pip install pdfluent
pdfluent models install formula
import pdfluent; print(pdfluent.open("paper.pdf").extract_markdown(formula_model=True))  # display formulas appear as $$...$$

The formula model is off by default. The command above installs it and the flag switches it on.

Inspect the ONNX files without the SDK

With plain onnxruntime, to load the three files and inspect the interface:

import json
import onnxruntime as ort

encoder = ort.InferenceSession("encoder.onnx")
decoder = ort.InferenceSession("decoder.onnx")
vocab = json.load(open("vocab.json"))["tokens"]

for name, sess in (("encoder", encoder), ("decoder", decoder)):
    print(name, [(i.name, i.shape, i.type) for i in sess.get_inputs()])
    print(name, [(o.name, o.shape, o.type) for o in sess.get_outputs()])

Image preprocessing and the decoding loop are implemented in the SDK. If you drive the model yourself, decode greedily from <bos> (id 1) until <eos> (id 2) and map ids back to LaTeX tokens with vocab.json.

What you get

  • ONNX files (encoder.onnx, decoder.onnx, vocab.json) for local inference
  • LaTeX output in $$...$$ for Markdown compatibility
  • Direct integration into PDFluent SDK parsing workflows
  • Training provenance file listing all arXiv source papers
  • Licence choice: AGPL-3.0-only or PDFluent Commercial Licence

Inputs and outputs

The model takes a greyscale image of a formula and its width as input. It outputs token ids mapped to LaTeX via the vocabulary. In the PDFluent SDK 1.3.0, enable it with pdfluent models install formula and formula_model=True in extract_markdown. The SDK wraps the LaTeX in $$ ... $$ in the Markdown output.

GraphNameTypeShape
encoder inimagefloat321 x 1 x 64 x 768
encoder inwidthint641
encoder outmemoryfloat321 x 96 x 256
encoder outmaskbool1 x 96
decoder intokensint641 x 202
decoder inmemory, maskfrom encoderas above
decoder outlogitsfloat321 x 202 x 587

Training data and provenance

Training data comes from arXiv papers under CC BY 4.0 and CC0 1.0, excluding CC BY-SA. Formulas were cropped from aligned ground truth, re-rendered with open fonts, and degraded to resemble scans. All training papers are listed with their licence, title, authors and source URL in PROVENANCE.md, which also serves as the CC BY attribution list. Held-out evaluation papers were not used for training.

Provenance: PROVENANCE.md. Digests of the three weight files are in SHA256SUMS; the files are byte-identical to the formula package in the models-v1 release of the SDK.

Limitations

  • Off by default in the SDK.
  • Most formulas are not reproduced exactly.
  • Errors are likely on unfamiliar notation, unusual fonts and poor scans.
  • Display formulas only, no inline formulas.
  • Input must be a tight crop of one formula; layout detection is handled by the SDK.

Licence in plain words

Model weights are AGPL-3.0-only or available under the PDFluent Commercial Licence. AGPL works for open-source projects. Closed-source products or those avoiding AGPL obligations need the commercial licence. Details at https://pdfluent.com/license.

Try PDFluent

Run pip install pdfluent, install the formula model and watch display formulas in your own papers come out as LaTeX. See the SDK at github.com/pdfluent/pdfluent-sdk and docs at pdfluent.com/docs.

Citation

@misc{pdfluent_formula_recognition_onnx_2026,
  author       = {{Innovation Trigger B.V.}},
  title        = {PDFluent formula recognition (ONNX): formula-own-v1},
  year         = {2026},
  publisher    = {Hugging Face},
  url          = {https://huggingface.co/PDFluent/formula-recognition-onnx},
  note         = {PDFluent, https://pdfluent.com}
}

Links

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · onnx

Нельзя запустить

Модель выложена только в формате ONNX, рантайм загружает PyTorch-веса.

Ревизия весов
cfb8f29

0 моделей