feature-retrieval
Feature extraction, retrieval descriptors, matching, and HDF5 feature/match formats for hloc.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- feature-retrieval
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Feature extraction, retrieval descriptors, matching, and HDF5 feature/match formats for hloc.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/api-and-cli.md16.6 KB
- 参考文档references/hdf5-feature-match-formats.md8.8 KB
- 参考文档references/troubleshooting.md10.5 KB
03 SKILL.md 正文
Feature Retrieval for Hierarchical-Localization
Use this sub-skill when a task needs hloc feature files, global retrieval descriptor files, retrieval pairs, sparse match files, dense LoFTR-derived match files, or guidance for choosing built-in extractor/matcher configurations.
Route here for
- Local feature extraction with
hloc.extract_features.main,ImageDataset, andextract_features.confs. - Global image retrieval descriptors from the extractor configs
dir,netvlad,openibl, ormegaloc, followed byhloc.pairs_from_retrieval.main. - Sparse matching with
hloc.match_features.main, including SuperGlue, LightGlue, nearest-neighbor, and AdaLAM config families. - Dense/semi-dense matching with
hloc.match_dense.mainand LoFTR config families. - HDF5 feature, global descriptor, and match file naming/schema diagnostics.
Route elsewhere
- SfM reconstruction, triangulation, pair generation beyond retrieval descriptors, and localization execution: use
../mapping-localization/. - Benchmark/dataset pipeline scripts and large dataset preparation: use
../dataset-pipelines/. - Implementing custom extractors/matchers or exporting external feature/match files: use
../custom-interop/.
Start with these references
- Read
references/api-and-cli.mdfor verified signatures, CLI options, exact built-in config names, output naming, and config-family selection. - Read
references/hdf5-feature-match-formats.mdbefore reading or writing.h5feature, global descriptor, or match files. - Read
references/troubleshooting.mdwhen extraction, retrieval, matching, model download, CUDA/CPU, or HDF5 schema errors occur. - Run
scripts/inspect_hloc_configs.pyin the user's active Python environment to list available installed configs without running neural models.
Minimal safe patterns
Extract local features
from pathlib import Path
from hloc import extract_features
images = Path("images")
outputs = Path("outputs")
feature_conf = extract_features.confs["superpoint_aachen"]
feature_path = extract_features.main(feature_conf, images, outputs)
# Usually: outputs / "feats-superpoint-n4096-r1024.h5"
Extract global descriptors and produce retrieval pairs
from pathlib import Path
from hloc import extract_features, pairs_from_retrieval
images = Path("images")
outputs = Path("outputs")
retrieval_conf = extract_features.confs["netvlad"]
descriptor_path = extract_features.main(retrieval_conf, images, outputs)
pairs = outputs / "pairs-netvlad.txt"
pairs_from_retrieval.main(descriptor_path, pairs, num_matched=20)
Match sparse features for a pairs file
from pathlib import Path
from hloc import extract_features, match_features
outputs = Path("outputs")
pairs = outputs / "pairs-netvlad.txt"
feature_conf = extract_features.confs["superpoint_aachen"]
matcher_conf = match_features.confs["superglue"]
feature_path = outputs / f"{feature_conf['output']}.h5"
match_path = match_features.main(matcher_conf, pairs, feature_conf["output"], outputs)
# Usually: outputs / "feats-superpoint-n4096-r1024_matches-superglue_pairs-netvlad.h5"
Match with dense LoFTR
from pathlib import Path
from hloc import match_dense
images = Path("images")
outputs = Path("outputs")
pairs = outputs / "pairs-netvlad.txt"
dense_conf = match_dense.confs["loftr_aachen"]
features_path, matches_path = match_dense.main(dense_conf, pairs, images, export_dir=outputs)
Do not assume a feature or match path from memory: compute it from the selected config and pair-file stem, or pass explicit paths via the Python API.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.