Vincentqyw commited on
Commit
b13cad2
1 Parent(s): 8b9ccdd

fix: ransac failed

Browse files
Files changed (1) hide show
  1. hloc/match_dense.py +2 -0
hloc/match_dense.py CHANGED
@@ -347,6 +347,8 @@ def match_images(model, image_0, image_1, conf, device="cpu"):
347
  }
348
  if "mconf" in pred.keys():
349
  ret["mconf"] = pred["mconf"].cpu().numpy()
 
 
350
  if "lines0" in pred.keys() and "lines1" in pred.keys():
351
  if "keypoints0" in pred.keys() and "keypoints1" in pred.keys():
352
  kpts0, kpts1 = pred["keypoints0"], pred["keypoints1"]
 
347
  }
348
  if "mconf" in pred.keys():
349
  ret["mconf"] = pred["mconf"].cpu().numpy()
350
+ else:
351
+ ret["mconf"] = np.ones_like(kpts0.cpu().numpy()[:,0])
352
  if "lines0" in pred.keys() and "lines1" in pred.keys():
353
  if "keypoints0" in pred.keys() and "keypoints1" in pred.keys():
354
  kpts0, kpts1 = pred["keypoints0"], pred["keypoints1"]