Realcat commited on
Commit
614259e
1 Parent(s): 4ede021

fix: xfeat_lightglue

Browse files
Files changed (1) hide show
  1. hloc/matchers/xfeat_lightglue.py +5 -1
hloc/matchers/xfeat_lightglue.py CHANGED
@@ -37,7 +37,11 @@ class XFeatLightGlue(BaseModel):
37
  ]
38
  out0.update({"image_size": (im0.shape[-1], im0.shape[-2])}) # W H
39
  out1.update({"image_size": (im1.shape[-1], im1.shape[-2])}) # W H
40
- mkpts_0, mkpts_1 = self.net.match_lighterglue(out0, out1)
 
 
 
 
41
  mkpts_0 = torch.from_numpy(mkpts_0) # n x 2
42
  mkpts_1 = torch.from_numpy(mkpts_1) # n x 2
43
  pred = {
 
37
  ]
38
  out0.update({"image_size": (im0.shape[-1], im0.shape[-2])}) # W H
39
  out1.update({"image_size": (im1.shape[-1], im1.shape[-2])}) # W H
40
+ pred = self.net.match_lighterglue(out0, out1)
41
+ if len(pred) == 3:
42
+ mkpts_0, mkpts_1, _ = pred
43
+ else:
44
+ mkpts_0, mkpts_1 = pred
45
  mkpts_0 = torch.from_numpy(mkpts_0) # n x 2
46
  mkpts_1 = torch.from_numpy(mkpts_1) # n x 2
47
  pred = {