Spaces:
Running
Running
Vincentqyw
commited on
Commit
•
1928ea3
1
Parent(s):
548c5db
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
|
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]
|
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
|