Vincentqyw commited on
Commit
a9f1fc6
1 Parent(s): e054474

update: rel path

Browse files
Files changed (1) hide show
  1. common/utils.py +4 -3
common/utils.py CHANGED
@@ -2,9 +2,10 @@ import os
2
  import random
3
  import numpy as np
4
  import torch
5
- from itertools import combinations
6
  import cv2
7
  import gradio as gr
 
 
8
  from hloc import matchers, extractors, logger
9
  from hloc.utils.base_model import dynamic_load
10
  from hloc import match_dense, match_features, extract_features
@@ -62,8 +63,8 @@ def gen_examples():
62
  return [pairs[i] for i in selected]
63
 
64
  # image pair path
65
- path = "datasets/sacre_coeur/mapping"
66
- pairs = gen_images_pairs(path, len(example_matchers))
67
  match_setting_threshold = DEFAULT_SETTING_THRESHOLD
68
  match_setting_max_features = DEFAULT_SETTING_MAX_FEATURES
69
  detect_keypoints_threshold = DEFAULT_DEFAULT_KEYPOINT_THRESHOLD
 
2
  import random
3
  import numpy as np
4
  import torch
 
5
  import cv2
6
  import gradio as gr
7
+ from pathlib import Path
8
+ from itertools import combinations
9
  from hloc import matchers, extractors, logger
10
  from hloc.utils.base_model import dynamic_load
11
  from hloc import match_dense, match_features, extract_features
 
63
  return [pairs[i] for i in selected]
64
 
65
  # image pair path
66
+ path = Path(__file__).parent.parent / "datasets/sacre_coeur/mapping"
67
+ pairs = gen_images_pairs(str(path), len(example_matchers))
68
  match_setting_threshold = DEFAULT_SETTING_THRESHOLD
69
  match_setting_max_features = DEFAULT_SETTING_MAX_FEATURES
70
  detect_keypoints_threshold = DEFAULT_DEFAULT_KEYPOINT_THRESHOLD