Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
export-convert【部署与运维】Guides AdelaiDet checkpoint key conversion, optimizer stripping, FCOS/BlendMask weight migration, ONNX export, and optional deployment-runtime caveats.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task asks to convert AdelaiDet checkpoints, rename FCOS/BlendMask keys, remove optimizer state, export an AdelaiDet model to ONNX, or reason about optional Caffe/NCNN/TensorRT deployment paths.
centerness keys to ctrness.adet._C. Use ../setup-build/SKILL.md.../train-eval/SKILL.md.../demo-visualize/SKILL.md.../data-prep/SKILL.md.../text-spotting/SKILL.md.references/export-and-checkpoints.md for checkpoint utility behavior.references/onnx-export.md for export constraints and optional runtime validation.../../references/compatibility.md before mixing export tools with a different PyTorch/Detectron2 stack.scripts/convert_fcos_weight.py — convert official FCOS ResNet/FPN naming into AdelaiDet/Detectron2 naming.scripts/rename_blendmask_weights.py — rename BlendMask centerness keys to ctrness.scripts/strip_checkpoint_optimizer.py — save only the model state from a checkpoint.scripts/export_onnx.py — validated wrapper around the repository ONNX exporter.Confirm base setup with ../../scripts/check_install.py --cuda-ops.
For checkpoint key errors, run the relevant small conversion script on a copy of the checkpoint.
For ONNX export, dry-run first:
python scripts/export_onnx.py --repo-root /path/to/AdelaiDet \
--config configs/FCOS-Detection/R_50_1x.yaml \
--weights /path/to/model.pth --output output/model.onnx --dry-run
Remove --dry-run only after config, weights, device, and output path are correct.
Validate exported ONNX with the runtime stack required by the downstream target; do not assume Caffe/NCNN/TensorRT are installed.
train-eval.setup-build or train-eval depending on the traceback.