diff --git a/cfgs/localization/default.yaml b/cfgs/localization/default.yaml index 686c5638..2b3ea25d 100644 --- a/cfgs/localization/default.yaml +++ b/cfgs/localization/default.yaml @@ -123,6 +123,9 @@ line2d: skip_exists: False superglue: weights: "outdoor" # ["indoor", "outdoor"] for selecting superglue models + dense: + one_to_many: False + weights: "outdoor" # ["indoor", "outdoor", "tiny_outdoor"] for selecting RoMa models var2d: # in pixels sold2: 5.0 lsd: 2.0 diff --git a/cfgs/triangulation/default.yaml b/cfgs/triangulation/default.yaml index 0524c674..b9b2da74 100644 --- a/cfgs/triangulation/default.yaml +++ b/cfgs/triangulation/default.yaml @@ -55,6 +55,9 @@ line2d: skip_exists: False superglue: weights: "outdoor" # ["indoor", "outdoor"] for selecting superglue models + dense: + one_to_many: False + weights: "outdoor" # ["indoor", "outdoor", "tiny_outdoor"] for selecting RoMa models var2d: # in pixels sold2: 5.0 lsd: 2.0 diff --git a/limap/line2d/dense/__init__.py b/limap/line2d/dense/__init__.py index a54de7e5..c9d9e17d 100644 --- a/limap/line2d/dense/__init__.py +++ b/limap/line2d/dense/__init__.py @@ -1,4 +1,4 @@ from .extractor import DenseNaiveExtractor -from .matcher import RoMaLineMatcher +from .matcher import BaseDenseLineMatcherOptions, RoMaLineMatcher -__all__ = ["DenseNaiveExtractor", "RoMaLineMatcher"] +__all__ = ["BaseDenseLineMatcherOptions", "DenseNaiveExtractor", "RoMaLineMatcher"] diff --git a/limap/line2d/register_matcher.py b/limap/line2d/register_matcher.py index e68bf68f..2b86f5d0 100644 --- a/limap/line2d/register_matcher.py +++ b/limap/line2d/register_matcher.py @@ -55,13 +55,13 @@ def get_matcher(cfg_matcher, extractor, n_neighbors=20, weight_path=None): dense_options = BaseDenseLineMatcherOptions() if "one_to_many" in cfg_matcher: dense_options = dense_options._replace( - one_to_many=cfg_matcher["one_to_many"] + one_to_many=cfg_matcher["dense"]["one_to_many"] ) return RoMaLineMatcher( extractor, options=options, dense_options=dense_options, - mode=cfg_matcher["mode"], + mode=cfg_matcher["dense"]["weights"], ) else: raise NotImplementedError