Skip to content

RomaFeaturesMatcher: support multiple features folders#5

Draft
Copilot wants to merge 5 commits intodevelopfrom
copilot/add-support-multiple-features-folders
Draft

RomaFeaturesMatcher: support multiple features folders#5
Copilot wants to merge 5 commits intodevelopfrom
copilot/add-support-multiple-features-folders

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 28, 2026

RomaFeaturesMatcher previously accepted a single features folder, preventing use with features spread across multiple sources.

Node descriptor (RomaFeaturesMatcher.py)

  • Replaced desc.File(name="featuresFolder") with desc.ListAttribute(elementDesc=desc.File(...), name="featuresFolders") — the node now accepts one or more folder connections.

Python implementation (featuresMatcher.py)

  • compute_featuresMatcher: featuresFolder: strfeaturesFolders: list
  • Feature loading now searches each folder in order, stopping at the first hit per image. Reference and "other" images are resolved independently, so features for different views can live in different folders.
  • Argparse: --featuresFolder (single str) → --featuresFolders (nargs='+')
# Per-image independent folder search with early stopping
for folder in featuresFolders:
    ref_feat = f"{folder}/{referenceId}.dspsift.feat"
    ref_desc = f"{folder}/{referenceId}.dspsift.desc"
    if os.path.exists(ref_feat) and os.path.exists(ref_desc):
        regionsRef.Load(ref_feat, ref_desc)
        break
for folder in featuresFolders:
    other_feat = f"{folder}/{otherId}.dspsift.feat"
    other_desc = f"{folder}/{otherId}.dspsift.desc"
    if os.path.exists(other_feat) and os.path.exists(other_desc):
        regionsOther.Load(other_feat, other_desc)
        break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants