-
Notifications
You must be signed in to change notification settings - Fork 9
/
test_aachenv_1_1
executable file
·87 lines (73 loc) · 2.5 KB
/
test_aachenv_1_1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
colmap=/home/mifs/fx221/Research/Code/thirdparty/colmap/build_2204/src/colmap/exe/colmap
root_dir=/scratches/flyer_2
dataset=/scratches/flyer_2/fx221/localization/aachen_v1_1
image_dir=$dataset/images/images_upright
db_pair=pairs/aachen_v1.1/pairs-db-covis20.txt
outputs=/scratches/flyer_2/fx221/localization/outputs/aachen_v1_1
query_pair=pairs/aachen_v1.1/pairs-query-netvlad50.txt
gt_pose_fn=assets/Aachen-v1.1_hloc_superpoint_n4096_r1600+superglue_netvlad50.txt
save_root=$root_dir/fx221/exp/sfd2/aachen
feat=ressegnetv2-20220810-wapv2-sd2mfsf-uspg-0001-n4096-r1600
# this parameter controls the first successfully localized reference image
inlier_thresh=80
#feat=ressegnetv2-20220810-wapv2-sd2mfsf-uspg-0001-n3000-r1600
#inlier_thresh=80
#feat=ressegnetv2-20220810-wapv2-sd2mfsf-uspg-0001-n2000-r1600
#inlier_thresh=50
#feat=ressegnetv2-20220810-wapv2-sd2mfsf-uspg-0001-n1000-r1600
#inlier_thresh=30
matcher=NNM
extract_feat_db=0
match_db=0
triangulation=0
localize=1
if [ "$extract_feat_db" -gt "0" ]; then
python3 -m extract_localization --image_dir $dataset/images/images_upright --export_dir $outputs/ --conf $feat
fi
if [ "$match_db" -gt "0" ]; then
python3 -m hloc.match_features --pairs $db_pair --export_dir $outputs/ --conf $matcher --features feats-$feat
fi
if [ "$triangulation" -gt "0" ]; then
python3 -m hloc.triangulation \
--sfm_dir $outputs/sfm_$feat-$matcher \
--reference_sfm_model $dataset/3D-models \
--image_dir $dataset/images/images_upright \
--pairs $db_pair \
--features $outputs/feats-$feat.h5 \
--matches $outputs/feats-$feat-$matcher-pairs-db-covis20.h5 \
--colmap_path $colmap
fi
ransac_thresh=15
opt_thresh=15
covisibility_frame=50
#init_type="clu"
init_type="sng"
opt_type="clurefobs"
iters=5
radius=30
obs_thresh=3
# with opt
if [ "$localize" -gt "0" ]; then
python3 -m it_loc.localizer \
--dataset aachen_v1.1 \
--image_dir $image_dir \
--save_root $save_root \
--gt_pose_fn $gt_pose_fn \
--retrieval $query_pair \
--reference_sfm $outputs/sfm_$feat-$matcher \
--queries queries/aachen_v1.1/day_night_time_queries_with_intrinsics.txt \
--features $outputs/feats-$feat.h5 \
--matcher_method $matcher \
--ransac_thresh $ransac_thresh \
--with_match \
--covisibility_frame $covisibility_frame \
--iters $iters \
--radius $radius \
--obs_thresh $obs_thresh \
--opt_thresh $opt_thresh \
--init_type $init_type \
--inlier_thresh $inlier_thresh \
--opt_type $opt_type \
--do_covisible_opt
fi