Spaces:
Build error
Build error
update: notify when roma is selected
Browse files- common/app_class.py +1 -1
- common/utils.py +11 -1
common/app_class.py
CHANGED
|
@@ -425,7 +425,7 @@ class ImageMatchingApp:
|
|
| 425 |
)
|
| 426 |
|
| 427 |
markdown_table += "{}|{}|{}|{}|{}\n".format(
|
| 428 |
-
v["info"]["name"],
|
| 429 |
v["info"]["source"],
|
| 430 |
github_link,
|
| 431 |
project_link,
|
|
|
|
| 425 |
)
|
| 426 |
|
| 427 |
markdown_table += "{}|{}|{}|{}|{}\n".format(
|
| 428 |
+
v["info"]["name"], # display name
|
| 429 |
v["info"]["source"],
|
| 430 |
github_link,
|
| 431 |
project_link,
|
common/utils.py
CHANGED
|
@@ -21,8 +21,11 @@ from .viz import (
|
|
| 21 |
import time
|
| 22 |
import matplotlib.pyplot as plt
|
| 23 |
import warnings
|
|
|
|
| 24 |
warnings.filterwarnings("ignore", category=UserWarning)
|
| 25 |
-
warnings.filterwarnings(
|
|
|
|
|
|
|
| 26 |
|
| 27 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 28 |
|
|
@@ -463,6 +466,13 @@ def run_matching(
|
|
| 463 |
output_matches_raw = None
|
| 464 |
output_matches_ransac = None
|
| 465 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 466 |
model = matcher_zoo[key]
|
| 467 |
match_conf = model["matcher"]
|
| 468 |
# update match config
|
|
|
|
| 21 |
import time
|
| 22 |
import matplotlib.pyplot as plt
|
| 23 |
import warnings
|
| 24 |
+
|
| 25 |
warnings.filterwarnings("ignore", category=UserWarning)
|
| 26 |
+
warnings.filterwarnings(
|
| 27 |
+
"ignore", category=gr.deprecation.GradioDeprecationWarning
|
| 28 |
+
)
|
| 29 |
|
| 30 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 31 |
|
|
|
|
| 466 |
output_matches_raw = None
|
| 467 |
output_matches_ransac = None
|
| 468 |
|
| 469 |
+
# super slow!
|
| 470 |
+
if "roma" in key.lower():
|
| 471 |
+
gr.Info(
|
| 472 |
+
f"Success! Please be patient and allow for about 2-3 minutes."
|
| 473 |
+
f" Due to CPU inference, {key} is quiet slow."
|
| 474 |
+
)
|
| 475 |
+
|
| 476 |
model = matcher_zoo[key]
|
| 477 |
match_conf = model["matcher"]
|
| 478 |
# update match config
|