-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy patheval_co-fusion.sh
More file actions
executable file
·75 lines (63 loc) · 3.42 KB
/
eval_co-fusion.sh
File metadata and controls
executable file
·75 lines (63 loc) · 3.42 KB
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
#!/bin/bash
##
## This file is part of EM-Fusion.
##
## Copyright (C) 2020 Embodied Vision Group, Max Planck Institute for Intelligent Systems, Germany.
## Developed by Michael Strecke <mstrecke at tue dot mpg dot de>.
## For more information see <https://emfusion.is.tue.mpg.de>.
## If you use this code, please cite the respective publication as
## listed on the website.
##
## EM-Fusion is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## EM-Fusion is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with EM-Fusion. If not, see <https://www.gnu.org/licenses/>.
##
# Usage: ./eval_co-fusion.sh <path/to/results> <path/to/co-fusion>
CONVERT_POSES=/is/sg/mstrecke/code/dataset-tools/Release/bin/convert_poses
TUM_EVAL_SCRIPTS=/is/sg/mstrecke/code/rgbd_benchmark_tools/scripts
cd "$1/co-fusion"
cd car4
declare -A gt_obj
declare -A first_frame
gt_obj[2]="gt-truck-1"
first_frame[2]=90
gt_obj[4]="gt-car-2"
first_frame[4]=270
for obj in {2,4}; do
$CONVERT_POSES --frame ${first_frame[$obj]} --object poses-$obj-corrected.txt --camera poses-cam.txt --gtobject "$2/car4-full/trajectories/${gt_obj[$obj]}.txt" --gtcamera "$2/car4-full/trajectories/gt-cam-0.txt" --out poses-$obj-mapped-origin.txt
python "$TUM_EVAL_SCRIPTS/evaluate_ate.py" --verbose --plot ate_$obj.pdf "$2/car4-full/trajectories/${gt_obj[$obj]}.txt" poses-$obj-mapped-origin.txt > ate_$obj.txt
python "$TUM_EVAL_SCRIPTS/evaluate_rpe.py" --verbose --fixed_delta --plot rpe_$obj.pdf "$2/car4-full/trajectories/${gt_obj[$obj]}.txt" poses-$obj-mapped-origin.txt > rpe_$obj.txt
done
python "$TUM_EVAL_SCRIPTS/evaluate_ate.py" --verbose --plot ate_cam.pdf "$2/car4-full/trajectories/gt-cam-0.txt" poses-cam.txt > ate_cam.txt
python "$TUM_EVAL_SCRIPTS/evaluate_rpe.py" --verbose --fixed_delta --plot rpe_cam.pdf "$2/car4-full/trajectories/gt-cam-0.txt" poses-cam.txt > rpe_cam.txt
cd ..
cd room4
declare -A gt_obj
declare -A first_frame
gt_obj[1]="gt-ship-1"
first_frame[1]=540
gt_obj[2]="gt-ship-1"
first_frame[2]=600
gt_obj[3]="gt-ship-1"
first_frame[3]=600
gt_obj[4]="gt-poses-horse-3"
first_frame[4]=690
gt_obj[5]="gt-car-2"
first_frame[5]=780
for obj in {1..5}; do
$CONVERT_POSES --frame ${first_frame[$obj]} --object poses-$obj-corrected.txt --camera poses-cam.txt --gtobject "$2/room4-full/trajectories/${gt_obj[$obj]}.txt" --gtcamera "$2/room4-full/trajectories/gt-cam-0.txt" --out poses-$obj-mapped-origin.txt
python "$TUM_EVAL_SCRIPTS/evaluate_ate.py" --verbose --plot ate_$obj.pdf "$2/room4-full/trajectories/${gt_obj[$obj]}.txt" poses-$obj-mapped-origin.txt > ate_$obj.txt
python "$TUM_EVAL_SCRIPTS/evaluate_rpe.py" --verbose --fixed_delta --plot rpe_$obj.pdf "$2/room4-full/trajectories/${gt_obj[$obj]}.txt" poses-$obj-mapped-origin.txt > rpe_$obj.txt
done
python "$TUM_EVAL_SCRIPTS/evaluate_ate.py" --verbose --plot ate_cam.pdf "$2/room4-full/trajectories/gt-cam-0.txt" poses-cam.txt > ate_cam.txt
python "$TUM_EVAL_SCRIPTS/evaluate_rpe.py" --verbose --fixed_delta --plot rpe_cam.pdf "$2/room4-full/trajectories/gt-cam-0.txt" poses-cam.txt > rpe_cam.txt
cd ..