Vincentqyw commited on
Commit
f457bff
2 Parent(s): a517c83 514cd02
hloc/extractors/dedode.py CHANGED
@@ -64,8 +64,9 @@ class DeDoDe(BaseModel):
64
  # load the model
65
  weights_detector = torch.load(model_detector_path, map_location="cpu")
66
  weights_descriptor = torch.load(model_descriptor_path, map_location="cpu")
67
- self.detector = dedode_detector_L(weights=weights_detector, device=device)
68
- self.descriptor = dedode_descriptor_B(weights=weights_descriptor, device=device)
 
69
  logger.info(f"Load DeDoDe model done.")
70
 
71
  def _forward(self, data):
 
64
  # load the model
65
  weights_detector = torch.load(model_detector_path, map_location="cpu")
66
  weights_descriptor = torch.load(model_descriptor_path, map_location="cpu")
67
+ self.detector = dedode_detector_L(weights=weights_detector, device = device)
68
+ self.descriptor = dedode_descriptor_B(weights=weights_descriptor, device = device)
69
+
70
  logger.info(f"Load DeDoDe model done.")
71
 
72
  def _forward(self, data):
third_party/ASpanFormer/src/ASpanFormer/aspanformer.py CHANGED
@@ -161,7 +161,6 @@ class ASpanFormer(nn.Module):
161
  train_res_h / data["image1"].shape[2],
162
  train_res_w / data["image1"].shape[3],
163
  ]
164
-
165
  data["online_resize_scale0"], data["online_resize_scale1"] = (
166
  torch.tensor([w0 / data["image0"].shape[3], h0 / data["image0"].shape[2]])[
167
  None
 
161
  train_res_h / data["image1"].shape[2],
162
  train_res_w / data["image1"].shape[3],
163
  ]
 
164
  data["online_resize_scale0"], data["online_resize_scale1"] = (
165
  torch.tensor([w0 / data["image0"].shape[3], h0 / data["image0"].shape[2]])[
166
  None
third_party/SGMNet/sgmnet/match_model.py CHANGED
@@ -5,7 +5,6 @@ eps = 1e-8
5
 
6
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
7
 
8
-
9
  def sinkhorn(M, r, c, iteration):
10
  p = torch.softmax(M, dim=-1)
11
  u = torch.ones_like(r)
 
5
 
6
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
7
 
 
8
  def sinkhorn(M, r, c, iteration):
9
  p = torch.softmax(M, dim=-1)
10
  u = torch.ones_like(r)