AGENT SKILL

custom-training-and-data

Prepare ImageAI 3.x custom training datasets, conversion helpers, trainer calls, and artifact handoff guidance.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
custom-training-and-data
license
MIT
metadata
{ "disco-role": "operating" }
description
Prepare ImageAI 3.x custom training datasets, conversion helpers, trainer calls, and artifact handoff guidance.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Custom Training and Data

Use this operating sub-skill when the task is to prepare data or start custom ImageAI 3.x training for either:

  • custom image classification with ClassificationModelTrainer; or
  • custom YOLOv3 / TinyYOLOv3 object detection with DetectionModelTrainer.

Do not use this sub-skill to run inference with the produced artifacts. After training, route classification inference to the classification-workflows sub-skill, custom image detection to object-detection-workflows, and custom video detection to video-detection-workflows.

Route by user intent

User intent Use this file first Then use
Check whether a classification dataset is trainable references/data-formats.md and scripts/validate_imageai_dataset.py --task classification references/troubleshooting.md for failures
Check whether a YOLO detection dataset is trainable references/data-formats.md and scripts/validate_imageai_dataset.py --task detection references/training-workflows.md for trainer setup
Convert Pascal VOC XML detection data to ImageAI 3.x YOLO txt layout scripts/pascal_voc_to_yolo.py Validate the generated output before training
Train custom classification references/training-workflows.md Route generated .pt + classes JSON to classification-workflows
Train custom detection references/training-workflows.md Route generated .pt + detection config JSON to object-detection-workflows or video-detection-workflows
Resolve stale ImageAI 2.x / TensorFlow-era parameters references/troubleshooting.md Use current PyTorch 3.x signatures only

Current ImageAI 3.x constraints

  • ImageAI 3.x uses the PyTorch backend for the active package path.
  • .h5 TensorFlow-era pretrained or custom models are not accepted by the current trainer/inference extension checks; use .pt or .pth weights.
  • Stale parameters such as enhance_data, num_objects for classification training, loadModel(num_objects=...), speed modes, and standalone detection evaluateModel() belong to older TensorFlow-era docs and must not be passed to the current PyTorch APIs.
  • pycocotools is not part of the current custom YOLO training path covered by this sub-skill.

Bundled helpers

Run helpers from this sub-skill directory or pass absolute dataset paths from outside. The helper scripts do not import ImageAI and do not start model training.

python scripts/validate_imageai_dataset.py --task classification --dataset-dir path/to/dataset --strict
python scripts/validate_imageai_dataset.py --task detection --dataset-dir path/to/dataset --strict
python scripts/pascal_voc_to_yolo.py --dataset-dir path/to/voc-dataset --output-dir path/to/yolo-dataset

The converter writes classes.txt; use that class order as object_names_array for DetectionModelTrainer.setTrainConfig(...).

Verification boundary

Safe checks for this sub-skill are dataset validation, Pascal VOC conversion on tiny fixtures, import/signature checks, and artifact-name reasoning. Full custom training is compute- and asset-dependent; do not claim it was cheaply verified unless a real dataset, release/pretrained weights if needed, and a bounded GPU or CPU training run were actually supplied and executed.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351