技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-training【数据与研究】Prepare Pytorch-UNet segmentation datasets and training runs, including data layout validation, CLI flags, checkpoints, W&B, CUDA, and AMP decisions.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about preparing image/mask data or running a Pytorch-UNet training job for semantic segmentation.
data/imgs and data/masks dataset for the stock training code.<id>_mask.<ext> versus generic masks named <id>.<ext>.train.py commands and explaining --epochs, --batch-size, --learning-rate, --load, --scale, --validation, --amp, --bilinear, and --classes.UNet(n_channels, n_classes, bilinear), decoder shape details, or checkpoint architecture mismatches outside a training workflow; route to model-api.prediction-evaluation.Read references/data-formats.md to confirm the dataset naming convention, mask suffix, scale, and mask-value expectations.
Run the bundled layout validator before expensive training:
python scripts/validate_dataset_layout.py --images data/imgs --masks data/masks --scale 0.5
Run this command from this sub-skill directory, or call the script by its copied path inside the generated skill tree.
Add --carvana when masks use the Carvana _mask suffix.
Read references/cli-reference.md to assemble the exact train.py command.
Read references/training-workflows.md for checkpoint, W&B, CUDA/AMP, and resume/fine-tune decisions.
If the validator or training loop fails, read references/troubleshooting.md and fix the data or command before retrying.
scripts/validate_dataset_layout.py is a no-network Python checker. It prints JSON and checks the flat folder contract, hidden-file handling, pair matching, optional Carvana suffixes, duplicate IDs, scale bounds, image/mask size equality, and sampled or full mask values without importing W&B or starting training.
scripts/training_cli_wrapper.py is a dry-run-first wrapper for a user-provided Pytorch-UNet checkout. Use it to preview the underlying train.py command and only pass --execute after the user approves training cost, W&B behavior, checkpoint writes, and backend use.