Skip to content

Commit 48047d7

Browse files
committed
MST creation and updated graph vis
1 parent 6a080d8 commit 48047d7

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

main.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from deep_image_matching.utils.loftr_roma_to_multiview import LoftrRomaToMultiview
99
import yaml
1010

11+
1112
start_time = time.time()
1213

1314
logger = dim.setup_logger("dim")
@@ -37,6 +38,7 @@
3738
)
3839

3940
import shutil
41+
4042
shutil.copyfile(database_path, output_dir / "debug.db")
4143

4244
if matcher.matching in ["loftr", "se2loftr", "roma", "srif"]:
@@ -45,8 +47,9 @@
4547
LoftrRomaToMultiview(
4648
input_dir=feature_path.parent,
4749
output_dir=feature_path.parent,
48-
image_dir=imgs_dir,
49-
img_ext=image_format)
50+
image_dir=imgs_dir,
51+
img_ext=image_format,
52+
)
5053

5154
# Visualize view graph
5255
if config.general["graph"]:
@@ -107,7 +110,11 @@
107110
# },
108111
# )
109112
reconst_opts = {}
110-
refine_intrinsics = config.general["refine_intrinsics"] if "refine_intrinsics" in config.general else True
113+
refine_intrinsics = (
114+
config.general["refine_intrinsics"]
115+
if "refine_intrinsics" in config.general
116+
else True
117+
)
111118

112119
# Run reconstruction
113120
model = reconstruction.pycolmap_reconstruction(
@@ -122,4 +129,4 @@
122129
end_time = time.time()
123130

124131
total_time = end_time - start_time
125-
print(f"Total processing time: {total_time:.2f} seconds")
132+
print(f"Total processing time: {total_time:.2f} seconds")

src/deep_image_matching/graph.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def save_output_graph(G, name):
2121

2222
# HTML template for view graph details panel
2323
nt.set_template(os.path.join(TEMPLATE_DIR, "template.html").replace("\\", "/"))
24+
print(os.path.join(TEMPLATE_DIR, "template.html").replace("\\", "/"))
2425
nt.from_nx(G)
2526
nt.toggle_physics(False)
2627

0 commit comments

Comments
 (0)