ocr
Routes LayoutParser OCR wrappers, response parsing, and text aggregation workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- ocr
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Routes LayoutParser OCR wrappers, response parsing, and text aggregation workflows.
- disable-model-invocation
- true
02 资源文件 1
- 参考文档references/guide.md3.7 KB
03 SKILL.md 正文
OCR
Use this sub-skill when the task is about extracting text from images or parsing saved OCR responses into LayoutParser objects.
What belongs here
TesseractAgentandTesseractFeatureTypeGCVAgentandGCVFeatureType- OCR response loading, saving, and aggregation
- live OCR setup, credentials, and language selection
What does not belong here
- Layout detection model inference: use
layout-models - Geometry or reading-order logic after OCR: use
layout-objects - Box/text rendering: use
visualization - PDF or JSON/CSV loading: use
layout-io
Read these files
references/guide.mdfor agent behavior, aggregation levels, and troubleshooting notes../layout-objects/SKILL.mdwhen you need to group or sort OCR blocks../visualization/SKILL.mdwhen you need to render OCR output
Fast path
- Decide whether the task needs live OCR or only saved-response parsing.
- Use Tesseract for local OCR and GCV for Google Cloud Vision workflows.
- Confirm the backend package and host dependency before constructing the agent.
- Aggregate at the required level before post-processing the OCR output.
- Keep saved responses when you need deterministic follow-up tests.
Common user requests
- "Use Tesseract OCR on this image"
- "Parse a saved Google Vision response"
- "Group the OCR output by line"
- "Load OCR results back into LayoutParser"
- "Set the custom Tesseract binary path"
Minimal smoke
The environment inspector confirms the optional OCR backends and the local
tesseract binary:
python ../../scripts/inspect_backends.py
Failure clues
pkg_resourcesmissing after installing GCV usually means the setuptools build is not compatible withgoogle-cloud-vision==1.- Missing
tesseractbinary means the Python wrapper is present but live OCR cannot run. - Missing credentials mean the GCV live API path is not ready.
- If the output text changes across runs, use a saved response instead of live OCR for tests.
Output discipline
When answering, name the OCR engine, the language or credential assumption, and the desired aggregation level. If the task only needs saved-response parsing, say so explicitly so future agents do not over-install the runtime.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).