-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathrun_simulation.sh
executable file
·67 lines (62 loc) · 1.8 KB
/
run_simulation.sh
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
#!/bin/bash
while getopts d:e:n:m:a: flag
do
case "${flag}" in
d) directory=${OPTARG};;
e) experiment_num=${OPTARG};;
n) experiment_name=${OPTARG};;
m) em_methods=${OPTARG};;
a) ablation_methods=${OPTARG};;
esac
done
: "${experiment_num:=0}"
: "${experiment_name:="default"}"
: "${em_methods:="true"}"
: "${ablation_methods:="true"}"
experiment_types=("standard" "anisotropy" "outlier" "offset")
experiment=${experiment_types[${experiment_num}]}
# 0 omnidirectional; 1 pinhole
camera_nums=(0 1)
# 0 isotropic homogeneous; 1 isotropic inhomogeneous; 2 anisotropic homogenous; 3 anisotropic inhomogeneous
noise_nums=(0 1 2 3)
translation=("true" "false")
if [ $experiment_num == "0" ]
then
linspace_start=0.125
linspace_end=4.0
linspace_num=32
fi
if [ $experiment_num == "1" ]
then
linspace_start=0.5
linspace_end=0.975
linspace_num=20
fi
if [ $experiment_num == "2" ]
then
linspace_start=0.0
linspace_end=10.0
linspace_num=21
fi
if [ $experiment_num == "3" ]
then
linspace_start=0.0
linspace_end=0.5
linspace_num=21
fi
for camera_num in "${camera_nums[@]}"
do
for t in "${translation[@]}"
do
if [ $experiment_num != "1" ]
then
for noise_num in "${noise_nums[@]}"
do
./build/run_simulation ${directory} ${experiment_num} ${camera_num} ${t} ${noise_num} ${experiment_name} -e=${em_methods} -a=${ablation_methods} -sc=1.0 -ls=${linspace_start} -le=${linspace_end} -ln=${linspace_num} &
done
else
./build/run_simulation ${directory} ${experiment_num} ${camera_num} ${t} ${noise_num} ${experiment_name} -e=${em_methods} -a=${ablation_methods} -sc=1.0 -ls=${linspace_start} -le=${linspace_end} -ln=${linspace_num} &
fi
wait
done
done