Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
c90752a3
Commit
c90752a3
authored
Nov 11, 2021
by
MissPenguin
Browse files
[TIPC] rename cpp infer
parent
883fea10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
44 deletions
+44
-44
test_tipc/configs/ppocr_det_mobile/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
...model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
+16
-0
test_tipc/prepare.sh
test_tipc/prepare.sh
+3
-19
test_tipc/test_inference_cpp.sh
test_tipc/test_inference_cpp.sh
+25
-25
No files found.
test_tipc/configs/ppocr_det_mobile/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
View file @
c90752a3
===========================cpp_infer_params===========================
model_name:ocr_det
use_opencv:True
infer_model:./inference/ch_ppocr_mobile_v2.0_det_infer/
infer_quant:False
inference:./deploy/cpp_infer/build/ppocr det
--use_gpu:True|False
--enable_mkldnn:True|False
--cpu_threads:1|6
--rec_batch_num:1
--use_tensorrt:False|True
--precision:fp32|fp16
--det_model_dir:
--image_dir:./inference/ch_det_data_50/all-sum-510/
null:null
--benchmark:True
\ No newline at end of file
test_tipc/prepare.sh
View file @
c90752a3
#!/bin/bash
source
test_tipc/common_func.sh
FILENAME
=
$1
# MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer',
...
...
@@ -12,30 +14,12 @@ dataline=$(cat ${FILENAME})
# parser params
IFS
=
$'
\n
'
lines
=(
${
dataline
}
)
function
func_parser_key
(){
strs
=
$1
IFS
=
":"
array
=(
${
strs
}
)
tmp
=
${
array
[0]
}
echo
${
tmp
}
}
function
func_parser_value
(){
strs
=
$1
IFS
=
":"
array
=(
${
strs
}
)
tmp
=
${
array
[1]
}
echo
${
tmp
}
}
IFS
=
$'
\n
'
# The training params
model_name
=
$(
func_parser_value
"
${
lines
[1]
}
"
)
trainer_list
=
$(
func_parser_value
"
${
lines
[14]
}
"
)
# MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer',
# 'whole_infer', 'klquant_whole_infer',
# 'cpp_infer', 'serving_infer']
MODE
=
$2
if
[
${
MODE
}
=
"lite_train_lite_infer"
]
;
then
# pretrain lite train data
...
...
test_tipc/test_inference_cpp.sh
View file @
c90752a3
...
...
@@ -2,38 +2,38 @@
source
test_tipc/common_func.sh
FILENAME
=
$1
dataline
=
$(
awk
'NR==
52
, NR==
6
6{print}'
$FILENAME
)
dataline
=
$(
awk
'NR==
1
, NR==
1
6{print}'
$FILENAME
)
# parser params
IFS
=
$'
\n
'
lines
=(
${
dataline
}
)
# parser cpp inference model
use_opencv
=
$(
func_parser_value
"
${
lines
[1]
}
"
)
cpp_infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[2]
}
"
)
cpp_infer_is_quant
=
$(
func_parser_value
"
${
lines
[3]
}
"
)
model_name
=
$(
func_parser_value
"
${
lines
[1]
}
"
)
use_opencv
=
$(
func_parser_value
"
${
lines
[2]
}
"
)
cpp_infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[3]
}
"
)
cpp_infer_is_quant
=
$(
func_parser_value
"
${
lines
[4]
}
"
)
# parser cpp inference
inference_cmd
=
$(
func_parser_value
"
${
lines
[4]
}
"
)
cpp_use_gpu_key
=
$(
func_parser_key
"
${
lines
[5]
}
"
)
cpp_use_gpu_list
=
$(
func_parser_value
"
${
lines
[5]
}
"
)
cpp_use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[6]
}
"
)
cpp_use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[6]
}
"
)
cpp_cpu_threads_key
=
$(
func_parser_key
"
${
lines
[7]
}
"
)
cpp_cpu_threads_list
=
$(
func_parser_value
"
${
lines
[7]
}
"
)
cpp_batch_size_key
=
$(
func_parser_key
"
${
lines
[8]
}
"
)
cpp_batch_size_list
=
$(
func_parser_value
"
${
lines
[8]
}
"
)
cpp_use_trt_key
=
$(
func_parser_key
"
${
lines
[9]
}
"
)
cpp_use_trt_list
=
$(
func_parser_value
"
${
lines
[9]
}
"
)
cpp_precision_key
=
$(
func_parser_key
"
${
lines
[10]
}
"
)
cpp_precision_list
=
$(
func_parser_value
"
${
lines
[10]
}
"
)
cpp_infer_model_key
=
$(
func_parser_key
"
${
lines
[11]
}
"
)
cpp_image_dir_key
=
$(
func_parser_key
"
${
lines
[12]
}
"
)
cpp_infer_img_dir
=
$(
func_parser_value
"
${
lines
[12]
}
"
)
cpp_infer_key1
=
$(
func_parser_key
"
${
lines
[13]
}
"
)
cpp_infer_value1
=
$(
func_parser_value
"
${
lines
[13]
}
"
)
cpp_benchmark_key
=
$(
func_parser_key
"
${
lines
[14]
}
"
)
cpp_benchmark_value
=
$(
func_parser_value
"
${
lines
[14]
}
"
)
inference_cmd
=
$(
func_parser_value
"
${
lines
[5]
}
"
)
cpp_use_gpu_key
=
$(
func_parser_key
"
${
lines
[6]
}
"
)
cpp_use_gpu_list
=
$(
func_parser_value
"
${
lines
[6]
}
"
)
cpp_use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[7]
}
"
)
cpp_use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[7]
}
"
)
cpp_cpu_threads_key
=
$(
func_parser_key
"
${
lines
[8]
}
"
)
cpp_cpu_threads_list
=
$(
func_parser_value
"
${
lines
[8]
}
"
)
cpp_batch_size_key
=
$(
func_parser_key
"
${
lines
[9]
}
"
)
cpp_batch_size_list
=
$(
func_parser_value
"
${
lines
[9]
}
"
)
cpp_use_trt_key
=
$(
func_parser_key
"
${
lines
[10]
}
"
)
cpp_use_trt_list
=
$(
func_parser_value
"
${
lines
[10]
}
"
)
cpp_precision_key
=
$(
func_parser_key
"
${
lines
[11]
}
"
)
cpp_precision_list
=
$(
func_parser_value
"
${
lines
[11]
}
"
)
cpp_infer_model_key
=
$(
func_parser_key
"
${
lines
[12]
}
"
)
cpp_image_dir_key
=
$(
func_parser_key
"
${
lines
[13]
}
"
)
cpp_infer_img_dir
=
$(
func_parser_value
"
${
lines
[13]
}
"
)
cpp_infer_key1
=
$(
func_parser_key
"
${
lines
[14]
}
"
)
cpp_infer_value1
=
$(
func_parser_value
"
${
lines
[14]
}
"
)
cpp_benchmark_key
=
$(
func_parser_key
"
${
lines
[15]
}
"
)
cpp_benchmark_value
=
$(
func_parser_value
"
${
lines
[15]
}
"
)
LOG_PATH
=
"./test_tipc/output"
mkdir
-p
${
LOG_PATH
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment