AGENT SKILL

custom-interop

Support custom HLoc features, retrieval descriptors, match files, modules, and data-format interoperability.

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

01 前言 Front Matter

name
custom-interop
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Support custom HLoc features, retrieval descriptors, match files, modules, and data-format interoperability.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

custom-interop

Use this sub-skill when the user already has, or wants to create, non-standard inputs for HLoc: externally computed local features, global image descriptors, sparse match files, custom PyTorch extractors or matchers, query/image/retrieval/pose lists, or an interoperability validator before routing into HLoc workflows.

Route here for

  • Supplying local feature HDF5 files instead of running a built-in extractor.
  • Supplying global descriptor HDF5 files for retrieval pair generation.
  • Supplying sparse match HDF5 files instead of running a built-in matcher.
  • Adding a custom extractor or matcher module that follows HLoc's BaseModel and dynamic_load contracts.
  • Checking pair names, image/query lists, retrieval files, pose result files, and HDF5 schema compatibility.

Route elsewhere

  • To choose or run built-in feature, retrieval, sparse matching, or dense matching configurations, load sibling feature-retrieval.
  • To reconstruct, triangulate, generate mapping/localization pairs, or localize queries from validated artifacts, load sibling mapping-localization.
  • To plan Aachen, InLoc, 4Seasons, 7Scenes, CMU, Cambridge, RobotCar, or other benchmark-scale dataset procedures, load sibling dataset-pipelines.

Operating flow

  1. Identify whether the user is extending HLoc with a Python module or exporting external artifacts.

  2. For Python modules/configs, follow references/extension-guide.md for BaseModel, dynamic_load, module naming, default_conf, required_inputs, and config dictionary rules.

  3. For external files, follow references/data-formats.md for feature, global descriptor, match, retrieval, list, and pose schemas.

  4. Validate candidate artifacts before using them downstream:

    python sub-skills/custom-interop/scripts/validate_hloc_formats.py \
      --features outputs/features.h5 \
      --matches outputs/matches.h5 \
      --retrieval pairs-query-db.txt \
      --image-list queries_with_intrinsics.txt
    

    Add --strict when files are intended for HLoc sparse matching and should contain all matcher-friendly fields such as image_size and matching_scores0.

  5. If validation passes, route the next step to feature-retrieval for retrieval-pair generation or built-in matching, or to mapping-localization for SfM/localization.

  6. If validation fails, use references/troubleshooting.md to map symptoms to likely schema, naming, parser, or custom-module contract errors.

Quick decisions

  • Prefer exporting HDF5 artifacts when the user's model is not PyTorch-based, cannot be cleanly imported into the hloc.extractors or hloc.matchers namespaces, or already runs in another framework.
  • Prefer a custom module when the user wants to call hloc.extract_features.main, hloc.match_features.main, or the corresponding CLIs with a reusable named config.
  • Always keep image names consistent across image lists, feature groups, retrieval pairs, match groups, SfM model image names, and localization queries. A single slash, prefix, or basename mismatch is enough to make downstream code report missing images, missing pairs, or absent HDF5 groups.

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