Vincentqyw commited on
Commit
cd1bd30
β€’
1 Parent(s): 86d1c07

update: plotting

Browse files
app.py CHANGED
@@ -2,7 +2,7 @@ import argparse
2
  import gradio as gr
3
 
4
  from hloc import extract_features
5
- from extra_utils.utils import (
6
  matcher_zoo,
7
  device,
8
  match_dense,
 
2
  import gradio as gr
3
 
4
  from hloc import extract_features
5
+ from common.utils import (
6
  matcher_zoo,
7
  device,
8
  match_dense,
{extra_utils β†’ common}/__init__.py RENAMED
File without changes
{extra_utils β†’ common}/plotting.py RENAMED
@@ -57,7 +57,7 @@ def make_matching_figure(
57
  axes[1].scatter(kpts1[:, 0], kpts1[:, 1], c="w", s=5)
58
 
59
  # draw matches
60
- if mkpts0.shape[0] != 0 and mkpts1.shape[0] != 0:
61
  fig.canvas.draw()
62
  transFigure = fig.transFigure.inverted()
63
  fkpts0 = transFigure.transform(axes[0].transData.transform(mkpts0))
 
57
  axes[1].scatter(kpts1[:, 0], kpts1[:, 1], c="w", s=5)
58
 
59
  # draw matches
60
+ if mkpts0.shape[0] > 1 and mkpts1.shape[0] > 1:
61
  fig.canvas.draw()
62
  transFigure = fig.transFigure.inverted()
63
  fkpts0 = transFigure.transform(axes[0].transData.transform(mkpts0))
{extra_utils β†’ common}/utils.py RENAMED
File without changes
{extra_utils β†’ common}/visualize_util.py RENAMED
File without changes