-
Notifications
You must be signed in to change notification settings - Fork 6
/
travis-ci-train.sh
executable file
·93 lines (75 loc) · 2.12 KB
/
travis-ci-train.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
set -e
set -x
if ! test -d rendered-training-data/generated; then
echo "Training data expected under rendered-training-data/generated"
exit 1
fi
find rendered-training-data
python3 --version
pip3 --version
ninja --version
pip3 install git+https://github.com/glimpse-project/meson
export PATH=$HOME/.local/bin:$PATH
git clone --depth=1 https://github.com/glimpse-project/glimpse-training-data
# We rely on the cached, rendered, training images so we don't currently need
# the unpack training data here....
#
#pushd glimpse-training-data
# ./unpack.sh
#popd
#git clone --depth=1 https://github.com/glimpse-project/glimpse-models
#pushd glimpse-models
# ./unpack.sh
#popd
export CC=clang-5.0 CXX=clang++-5.0
mkdir build
pushd build
# Have had builds fail just because Meson hasn't been able to download
# subproject tarballs, so we allow configurations to fail and back off
# for five seconds before testing that configuration succeeds (at
# which point subprojects should have been downloaded and unpacked)
set +e
for i in 1 2 3
do
meson .. --errorlogs --warnlevel 3 $CONFIG_OPTS || sleep 5
if test -f build.ninja; then
break
fi
done
set -e
ninja -v
popd
export PATH=$PWD/src:$PATH
export PATH=$PWD/build:$PATH
image-pre-processor \
rendered-training-data/generated/test-render \
rendered-training-data/pre-processed/test-render \
glimpse-training-data/label-maps/2018-06-render-to-2018-06-rdt-map.json \
-c glimpse-training-data/pre-processor-configs/iphone-x-config.json
indexer.py rendered-training-data/pre-processed/test-render
JOBS=$(cat<<'EOF'
[
{
"index_name": "full",
"out_file": "full-d2.json",
"max_depth": 2,
"n_pixels": 500,
"n_thresholds": 25,
"n_uvs": 500,
"pretty": true
},
{
"index_name": "full",
"reload": "full-d2.json",
"out_file": "full-d3.json",
"max_depth": 3,
"n_pixels": 500,
"n_thresholds": 25,
"n_uvs": 500,
"pretty": true
}
]
EOF
)
train_rdt -q "$JOBS" -d rendered-training-data/pre-processed/test-render full full-tree.json