Spaces:
Running
Running
Realcat
commited on
Commit
•
2134b25
1
Parent(s):
1db009a
update: aspanformer
Browse files
hloc/matchers/aspanformer.py
CHANGED
@@ -4,8 +4,8 @@ from pathlib import Path
|
|
4 |
|
5 |
import torch
|
6 |
|
7 |
-
from
|
8 |
-
from
|
9 |
|
10 |
sys.path.append(str(Path(__file__).parent / "../../third_party"))
|
11 |
from ASpanFormer.src.ASpanFormer.aspanformer import ASpanFormer as _ASpanFormer
|
@@ -66,7 +66,9 @@ class ASpanFormer(BaseModel):
|
|
66 |
f"Failed to download the Aspanformer model: {e}"
|
67 |
)
|
68 |
|
69 |
-
|
|
|
|
|
70 |
|
71 |
config = get_cfg_defaults()
|
72 |
config.merge_from_file(conf["config_path"])
|
|
|
4 |
|
5 |
import torch
|
6 |
|
7 |
+
from hloc import logger
|
8 |
+
from hloc.utils.base_model import BaseModel
|
9 |
|
10 |
sys.path.append(str(Path(__file__).parent / "../../third_party"))
|
11 |
from ASpanFormer.src.ASpanFormer.aspanformer import ASpanFormer as _ASpanFormer
|
|
|
66 |
f"Failed to download the Aspanformer model: {e}"
|
67 |
)
|
68 |
|
69 |
+
cmd = ["tar", "-xvf", str(tar_path), "-C", str(aspanformer_path)]
|
70 |
+
logger.info(f"Unzip model file `{cmd}`.")
|
71 |
+
subprocess.run(cmd, check=True)
|
72 |
|
73 |
config = get_cfg_defaults()
|
74 |
config.merge_from_file(conf["config_path"])
|