Skip to content

Commit

Permalink
more linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pablovela5620 committed Dec 4, 2024
1 parent fa2bfff commit 0224017
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hloc/extract_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"resize_max": 1024,
},
},
"xfeat": {
"xfeat": {
"output": "feats-xfeat-n5000-r1600",
"model": {
"name": "xfeat",
Expand Down
2 changes: 1 addition & 1 deletion hloc/extractors/xfeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def _forward(self, data):
"scores": pred["scores"][None],
"descriptors": pred["descriptors"].T[None],
}
return pred
return pred
5 changes: 2 additions & 3 deletions hloc/matchers/lighterglue.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ class LighterGlue(BaseModel):
def _init(self, conf):
LightGlue_.default_conf = self.default_conf_xfeat
self.net = LightGlue_(None, **conf)
state_dict = torch.hub.load_state_dict_from_url(
"https://github.com/verlab/accelerated_features/raw/main/weights/xfeat-lighterglue.pt"
)
url = "https://github.com/verlab/accelerated_features/raw/main/weights/xfeat-lighterglue.pt" # noqa: E501
state_dict = torch.hub.load_state_dict_from_url(url)

# rename old state dict entries
for i in range(self.net.conf.n_layers):
Expand Down
2 changes: 1 addition & 1 deletion hloc/pairs_from_sequential.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def main(
pairs.append((names_q[i], names_q[i + q]))

if use_loop_closure:
retrieval_pairs_tmp: Path = output.parent / f"retrieval-pairs-tmp.txt"
retrieval_pairs_tmp: Path = output.parent / "retrieval-pairs-tmp.txt"

# match mask describes for each image, which images NOT to include in retrevial
# match search I.e., no reason to get retrieval matches for matches
Expand Down

0 comments on commit 0224017

Please sign in to comment.