4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

Update hloc and add new matcher types (#2658)

* Update hloc and add new matcher types

* Update dockerfile comment to better reflect what the command is doing

---------

Co-authored-by: mfischer <michael.fischer@spleenlab.ai>
This commit is contained in:
Alexandru Kis 2023-12-08 18:58:51 +02:00 committed by GitHub
parent 4c966b9bd4
commit 1d9cc7dd8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 4 deletions

View File

@ -135,9 +135,10 @@ RUN git clone --branch v0.4.0 --recursive https://github.com/colmap/pycolmap.git
python3.10 -m pip install . && \
cd ..
# Install hloc master (last release (1.3) is too old) as alternative feature detector and matcher option for nerfstudio.
# Install hloc 1.4 as alternative feature detector and matcher option for nerfstudio.
RUN git clone --branch master --recursive https://github.com/cvg/Hierarchical-Localization.git && \
cd Hierarchical-Localization && \
git checkout v1.4 && \
python3.10 -m pip install -e . && \
cd ..

View File

@ -66,6 +66,8 @@ class ColmapConverterToNerfstudioDataset(BaseConverterToNerfstudioDataset):
"NN-ratio",
"NN-mutual",
"adalam",
"disk+lightglue",
"superpoint+lightglue",
] = "any"
"""Matching algorithm."""
num_downscales: int = 3

View File

@ -60,7 +60,14 @@ def run_hloc(
"sift", "superpoint_aachen", "superpoint_max", "superpoint_inloc", "r2d2", "d2net-ss", "sosnet", "disk"
] = "superpoint_aachen",
matcher_type: Literal[
"superglue", "superglue-fast", "NN-superpoint", "NN-ratio", "NN-mutual", "adalam"
"superglue",
"superglue-fast",
"NN-superpoint",
"NN-ratio",
"NN-mutual",
"adalam",
"disk+lightglue",
"superpoint+lightglue",
] = "superglue",
num_matched: int = 50,
refine_pixsfm: bool = False,

View File

@ -477,7 +477,16 @@ def find_tool_feature_matcher_combination(
"disk",
],
matcher_type: Literal[
"any", "NN", "superglue", "superglue-fast", "NN-superpoint", "NN-ratio", "NN-mutual", "adalam"
"any",
"NN",
"superglue",
"superglue-fast",
"NN-superpoint",
"NN-ratio",
"NN-mutual",
"adalam",
"disk+lightglue",
"superpoint+lightglue",
],
) -> Union[
Tuple[None, None, None],
@ -493,7 +502,17 @@ def find_tool_feature_matcher_combination(
"sosnet",
"disk",
],
Literal["NN", "superglue", "superglue-fast", "NN-superpoint", "NN-ratio", "NN-mutual", "adalam"],
Literal[
"NN",
"superglue",
"superglue-fast",
"NN-superpoint",
"NN-ratio",
"NN-mutual",
"adalam",
"disk+lightglue",
"superpoint+lightglue",
],
],
]:
"""Find a valid combination of sfm tool, feature type, and matcher type.