-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpredict_points.sh
More file actions
36 lines (26 loc) · 788 Bytes
/
predict_points.sh
File metadata and controls
36 lines (26 loc) · 788 Bytes
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
#!/bin/bash
set -e
# Any subsequent(*) commands which fail will cause the shell script to exit immediately
inputimage="${1:-examples/dog06.png}"
outputpts="${2:-examples/dog06.pts}"
echo "Image: $inputimage";
echo "Out file: $outputpts"
case "$(uname -s)" in
Darwin)
echo 'Mac OS X'
;;
Linux)
echo 'Linux'
python prediction/usemodel.py --model prediction/best_model_checkpoint.pth --input $inputimage --output $outputpts
echo 'Done!'
;;
CYGWIN*|MINGW32*|MSYS*|MINGW*)
echo 'MS Windows'
# run python prediction
python usemodel.py --input $inputimage --output $outputpts
# execute polyvector with arguments ../my_inputs/alligator_cut2.png ../my_inputs/pythontest.pts
;;
*)
echo 'Other OS'
;;
esac