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
45d4afec
Commit
45d4afec
authored
Aug 24, 2021
by
MissPenguin
Browse files
refine
parent
efb1b412
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
55 deletions
+63
-55
tests/ocr_det_params.txt
tests/ocr_det_params.txt
+1
-0
tests/prepare.sh
tests/prepare.sh
+41
-34
tests/test.sh
tests/test.sh
+21
-21
No files found.
tests/ocr_det_params.txt
View file @
45d4afec
...
...
@@ -50,6 +50,7 @@ inference:tools/infer/predict_det.py
--benchmark:True
null:null
===========================cpp_infer_params===========================
use_opencv:True
infer_model:./inference/ch_ppocr_mobile_v2.0_det_infer/
infer_quant:False
inference:./deploy/cpp_infer/build/ppocr det
...
...
tests/prepare.sh
View file @
45d4afec
...
...
@@ -75,8 +75,10 @@ elif [ ${MODE} = "infer" ] || [ ${MODE} = "cpp_infer" ];then
fi
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
echo
"################### build opencv ###################"
cd
deploy/cpp_infer
use_opencv
=
$(
func_parser_value
"
${
lines
[52]
}
"
)
if
[
${
use_opencv
}
=
"True"
]
;
then
echo
"################### build opencv ###################"
rm
-rf
3.4.7.tar.gz opencv-3.4.7/
wget https://github.com/opencv/opencv/archive/3.4.7.tar.gz
tar
-xf
3.4.7.tar.gz
...
...
@@ -110,13 +112,18 @@ if [ ${MODE} = "cpp_infer" ];then
make
install
cd
../
echo
"################### build opencv finished ###################"
fi
echo
"################### build PaddleOCR demo ####################"
if
[
${
use_opencv
}
=
"True"
]
;
then
OPENCV_DIR
=
$(
pwd
)
/opencv-3.4.7/opencv3/
else
OPENCV_DIR
=
''
fi
LIB_DIR
=
$(
pwd
)
/Paddle/build/paddle_inference_install_dir/
CUDA_LIB_DIR
=
/usr/local/cuda/lib64/
CUDNN_LIB_DIR
=
/usr/lib/x86_64-linux-gnu/
CUDA_LIB_DIR
=
$(
dirname
`
find /usr
-name
libcudart.so
`
)
CUDNN_LIB_DIR
=
$(
dirname
`
find /usr
-name
libcudnn.so
`
)
BUILD_DIR
=
build
rm
-rf
${
BUILD_DIR
}
...
...
tests/test.sh
View file @
45d4afec
...
...
@@ -147,28 +147,28 @@ infer_value1=$(func_parser_value "${lines[50]}")
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
# parser cpp inference model
cpp_infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[5
2
]
}
"
)
cpp_infer_is_quant
=
$(
func_parser_value
"
${
lines
[5
3
]
}
"
)
cpp_infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[5
3
]
}
"
)
cpp_infer_is_quant
=
$(
func_parser_value
"
${
lines
[5
4
]
}
"
)
# parser cpp inference
inference_cmd
=
$(
func_parser_value
"
${
lines
[5
4
]
}
"
)
cpp_use_gpu_key
=
$(
func_parser_key
"
${
lines
[5
5
]
}
"
)
cpp_use_gpu_list
=
$(
func_parser_value
"
${
lines
[5
5
]
}
"
)
cpp_use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[5
6
]
}
"
)
cpp_use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[5
6
]
}
"
)
cpp_cpu_threads_key
=
$(
func_parser_key
"
${
lines
[5
7
]
}
"
)
cpp_cpu_threads_list
=
$(
func_parser_value
"
${
lines
[5
7
]
}
"
)
cpp_batch_size_key
=
$(
func_parser_key
"
${
lines
[5
8
]
}
"
)
cpp_batch_size_list
=
$(
func_parser_value
"
${
lines
[5
8
]
}
"
)
cpp_use_trt_key
=
$(
func_parser_key
"
${
lines
[
59
]
}
"
)
cpp_use_trt_list
=
$(
func_parser_value
"
${
lines
[
59
]
}
"
)
cpp_precision_key
=
$(
func_parser_key
"
${
lines
[6
0
]
}
"
)
cpp_precision_list
=
$(
func_parser_value
"
${
lines
[6
0
]
}
"
)
cpp_infer_model_key
=
$(
func_parser_key
"
${
lines
[6
1
]
}
"
)
cpp_image_dir_key
=
$(
func_parser_key
"
${
lines
[6
2
]
}
"
)
cpp_infer_img_dir
=
$(
func_parser_value
"
${
lines
[6
2
]
}
"
)
cpp_save_log_key
=
$(
func_parser_key
"
${
lines
[6
3
]
}
"
)
cpp_benchmark_key
=
$(
func_parser_key
"
${
lines
[6
4
]
}
"
)
cpp_benchmark_value
=
$(
func_parser_value
"
${
lines
[6
4
]
}
"
)
inference_cmd
=
$(
func_parser_value
"
${
lines
[5
5
]
}
"
)
cpp_use_gpu_key
=
$(
func_parser_key
"
${
lines
[5
6
]
}
"
)
cpp_use_gpu_list
=
$(
func_parser_value
"
${
lines
[5
6
]
}
"
)
cpp_use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[5
7
]
}
"
)
cpp_use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[5
7
]
}
"
)
cpp_cpu_threads_key
=
$(
func_parser_key
"
${
lines
[5
8
]
}
"
)
cpp_cpu_threads_list
=
$(
func_parser_value
"
${
lines
[5
8
]
}
"
)
cpp_batch_size_key
=
$(
func_parser_key
"
${
lines
[5
9
]
}
"
)
cpp_batch_size_list
=
$(
func_parser_value
"
${
lines
[5
9
]
}
"
)
cpp_use_trt_key
=
$(
func_parser_key
"
${
lines
[
60
]
}
"
)
cpp_use_trt_list
=
$(
func_parser_value
"
${
lines
[
60
]
}
"
)
cpp_precision_key
=
$(
func_parser_key
"
${
lines
[6
1
]
}
"
)
cpp_precision_list
=
$(
func_parser_value
"
${
lines
[6
1
]
}
"
)
cpp_infer_model_key
=
$(
func_parser_key
"
${
lines
[6
2
]
}
"
)
cpp_image_dir_key
=
$(
func_parser_key
"
${
lines
[6
3
]
}
"
)
cpp_infer_img_dir
=
$(
func_parser_value
"
${
lines
[6
3
]
}
"
)
cpp_save_log_key
=
$(
func_parser_key
"
${
lines
[6
4
]
}
"
)
cpp_benchmark_key
=
$(
func_parser_key
"
${
lines
[6
5
]
}
"
)
cpp_benchmark_value
=
$(
func_parser_value
"
${
lines
[6
5
]
}
"
)
fi
...
...
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