data-preparation
Prepare, inspect, and troubleshoot MMOCR dataset conversion and data layouts for text detection, recognition, spotting, and KIE.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-preparation
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Prepare, inspect, and troubleshoot MMOCR dataset conversion and data layouts for text detection, recognition, spotting, and KIE.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/data-formats-and-datasets.md8.8 KB
- 参考文档references/data-preparation-workflows.md8.4 KB
- 参考文档references/troubleshooting.md6.9 KB
- 脚本scripts/mmocr_dataset_preflight.py14.2 KB
03 SKILL.md 正文
MMOCR Data Preparation
Use this sub-skill when the task is about OCR dataset preparation rather than model training, inference, or low-level data-sample internals. It covers MMOCR annotation schemas, dataset-zoo metadata, task-specific conversion choices, recognition LMDB handling, generated dataset configs, and safe preflight checks.
Start here
-
Read data formats and datasets to choose between
textdet,textrecog,textspotting, andkieand to verify the annotation shape expected by MMOCR. -
Run the bundled no-download preflight before any conversion or training:
python scripts/mmocr_dataset_preflight.py --list python scripts/mmocr_dataset_preflight.py --dataset icdar2015 --task textdetPass
--dataset-zoo-path <dataset_zoo>when checking a project-local or private dataset-zoo directory. -
Read data preparation workflows before planning official dataset preparation, private dataset-zoo entries, LMDB recognition data, generated config placement, or visualization.
-
Read troubleshooting when a dataset/task is unsupported, a converter wants network access, split selection is wrong, configs are not overwritten, images/annotations do not resolve, LMDB loading fails, text encodings are broken, KIE labels are inconsistent, or a dataset browser has no display.
Route here for
- Choosing
--task textdet,textrecog,textspotting, orkiefor a public or private OCR dataset. - Inspecting dataset-zoo names, task coverage, license metadata, split support, and generated config names.
- Preparing MMOCR JSON annotations with
data_list,img_path,bbox,polygon,text,ignore, andmetainfofields. - Planning recognition crops, dictionaries, and optional LMDB output.
- Debugging
data_root,data_prefix,ann_file, and pipeline loader interactions before training/evaluation. - Treating dataset visualization as an optional, reference-only sanity check.
Route elsewhere
- Training/evaluation command construction, config inheritance, runner flags, metrics, checkpoints, and distributed launch: use training-evaluation-configs.
- Inferencer calls, prediction outputs, visualization outputs from inference, and OCR pipeline inference: use ocr-inference.
- DataSample class internals, registries, model components, transforms beyond loader compatibility, dictionaries as model components, and custom component extension: use model-api-components.
Source-script policy
- The bundled
scripts/mmocr_dataset_preflight.pyis the safe default. It only reads metadata or tiny annotations and never downloads datasets. - The official unified dataset preparer can download, extract, move, delete, and write configs. Use its CLI semantics only after the user approves data, network, storage, and overwrite behavior.
- Dataset-specific converters and dataset browsing utilities are reference-only for this sub-skill: distill their behavior into a plan, keep sample counts tiny, and do not depend on GUI or large downloads for validation.
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).