AGENT SKILL

extension-projects

Extend Detectron2 with registries, configurable model components, custom trainers, and optional project packages without over-installing optional stacks.

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

01 前言 Front Matter

name
extension-projects
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Extend Detectron2 with registries, configurable model components, custom trainers, and optional project packages without over-installing optional stacks.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Detectron2 Extension Projects

Use this sub-skill when a task asks you to add or debug a Detectron2 extension: custom registries, custom backbones, ROI heads, meta-architectures, configurable components, trainer subclasses, or the bundled research-project packages under detectron2.projects.

Read First

  • For registry and config-extension patterns, read references/extension-patterns.md.
  • For custom model component interfaces, read references/model-components.md.
  • For bundled and optional research projects, read references/projects-overview.md.
  • For extension failures and diagnosis, read references/troubleshooting.md.
  • To smoke-test registry mechanics without building or training a model, run python scripts/registry_smoke_check.py from this sub-skill directory or copy the script into a scratch workspace.

Choose This Sub-Skill For

  • Registering or diagnosing BACKBONE_REGISTRY, ROI_HEADS_REGISTRY, META_ARCH_REGISTRY, SEM_SEG_HEADS_REGISTRY, PROPOSAL_GENERATOR_REGISTRY, or related model component registries.
  • Wiring custom classes into Yacs configs through names such as MODEL.BACKBONE.NAME, MODEL.ROI_HEADS.NAME, or MODEL.META_ARCHITECTURE.
  • Deciding whether to register a component, construct it with explicit arguments, or use @configurable plus from_config.
  • Subclassing DefaultTrainer to customize build_model, build_optimizer, build_train_loader, build_evaluator, hooks, or test-time behavior.
  • Loading or diagnosing installed project packages such as detectron2.projects.point_rend, detectron2.projects.deeplab, and detectron2.projects.panoptic_deeplab.

Boundaries

  • For dataset registration, mappers, metadata, and dataloaders, use the data/config owning sub-skill.
  • For standard training, launch, checkpoints, evaluation, and inference execution, use the training/inference owning sub-skills.
  • For export/deployment details, use the deployment owning sub-skill.
  • Treat DensePose, TensorMask, TridentNet, ViTDet, MViTv2, PointSup, and other research projects as optional examples unless the environment explicitly includes their dependencies and the user asks for that stack.

Working Checklist

  1. Identify the extension seam: model component registry, full meta-architecture, explicit constructor override, trainer hook/classmethod, or project config adder.
  2. Import the module that performs registration before asking a builder or registry to resolve a string name.
  3. Add project config keys before merging a project config or setting project-specific options.
  4. Match the builder's expected signature, input feature names, and ShapeSpec contracts.
  5. Keep optional project dependencies opt-in; do not install broad extras unless the requested project requires them and the user approves.
  6. Use the bundled smoke script to validate registry behavior before debugging heavier model/data/training code.

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