-
Notifications
You must be signed in to change notification settings - Fork 9
/
run_openpose.sh
executable file
·75 lines (53 loc) · 1.96 KB
/
run_openpose.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
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
cd $DIR
cd openpose
PS3='Please enter your choice: '
options=("Demo" "Hands/Face" "Record" "Record HP" "Video" "Video HP" "3D")
select opt in "${options[@]}"
do
case $opt in
"Demo")
echo "Demo" # no recording
./build/examples/openpose/openpose.bin
break
;;
"Hands/Face")
echo "Hands/Face" # ~50% fps vs. body only
./build/examples/openpose/openpose.bin --hand --face
break
;;
"Record")
echo "Record"
./build/examples/openpose/openpose.bin --write_json record/
break
;;
"Record HP")
echo "Record High Precision" # requires > 8GB VRAM
./build/examples/openpose/openpose.bin --net_resolution "1312x736" --scale_number 4 --scale_gap 0.25 --write_json record/
break
;;
"Video")
echo "Video" # requires > 8GB VRAM
./build/examples/openpose/openpose.bin --video $1 --write_json record/
break
;;
"Video HP")
echo "Video High Precision" # requires > 8GB VRAM
./build/examples/openpose/openpose.bin --video $1 --net_resolution "1312x736" --scale_number 4 --scale_gap 0.25 --write_json record/
break
;;
"3D")
echo "3D" # requires > 1 camera
./build/examples/openpose/openpose.bin --flir_camera --3d --number_people_max 1
break
;;
*) echo invalid option;;
esac
done