Vincentqyw commited on
Commit
0c624e7
·
1 Parent(s): 7130be7

update: model downloading

Browse files
hloc/extractors/alike.py CHANGED
@@ -35,7 +35,7 @@ class Alike(BaseModel):
35
  Path(__file__).stem, self.conf["model_name"]
36
  ),
37
  )
38
-
39
  self.net = Alike_(
40
  **configs[conf["model_name"]],
41
  device=device,
 
35
  Path(__file__).stem, self.conf["model_name"]
36
  ),
37
  )
38
+ logger.info("Loaded Alike model from {}".format(model_path))
39
  self.net = Alike_(
40
  **configs[conf["model_name"]],
41
  device=device,
hloc/extractors/d2net.py CHANGED
@@ -32,7 +32,7 @@ class D2Net(BaseModel):
32
  Path(__file__).stem, self.conf["model_name"]
33
  ),
34
  )
35
-
36
  self.net = _D2Net(
37
  model_file=model_path, use_relu=conf["use_relu"], use_cuda=False
38
  )
 
32
  Path(__file__).stem, self.conf["model_name"]
33
  ),
34
  )
35
+ logger.info(f"Loading model from {model_path}...")
36
  self.net = _D2Net(
37
  model_file=model_path, use_relu=conf["use_relu"], use_cuda=False
38
  )
hloc/extractors/darkfeat.py CHANGED
@@ -27,7 +27,7 @@ class DarkFeat(BaseModel):
27
  Path(__file__).stem, self.conf["model_name"]
28
  ),
29
  )
30
-
31
  self.net = DarkFeat_(model_path)
32
  logger.info("Load DarkFeat model done.")
33
 
 
27
  Path(__file__).stem, self.conf["model_name"]
28
  ),
29
  )
30
+ logger.info("Loaded DarkFeat model: {}".format(model_path))
31
  self.net = DarkFeat_(model_path)
32
  logger.info("Load DarkFeat model done.")
33
 
hloc/extractors/dedode.py CHANGED
@@ -44,6 +44,7 @@ class DeDoDe(BaseModel):
44
  Path(__file__).stem, conf["model_descriptor_name"]
45
  ),
46
  )
 
47
  self.normalizer = transforms.Normalize(
48
  mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
49
  )
 
44
  Path(__file__).stem, conf["model_descriptor_name"]
45
  ),
46
  )
47
+ logger.info("Loaded DarkFeat model: {}".format(model_detector_path))
48
  self.normalizer = transforms.Normalize(
49
  mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
50
  )
hloc/matchers/omniglue.py CHANGED
@@ -42,15 +42,6 @@ class OmniGlue(BaseModel):
42
  ),
43
  )
44
 
45
- # if not dino_model_path.exists():
46
- # link = self.dino_v2_link_dict.get(dino_model_path.name, None)
47
- # if link is not None:
48
- # cmd = ["wget", "--quiet", link, "-O", str(dino_model_path)]
49
- # logger.info(f"Downloading the dinov2 model with `{cmd}`.")
50
- # subprocess.run(cmd, check=True)
51
- # else:
52
- # logger.error(f"Invalid dinov2 model: {dino_model_path.name}")
53
-
54
  self.net = omniglue.OmniGlue(
55
  og_export=str(og_model_path),
56
  sp_export=str(sp_model_path),
 
42
  ),
43
  )
44
 
 
 
 
 
 
 
 
 
 
45
  self.net = omniglue.OmniGlue(
46
  og_export=str(og_model_path),
47
  sp_export=str(sp_model_path),