model-zoo-and-apis
Select pytorch-semseg model architectures, instantiate safe segmentation models, and inspect API registries.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- model-zoo-and-apis
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Select pytorch-semseg model architectures, instantiate safe segmentation models, and inspect API registries.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/api-reference.md9.9 KB
- 参考文档references/troubleshooting.md6.4 KB
- 脚本scripts/smoke_model_registry.py8.8 KB
03 SKILL.md 正文
model-zoo-and-apis
Use this sub-skill when the user needs to choose a pytorch-semseg architecture id, instantiate a segmentation model through the package API, inspect registries for losses/optimizers/schedulers/augmentations, or debug model/API import failures.
Route here
- Choose among model ids:
fcn32s,fcn16s,fcn8s,unet,segnet,pspnet,icnet,icnetBN,linknet,frrnA,frrnB. - Build a
ptsemseg.models.get_model(model_dict, n_classes, version=None)payload. - Instantiate a no-download architecture for import/API smoke testing.
- Inspect
loss,optimizer,scheduler,augmentation,runningScore,averageMeter, orconvert_state_dictAPIs. - Explain FCN/SegNet VGG weight-download side effects, FRRN A/B ambiguity, protobuf/caffe import errors, model shape errors, and DataParallel state-dict prefixes.
Route elsewhere
- Dataset layouts, dataset keys, filesystem paths, and YAML schema validation: use
data-and-configs. train.pyorvalidate.pycommand execution, checkpoint training/evaluation, and metric interpretation from full runs: usetraining-and-evaluation.test.pysingle-image CLI, checkpoint filename parsing for inference, palette decoding, and DenseCRF: usesingle-image-inference.
Safe workflow
-
Read
references/api-reference.mdfor model ids, verified constructor signatures, registry keys, and safe examples. -
Run the bundled registry helper from an environment where
ptsemsegis importable:python scripts/smoke_model_registry.py --list-only -
For a no-download CPU model smoke, prefer explicit FRRN payloads:
python scripts/smoke_model_registry.py --smoke --model-id frrnA --n-classes 2 --height 64 --width 64 -
If the user requests
frrnAorfrrnB, always includemodel_type: "A"ormodel_type: "B"in themodel_dict; the registry maps both ids to the same constructor. -
Do not call
get_modelforfcn32s,fcn16s,fcn8s, orsegnetmerely to test imports unless the user accepts thetorchvision.models.vgg16(pretrained=True)weight-cache/network side effect. -
Use
references/troubleshooting.mdwhen imports fail, unknown keys are reported, small tensors fail in deep models, or checkpoints containmodule.prefixes.
Bundled files
references/api-reference.md— verified signatures, registry tables, examples, and API caveats.references/troubleshooting.md— failure-mode matrix and fixes.scripts/smoke_model_registry.py— safe argparse helper for registry listing and optional FRRN CPU smoke.
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).