Skip to content
Agentmart
Submit a tool

doctr

Use python-doctr (docTR) for OCR/KIE inference, document IO/export, model customization, datasets/training/evaluation, CLI helpers, deployment, and…

Skill by VectorSpaceLab

IndexedApache-2.0★ 341
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/vectorspacelab-doctr

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use python-doctr (docTR) for OCR/KIE inference, document IO/export, model customization, datasets/training/evaluation, CLI helpers, deployment, and troubleshooting.

Use cases: documents, ml

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/doctr

What's inside

Skill name
doctr
Description
Use python-doctr (docTR) for OCR/KIE inference, document IO/export, model customization, datasets/training/evaluation, CLI helpers, deployment, and troubleshooting.
License
Apache-2.0
Metadata
disco-role: operating
Instructions
66 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (35)

  • SKILL.md
  • package-overview.md · references/
  • repo-provenance.md · references/
  • repo-routing-metadata.json · references/
  • troubleshooting.md · references/
  • doctr_env_check.py · scripts/
  • SKILL.md · sub-skills/cli-and-scripts/
  • cli-reference.md · sub-skills/cli-and-scripts/references/
  • script-adaptations.md · sub-skills/cli-and-scripts/references/
  • troubleshooting.md · sub-skills/cli-and-scripts/references/
  • doctr_batch_ocr.py · sub-skills/cli-and-scripts/scripts/
  • doctr_cli_env.py · sub-skills/cli-and-scripts/scripts/
  • doctr_quick_ocr.py · sub-skills/cli-and-scripts/scripts/
  • SKILL.md · sub-skills/core-ocr-and-kie/
  • ocr-kie-workflows.md · sub-skills/core-ocr-and-kie/references/
  • troubleshooting.md · sub-skills/core-ocr-and-kie/references/
  • ocr_api_smoke.py · sub-skills/core-ocr-and-kie/scripts/
  • SKILL.md · sub-skills/datasets-training-and-evaluation/
  • data-formats.md · sub-skills/datasets-training-and-evaluation/references/
  • evaluation-and-training.md · sub-skills/datasets-training-and-evaluation/references/
  • training-scripts.md · sub-skills/datasets-training-and-evaluation/references/
  • troubleshooting.md · sub-skills/datasets-training-and-evaluation/references/
  • validate_doctr_labels.py · sub-skills/datasets-training-and-evaluation/scripts/
  • SKILL.md · sub-skills/deployment-and-contrib/
  • api-and-demo.md · sub-skills/deployment-and-contrib/references/
  • contrib-and-hub.md · sub-skills/deployment-and-contrib/references/
  • troubleshooting.md · sub-skills/deployment-and-contrib/references/
  • SKILL.md · sub-skills/document-io-and-exports/
  • io-and-export-reference.md · sub-skills/document-io-and-exports/references/
  • troubleshooting.md · sub-skills/document-io-and-exports/references/
  • inspect_document_export.py · sub-skills/document-io-and-exports/scripts/
  • SKILL.md · sub-skills/models-and-customization/
  • model-catalog-and-customization.md · sub-skills/models-and-customization/references/
  • optimization-and-export.md · sub-skills/models-and-customization/references/
  • troubleshooting.md · sub-skills/models-and-customization/references/

SKILL.md (first lines)

# docTR repo skill

Use this skill when a task involves **python-doctr / docTR**: document OCR, key information extraction, text detection/recognition, layout or table parsing, docTR datasets, model customization, command-line OCR, optional deployment surfaces, or docTR-specific errors.

This is a router. Keep detailed work in the linked sub-skills and references.

## Quick install and import check

Typical install commands:

```bash
pip install python-doctr
pip install "python-doctr[viz,html,contrib]"  # only when visualization, HTML input, or contrib ONNXRuntime helpers are needed
```

Minimal import/metadata check:

```bash
python - <<'PY'
from importlib.metadata import version
import doctr
from doctr.io import DocumentFile
from doctr.models import ocr_predictor
print("python-doctr", version("python-doctr"), "doctr", doctr.__version__)
print(DocumentFile, ocr_predictor)
PY
```

Run [scripts/doctr_env_check.py](scripts/doctr_env_check.py) for a safe package/CLI/backend diagnostic before debugging installation, optional extras, CUDA/MPS, or entry-point problems.

## Route by task

| User task | Read |
|---|---|
| End-to-end OCR or KIE with `ocr_predictor` / `kie_predictor`, rotation/layout/table flags, device/batch choices, or output sanity checks | [sub-skills/core-ocr-and-kie/SKILL.md](sub-skills/core-ocr-and-kie/SKILL.md) |
| Loading PDFs/images/URLs/arrays; interpreting `Document`, `Page`, `KIEDocument`, reading order, JSON/text/XML/Markdown/HTML exports, or table grids | [sub-skills/document-io-and-exports/SKILL.md](sub-skills/document-io-and-exports/SKILL.md) |
| Choosing standalone model factories, supported architectures, custom weights, vocabs/whitelists, Hugging Face Hub, ONNX export, half precision, `torch.compile`, CUDA/MPS | [sub-skills/models-and-customization/SKILL.md](sub-skills/models-and-customization/SKILL.md) |
| Dataset schemas, built-in/custom datasets, synthetic generators, transforms, validation, training/evaluation/latency contracts, metrics, DDP/GPU caveats | [sub-skills/datasets-training-and-evaluation/SKILL.md](sub-skills/datasets-training-and-evaluation/SKILL.md) |
| Installed `doctr-cli`, single-document/batch OCR command helpers, output files, parser defaults, and CLI/script troubleshooting | [sub-skills/cli-and-scripts/SKILL.md](sub-skills/cli-and-scripts/SKILL.md) |
| Optional FastAPI/Streamlit/Docker deployment, `doctr.contrib`, `ArtefactDetector`, optional extras, or Hugging Face publishing/loading | [sub-skills/deployment-and-contrib/SKILL.md](sub-skills/deployment-and-contrib/SKILL.md) |

## Read shared references

- [references/package-overview.md](references/package-overview.md) for package metadata, dependency extras, public modules, CLI entry point, and evidence-backed scope.
- [references/troubleshooting.md](references/troubleshooting.md) for cross-cutting install/import, optional dependency, model-cache, file-format, backend, and routing failures.
- [references/repo-provenance.md](references/repo-provenance.md) before deciding whether this skill is current for another checkout or whether to run `refresh-repo-skill`.

## Operating rules

- Prefer public package APIs and bundled helpers in this skill tree. Do not require future agents to open or run original repo docs, notebooks, scripts, tests, or checkout paths.
- Treat `pretrained=False` as shape/API smoke mode only; random-weight OCR is not meaningful.
- Treat `pretrained=True` and many default backbones as possible first-use network/cache events. Confirm the user's offline/network policy before running them.
- CPU is enough for required package and skill verification. CUDA/MPS are optional acceleration paths unless the user explicitly needs GPU performance, half precision, DDP, or a device-specific issue.
- Install optional extras only for selected tasks: `viz` for `show()`/interactive plotting, `html` for URL/HTML input, `contrib` for ONNXRuntime-backed contrib utilities.
- For training/evaluation, validate labels and run one-sample/one-batch checks before launching long jobs. This skill distills training contracts but does not bundle heavyweight training scripts.
- For services, Docker, Hub push, downloads, credentials, or long-running GPU work, stop and confirm permissions/resources before executing.

## Common first actions

- OCR a file in Python: use `DocumentFile.from_pdf()` or `DocumentFile.from_images()`, build `ocr_predictor(pretrained=True)`, run `result = predictor(doc)`, then inspect `result.render()` or `result.export()`.
- Offline API smoke: use the core OCR sub-skill's `ocr_api_smoke.py` with no pretrained weights.
- CLI JSON OCR: use `doctr-cli --input_path INPUT --output results.json` when model downloads are allowed; use the bundled CLI helper with `--no-pretrained` only for parser/API smoke.
- Validate custom labels: use `sub-skills/datasets-training-and-evaluation/scripts/validate_doctr_labels.py` before training or evaluation.
- Diagnose install/backend: run `scripts/doctr_env_check.py --json`.

From VectorSpaceLab/AREX-Skill, Apache-2.0.

More from VectorSpaceLab/AREX-Skill

Signals

Stars
341
Forks
26
Open issues
0
Last commit (this folder)
Aug 26, 2026 (2 months ago)
Last release
Sep 2, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from VectorSpaceLab

Cite this page

doctr skill. Agent Mart. https://agentmart.dev/skills/vectorspacelab-doctr (last updated 2026-10-24)