Skip to content

Commit

Permalink
MST creation and updated graph vis
Browse files Browse the repository at this point in the history
  • Loading branch information
gperda committed Nov 27, 2024
1 parent 6a080d8 commit 48047d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from deep_image_matching.utils.loftr_roma_to_multiview import LoftrRomaToMultiview
import yaml


start_time = time.time()

logger = dim.setup_logger("dim")
Expand Down Expand Up @@ -37,6 +38,7 @@
)

import shutil

shutil.copyfile(database_path, output_dir / "debug.db")

if matcher.matching in ["loftr", "se2loftr", "roma", "srif"]:
Expand All @@ -45,8 +47,9 @@
LoftrRomaToMultiview(
input_dir=feature_path.parent,
output_dir=feature_path.parent,
image_dir=imgs_dir,
img_ext=image_format)
image_dir=imgs_dir,
img_ext=image_format,
)

# Visualize view graph
if config.general["graph"]:
Expand Down Expand Up @@ -107,7 +110,11 @@
# },
# )
reconst_opts = {}
refine_intrinsics = config.general["refine_intrinsics"] if "refine_intrinsics" in config.general else True
refine_intrinsics = (
config.general["refine_intrinsics"]
if "refine_intrinsics" in config.general
else True
)

# Run reconstruction
model = reconstruction.pycolmap_reconstruction(
Expand All @@ -122,4 +129,4 @@
end_time = time.time()

total_time = end_time - start_time
print(f"Total processing time: {total_time:.2f} seconds")
print(f"Total processing time: {total_time:.2f} seconds")
1 change: 1 addition & 0 deletions src/deep_image_matching/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def save_output_graph(G, name):

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

Expand Down

0 comments on commit 48047d7

Please sign in to comment.