技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
pytorch-semseg【数据与研究】Use pytorch-semseg for PyTorch semantic segmentation model selection, config/data preparation, training and validation planning, single-image inference, and legacy compatibility troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task involves the ptsemseg package or the historical pytorch-semseg semantic-segmentation workflows: FCN, U-Net, SegNet, PSPNet, ICNet, LinkNet, FRRN, dataset YAML configs, training/validation entry points, single-image mask inference, or legacy dependency errors.
Confirm the user is working with pytorch-semseg or an equivalent checkout/package that exposes ptsemseg.
Read references/repo-provenance.md when deciding whether this skill matches the current repository snapshot or should be refreshed.
Read references/compatibility.md before installing dependencies, adapting old scripts, or promising exact legacy reproduction.
Run the bundled environment check when imports or backend support matter:
python scripts/check_environment.py
python scripts/check_environment.py --smoke
The environment check is safe by default: it imports packages, reports torch/CUDA visibility, flags protobuf/SciPy/DenseCRF hazards, and optionally runs a tiny no-download FRRN CPU smoke.
| User task | Read this |
|---|---|
| Choose a model id, instantiate a model, inspect losses/optimizers/schedulers/augmentations/metrics, or debug registry/API failures. | sub-skills/model-zoo-and-apis/SKILL.md |
| Write or validate a YAML config, choose dataset loader keys/splits, check data layout, or explain config drift. | sub-skills/data-and-configs/SKILL.md |
| Plan training or validation commands, reason about checkpoints/logs/metrics, or avoid expensive data-bound runs. | sub-skills/training-and-evaluation/SKILL.md |
| Build or debug one-image segmentation inference commands, output mask writing, checkpoint filename parsing, or DenseCRF. | sub-skills/single-image-inference/SKILL.md |
| Diagnose install/import/backend issues that cut across workflows. | references/troubleshooting.md and references/compatibility.md |
This snapshot exposes ptsemseg but may not behave like a modern packaged project. A future agent should first make ptsemseg importable from the user's selected package or checkout, then verify:
python - <<'PY'
from ptsemseg.models import get_model
from ptsemseg.loader import get_loader
print(get_model)
print(get_loader('pascal'))
PY
If importing ptsemseg.models fails with a generated protobuf descriptor error, read references/compatibility.md before changing package versions. If tensorboardX, pydensecrf, or legacy SciPy image helpers are missing, route to the workflow-specific troubleshooting reference instead of installing broad extras blindly.
fcn32s, fcn16s, fcn8s, unet, segnet, pspnet, icnet, icnetBN, linknet, frrnA, and frrnB.pascal, camvid, ade20k, mit_sceneparsing_benchmark, cityscapes, nyuv2, sunrgbd, and vistas.l_rate/l_schedule, unsafe img_rows/img_cols: same, Pascal SBD pitfalls, and registry typos.module. prefixes, and CPU/CUDA expectations.pydensecrf.get_model may request pretrained VGG weights. Use FRRN or other no-download checks for routine smoke tests unless weight downloads/cache access are allowed.