Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two recipes for Fugu OCR, a small OCR for financial and business documents:
fugu-ocr.pyl4x1fugu-ocr-cpu.pycpu-upgradeMeasured on 3 December 2026 over the 4,999 page images of
docling-project/DocLayNet-v1.2(test split), 0 errors; the CPU figure from sixcpu-upgradejobs side by side.What is different from most recipes here
data/shard-*/withid,page,markdown(plain text; a table row's label and figures on one line),fugu_ocr(the page's JSON: line boxes in PDF points, confidences, table rows) anderror, like the-saturate.pyrecipes. Re-running the same command skips finished parts.--shard i/Nfor running N jobs side by side; each job streams only its own files of the dataset (falls back to every N-th row, with a log line, when the dataset has fewer files than jobs).--pdfsreads a dataset repo of PDF files. A page's own text is taken where a spot check against its picture agrees, and only its pictures and pages without usable text are OCR'd (--ocr-onlyturns this off).--charts(beta) adds the values of charts drawn in the PDF.fugu-ocr.pyexits with a message when there is no GPU, pointing tofugu-ocr-cpu.py.Licence: the model weights are PolyForm Internal Use 1.0.0 or PolyForm Noncommercial 1.0.0 (free to run inside your own organisation, including commercially; not open source). Stated in the README row,
models.jsonand the script docstrings.Checks run: both scripts on HF Jobs (the final version smoke-tested on
cpu-upgradeoveruv-scripts/ocr-demo, 7 pages, 0 errors; earlier versions (l4x1,a10g-small,a10g-large,cpu-upgrade×6) over the DocLayNet test split and onuv-scripts/ocr-demo;python3 tools/build-catalog.py --verify-modelspasses with no command warnings. Folder changes are additive.models.jsonlists both asexperimental.The recipes are also kept in the project repo: https://github.com/fugu-ai/fugu-ocr/tree/main/deploy/hf_jobs