Parses images, PDFs, or directories into markdown with LaTeX formulas, tables, and bounding boxes using baidu/Unlimited-OCR locally — free, offline, no API key.
Ships in unlimited-ocr. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
baidu/Unlimited-OCR (MIT, arXiv 2606.23050) is a 3B-total /
500M-activated MoE document parser. It reads a page image and returns markdown with LaTeX
mathematics, tables, and a <|det|> bounding box for every block it found.
Self-Evolving Skill: improves through use. Every number below was MEASURED on this hardware, not copied from a README — provenance in
../../references/EMPIRICAL.md. If a measurement drifts, a flag stops working, or a new failure mode appears, fix this file and the references immediately rather than deferring. Re-verify before changing a documented fact.
Free OCR. is the only prompt mode that worksOf the three prompt modes the upstream project documents, two are broken on MLX and both are refused by this CLI with exit 2 and a printed reason:
| Mode | Measured behaviour |
|---|---|
free-ocr | works — correct output with layout boxes in 2.4 s. The default. |
document-parsing | decodes parsing.parsing.parsing… until max_tokens. This is the prompt the upstream README documents. |
multi-page | deterministically hallucinates the word industrydocuments onto a single image. |
--allow-withheld-prompt-mode forces one anyway. They are kept nameable rather than deleted so the
failures stay reproducible.
This CLI sends one image per forward pass, always. The model's headline multi-page capability is deliberately unused — a five-page single-pass run dropped a page with no error, which is the worst failure mode there is for an archive. Per-page is slower and verifiable.
S=~/eon/cc-skills/plugins/unlimited-ocr/scripts/unlimited_ocr.py
# Which backends does this machine actually have?
uv run --no-project $S doctor
# One image -> markdown on stdout
uv run --no-project $S parse --input page.png
# A PDF -> one .md per page, plus a JSON report, rendered at 300 DPI
uv run --no-project $S parse --input paper.pdf --output ./out
# A directory of images, machine-readable, with math repaired for cross-model comparison
uv run --no-project $S parse --input ./images --format json --collapse-math-spacing --quiet
# Just the prose: strip the layout markers
uv run --no-project $S parse --input page.png --strip-det
# The CLI contract itself, as JSON (the SSoT an agent should introspect)
uv run --no-project $S spec
uv run reads the script's PEP 723 header and materialises its own dependencies. There is nothing
to install and no virtualenv to manage.
<|det|>equation [249, 82, 699, 202]<|/det|>\[
c u r p d f = t r i a n g (l o w, h i g h, v o l)
\]
[x0, y0, x1, y1] normalised to 0–1000 on BOTH axes, independent of the
real aspect ratio. Verified: a box of y1=909 on a 211-pixel-tall image. The CLI also emits
pixel coordinates in --format json.equation, title, text, chart, header, page_footnote,
page_number, image. The taxonomy is not documented upstream; treat any new value as valid.c u r p d f, not curpdf. In LaTeX math mode
those render identically, so it is not wrong, but it is not byte-identical to any other model's
output either. Pass --collapse-math-spacing to rejoin it. This matters enormously if you are
comparing transcriptions across models: without it, every formula scores as a disagreement.--backend auto (default) prefers MLX, then CUDA.
| Apple Silicon (MLX) | NVIDIA (transformers) | |
|---|---|---|
| Model | mlx-community/Unlimited-OCR-mxfp8 (3.66 GB) | baidu/Unlimited-OCR (6.67 GB bf16) |
| Measured on | M3 Max, 36 GB | RTX 4090, 24 GB, Ada SM 8.9 |
| Single image | 2.4 s, 5.2 GB peak | 3.7 s, 8.3 GB peak VRAM |
| Multi-page | per page, one call each | 1.5 s/page synthetic, 11 s/page dense academic |
| Determinism | greedy, T=0 | byte-identical on re-run |
Do not follow the upstream SGLang instructions on an Ada GPU. They specify
--attention-backend fa3; FlashAttention-3 requires Hopper (SM 9.0). The transformers path needs
no backend flag and is what these numbers come from. doctor reports compute capability and says
so explicitly.
It does not describe charts. It localises them and transcribes nothing inside. On a nine-panel
matplotlib figure it emitted nine perfectly-placed chart boxes and zero characters — not even the
panel titles, which were plainly legible. That is correct behaviour for a layout parser and a nasty
surprise if you expected an image captioner.
If you need the content of a chart, use
unlimited-ocr-segment-figure to crop each panel and
hand the crops to a model that does describe images.
The model writes tables as HTML <table>, never as pipe-markdown. Measured over 103 real
tables: 88 came back as <table> markup and 15 as prose; none as pipe-markdown. The CLI converts
them for you — --table-format defaults to pipe; pass --table-format html to keep the model's
own serialization. Pipe-markdown is suitable for concatenating into markdown
documents and for comparing against other readers (M3, GLM-4.6v) which emit pipe-markdown natively.
Other limits, all with evidence, in ../../references/PITFALLS.md:
degenerate repetition, multi-page page-dropping, and why "Unlimited" is not unlimited.
| Code | Meaning |
|---|---|
0 | parsed; no degenerate repetition detected |
1 | parsed, but repetition suspected in at least one output — inspect before trusting it |
2 | usage or input error, including the refused prompt mode |
Exit 1 is not a crash and not a success. The CLI detects loops structurally (a short chunk repeating in the tail), so a NEW loop is caught, not just the known one.
After this skill completes, check before closing:
references/PITFALLS.md § 3; the measured base rate is ~4 % on tables.What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/unlimited-ocr-batch-folderBatch parse a folder of PDFs and images to markdown with LaTeX, tables, and layout boxes using baidu/Unlimited-OCR locally — with checkpoint/resume, incremental writes, and per-file repetition detection. Use when processing a large folder of scanned documents or research papers, when you need results written incrementally to survive interruption, or when extracting equations and tables from a document collection. TRIGGERS - batch ocr, ocr a folder, batch parse documents, parse multiple pdfs, folder to markdown, extract formulas from folder, ocr multiple files, batch document extraction, document collection parsing, checkpoint resume./unlimited-ocr-segment-figureSplit a composite figure, screenshot, or dashboard into its individual panels by cropping the layout bounding boxes Unlimited-OCR detects, so each panel can be described separately by a vision model that is good at charts. Turns Unlimited-OCR's refusal to transcribe charts into a pre-processing win — one chart per prompt beats a nine-panel collage per prompt. Use when a vision model is misreading a dense multi-panel image, when you need per-figure crops from a paper or report, or when building a two-stage OCR pipeline that localises first and describes second. TRIGGERS - segment figure, split panels, crop charts from image, multi-panel figure, extract subfigures, per-panel description, layout segmentation, chart crops, split a screenshot into regions, dashboard panels, figure extraction./unlimited-ocr:unlimited-ocr-parse-documentfrom unlimited-ocr
npx claudepluginhub terrylica/cc-skills --plugin unlimited-ocrOther plugins' skills for the same job