-
Notifications
You must be signed in to change notification settings - Fork 9
/
test_robotcar
executable file
·78 lines (65 loc) · 2.24 KB
/
test_robotcar
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
#!/bin/bash
colmap=/home/mifs/fx221/Research/Code/thirdparty/colmap/build_2204/src/colmap/exe/colmap
root_dir=/scratches/flyer_2
dataset=$root_dir/fx221/localization/RobotCar-Seasons
image_dir=$root_dir/fx221/localization/RobotCar-Seasons/images
outputs=$root_dir/fx221/localization/outputs/robotcar-seasons
db_pair=pairs/robotcar-seasons/pairs-db-covis20.txt
query_pair=pairs/robotcar-seasons/pairs-query-netvlad20-percam-perloc-rear.txt
gt_pose_fn=assets/RobotCar_hloc_superpoint+superglue_netvlad20.txt
save_root=$root_dir/fx221/exp/sgd2/robotcar-seasons
feat=ressegnetv2-20220810-wapv2-sd2mfsf-uspg-0001-n4096-r1024
matcher=NNM
extract_feat_db=0
match_db=0
triangulation=1
localize=1
if [ "$extract_feat_db" -gt "0" ]; then
python3 -m extract_localization --image_list pairs/robotcar-seasons/robotcar_db_query_imglist.txt --image_dir $dataset/images --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/sfm-sift \
--image_dir $dataset/images/ \
--pairs $db_pair \
--features $outputs/feats-$feat.h5 \
--matches $outputs/feats-$feat-$matcher-pairs-db-covis20.h5 \
--colmap_path $colmap
fi
ransac_thresh=12
opt_thresh=12
covisibility_frame=20
init_type="sng"
opt_type="clurefpos"
inlier_thresh=100
iters=5
radius=20
obs_thresh=3
# with opt
if [ "$localize" -gt "0" ]; then
python3 -m it_loc.localizer \
--dataset robotcar \
--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/robotcar-seasons/queries_with_intrinsics_rear.txt \
--features $outputs/feats-$feat.h5 \
--matcher_method $matcher \
--ransac_thresh $ransac_thresh \
--with_match \
--covisibility_frame $covisibility_frame \
--iters $iters \
--radius $radius \
--inlier_thresh $inlier_thresh \
--obs_thresh $obs_thresh \
--opt_thresh $opt_thresh \
--init_type $init_type \
--opt_type $opt_type \
--do_covisible_opt
fi