-
Notifications
You must be signed in to change notification settings - Fork 282
/
android_demo_ci.sh
executable file
·205 lines (185 loc) · 5.29 KB
/
android_demo_ci.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#!/bin/bash
set -ex
# Set proxy if exists
if [ -n "$PROXY" ]; then
export http_proxy=$PROXY
export https_proxy=$PROXY
fi
if [ -n "$NO_PROXY" ]; then
export no_proxy=$NO_PROXY
fi
####################################################################################################
function download_lib {
chmod +x ./libs/download.sh
cd ./libs
bash ./download.sh
cd ../
}
function compile_human_segmentation {
cd ./human_segmentation/assets
chmod +x ./download.sh
bash ./download.sh
echo "human_segmentation"
cd ../android/shell/cxx/human_segmentation
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
cd ../../../../../
}
function compile_ppshitu {
cd ./PP_shitu/assets
chmod +x ./download.sh
bash ./download.sh
echo "PP_shitu"
cd ../android/shell/cxx/shitu
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
cd ../../../../../
}
function compile_image_classification {
cd ./image_classification/assets
chmod +x ./download.sh
bash ./download.sh
echo "image_classification"
cd ../android/shell/cxx/image_classification
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
cd ../../../../../
}
function compile_object_detection {
cd ./object_detection/assets
chmod +x ./download.sh
bash ./download.sh
echo "ssd_mobilenetv1_detection"
cd ../android/shell/cxx/ssd_mobilenetv1_detection
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
echo "yolov5n_detection"
cd ../yolov5n_detection
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
echo "picodet_detection"
cd ../picodet_detection
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
cd ../yolov3_mobilenet_v3
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
cd ../../../../../
}
function compile_mask_detection {
cd ./mask_detection/assets
chmod +x ./download.sh
bash ./download.sh
echo "mask_detection"
cd ../android/shell/cxx/mask_detection
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
cd ../../../../../
}
function compile_ocr {
cd ./ocr/assets
chmod +x ./download.sh
bash ./download.sh
cd ../android/shell/ppocr_demo
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
# run error
# bash ./build.sh "armeabi-v7a"
cd ../../../../
}
function compile_face_detection {
cd ./face_detection/assets
chmod +x ./download.sh
bash ./download.sh
cd ../android/shell/cxx/face_detection
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
cd ../../../../../
}
function compile_face_keypoints_detection {
cd ./face_keypoints_detection/assets
chmod +x ./download.sh
bash ./download.sh
cd ../android/shell/cxx/face_keypoints_detection
chmod +x ./build.sh
sed -i '3s/disk/opt/g' ./build.sh
echo "-- arm_v8 --"
bash ./build.sh "arm64-v8a"
echo "-- arm_v7 --"
bash ./build.sh "armeabi-v7a"
cd ../../../../../
}
function main {
# step1. download android lib
echo "--download_lib--: $(pwd)"
download_lib
# step2. build and run human_segmentation
echo "--compile_human_segmentation--: $(pwd)"
compile_human_segmentation
# step3. build and run image_classification
echo "--compile_image_classification--: $(pwd)"
compile_image_classification
# step4. build and run ocr
echo "--compile_ocr--: $(pwd)"
compile_ocr
# step5. build and run face_detection
echo "--compile_face_detection--: $(pwd)"
compile_face_detection
echo "--end--: $(pwd)"
# step6. build and run face_keypoints_detection
echo "--compile_face_keypoints_detection--: $(pwd)"
compile_face_keypoints_detection
echo "--end--: $(pwd)"
# step7. build and run face_keypoints_detection
echo "--compile_ppshitu--: $(pwd)"
compile_ppshitu
echo "--end--: $(pwd)"
# step8. build and run mask_detection
echo "--compile_object_detection--: $(pwd)"
compile_mask_detection
echo "--end--: $(pwd)"
# step9. build and run object_detection
echo "--compile_object_detection--: $(pwd)"
compile_object_detection
echo "--end--: $(pwd)"
}
main